Repository navigation
A local evidence lookup tool in Deep Agents (scripted model example) #7974
Replies: 2 comments
|
I think returning only the relevant evidence instead of the full JSON would be better. For example, if an agent is searching a codebase to find why an authentication function is failing, it may find results from multiple files. Instead of sending all the file contents, metadata and other details to the LLM, we can send only the important file paths, line numbers and relevant code snippets. We can also combine BM25 and vector search to get better results, followed by reranking to select the most relevant ones. One more thing, I wouldn't completely limit the context because sometimes the surrounding code is also important to understand the issue. My approach would be to send the most relevant results first and let the agent fetch more context whenever needed, instead of sending everything in a single response. |
|
Good call on the scripted fake model, and on saying it tests the loop and not the model's choice. That makes the example reproducible. The gap it leaves is the one you named: with a real model, does the agent use One way to cover that without making CI flaky: run the real model rarely, record those runs, and judge the recorded messages deterministically on every commit. Things worth checking: an answer that cites a symbol the tool never returned, "found it" after an Disclosure: I work on agent trace testing at AiEnsured. |
Uh oh!
There was an error while loading. Please reload this page.
I maintain Qorx, a free local CLI for finding source evidence, and tried it as a tool inside
create_deep_agent. The example creates a temporary two-line Python fixture, indexes it under a temporaryQORX_HOME, and gives the agent onelookup_local_symboltool that callsqorx strict-answerdirectly. No daemon or model-provider credentials are needed.The local test uses a scripted fake chat model to request two calls, so it verifies the tool loop and returned evidence, not an LLM's choice of tool or an official integration. With Deep Agents 0.7.41 and Qorx 1.0.7, the tool messages were:
The example asserts the result shape and preserves the distinction between a cited match and no retrieved evidence;
not_foundis not proof a symbol can never exist. The current CLI reads its per-home index, so the example isolates that index rather than using a--projectflag.Runnable code and setup · Qorx source
This example and post were prepared with AI assistance and the code was run locally. For people building Deep Agents retrieval tools: would you pass the full evidence JSON to the model, or trim it to a bounded list of paths, lines and excerpts?
All reactions