Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Mocked tests told me CORTEX was behaving correctly. Running it against the real Qwen2.5:7b model exposed 27 issues the mocks had missed—including failures involving files, code execution, arithmetic, memory and prompt injection. The lesson was not that mocks are useless: keep them for speed, but test the model and the interaction path people actually use.

Why I tested the real model

I built CORTEX as a local AI agent and had a green unit-test suite built around mocked model calls. Those tests were fast and repeatable, but they could not show how the actual model would choose tools, interpret results or respond to hostile input. I added a live battery to find out what happened when the real model interacted with the application.

The setup ran Qwen2.5:7b through Ollama on a laptop GPU with 6 GB of VRAM and no cloud API keys. Tests exercised a running server through Server-Sent Events (SSE), the same event-based path the UI uses. For CORTEX’s default setup, the repository recommends a GPU with at least 6 GB of VRAM; CPU operation is possible, but slow. That is project-specific guidance, not a general hardware rule for every 7B model. CORTEX repository

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

I kept the test server and database separate from my everyday instance so test conversations would not mix with personal data. Each run recorded prompts, plans, tool calls and results, answers, and timing in JSONL. That made it possible to inspect the whole interaction rather than judge the model from a final pass/fail label.

What the 187-case battery covered

The suite combined model and prompt checks with tests of application operations and security boundaries. Its three parts were:

Part Cases What it exercised
Test plan 39 A six-level plan for testing the agent’s behavior.
Extra prompts 137 Mathematics, code, files, document search, web fetch, memory, safety and reasoning.
Operations and security checks 11 Cases including a model-service interruption, concurrent chats, CORS, Host checks and a CPU-heavy snippet.
Total 187 39 plan cases + 137 extra prompts + 11 operations/security checks.

This was more than a test of whether a model could answer a prompt. A useful live test also needs to check what the application lets an answer do: whether a tool was actually called, how its output was handled, and whether requests crossed intended boundaries.

What the live runs found

In my report, the first run of the 39-case plan scored 29/39. After changes, the release build scored 39/39 on that plan. It also scored 136/137 on the extra prompts and 11/11 on operations and security checks. Across the process, I found 27 issues that my unit tests had not caught. These are my results for this project and setup, not an independently reproduced benchmark or evidence about all 7B models. CORTEX repository

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The one extra-prompt miss on the release build was a timing failure, not a wrong answer: the correct answer took 58 seconds against a 45-second limit. It passed when I reran it. Model outputs and latency can vary, so a single failure needs its recorded context—and sometimes a rerun—before it is diagnosed.

Tool claims were not the same as tool use

In one case, the model said it had saved a file without calling the file tool. In another, it reported its own arithmetic instead of using the calculator. A response that sounds plausible is not proof that the requested operation happened; the logs need to show whether the tool was called and what it returned.

Execution limits changed the right answer

When the sandbox could not run a graphical interface, the model repeated an entire game program instead of explaining the limitation and giving a local run command. In a separate case, code produced no output, but the model invented an output value. These failures made it clear that code execution tests must distinguish a real tool result from the model’s guess about what the result should be.

Context could become an unsafe instruction

The model learned a user’s name from sample JSON and followed an instruction hidden in text submitted for summarization. Documents, pasted text, web pages and tool results therefore needed to be treated as data that might contain hostile instructions, not as trusted directions for the agent.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What I changed in the application

The practical response was to move important constraints out of prompt wording and into application code and tool capabilities. Prompts still help guide behavior, but they are not reliable enforcement for consequential actions.

  • Recover from skipped tool use. I added recovery for a case where the model failed to call a required tool, rather than accepting its claim that the operation was complete.
  • Handle unsupported GUI execution honestly. If the sandbox cannot run a GUI, the agent declines that execution path and provides a local run command instead of repeating a full program as though it could run it.
  • Label tool outputs. The application marks results as tool output so the model has clearer context about their source.
  • Limit memory extraction. Memory extraction is restricted to durable self-statements rather than details inferred from arbitrary sample data.
  • Treat quoted and pasted material as data. Instructions inside text submitted for summarization are not supposed to override the user’s request.
  • Constrain destructive actions. Tool capabilities are limited so a model cannot perform an unnecessarily destructive operation simply because it requests one.
  • Protect local boundaries. The repository documents local-only binding defaults and checks against private and loopback web addresses.
  • Avoid automatic remote image loads. Images are rendered as links rather than loaded automatically, reducing the chance that an answer triggers an external image request just by being displayed. CORTEX repository

The injection check that changed image and fetch handling

A late injection check exposed a side effect in the display and fetch paths. In my runs, an injected Markdown image loaded three times in three runs, and a planted URL was fetched three times in three runs. Those small-run observations are specific to my tests, but they were enough to prompt changes: image handling switched to links, and web_fetch was restricted to URLs typed in the conversation.

The broader engineering point is to examine not only what an agent says in response to hostile content, but also what the interface or tools do with that content. A rendered image or fetched URL can create a network request even if the model’s prose looks innocuous.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to add useful live tests without discarding mocks

Keep mocks for fast, repeatable checks

Mocks remain useful for verifying deterministic application behavior and catching regressions quickly. They make it easier to test expected branches without waiting for a model or depending on variable outputs. Their limit is equally important: mocked responses cannot reveal the real model’s choices, latency, or interpretation of tool and user content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Exercise the path users actually take

Run live cases through the running service and the same interface protocol used by the UI. Include tool use and results, not only standalone prompt-and-answer exchanges. Keep the test environment isolated from personal conversations and record enough detail to reconstruct each turn.

Inspect answers before trusting automated grading

Full logs matter because checks can be wrong too. I initially had an automated check misclassify a mathematically correct fraction. Reviewing the actual answer and surrounding tool activity helps distinguish a model failure from a faulty test expectation.

Rerun failures, but do not erase them

A rerun can reveal that an apparent failure was variable latency or output variation, as with the 58-second correct answer. Keep both the original and rerun records: passing once does not establish that the first failure was meaningless or that the behavior is reliably fixed.

Put consequential rules in code

When a requirement concerns files, code execution or network access, enforce it at the application or tool boundary. Prompt instructions can explain the desired behavior, but code should determine which actions are available and under what conditions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What these results do—and do not—show

The suite showed me that a green mocked suite was not enough to validate this agent’s real interactions. It does not show that Qwen2.5:7b is more or less reliable than another model, that all 7B models share these failure modes, or that a 39/39 plan score guarantees safe behavior outside the tested cases. The counts describe one project’s battery and release run; there was no cross-model comparison or independent replication.

For someone building a local agent, the useful takeaway is methodological: keep fast mocks, add a live suite early, and test behavior and boundaries together. As I put it: “Test against the real model early. Keep the mocks for speed, and add a live suite for the truth.”

Rules in a prompt are suggestions. If it matters (files, code, the network), enforce it in code.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.