Overview › 8 Retrieval › a. Expanding sources
Expanding sources Connect and expand the sources the task needs. 2 optimizations.
i. On a bounded corpus (up to about 100K documents), grep and file reads over the raw text beat an embedding retriever: the agent narrows into documents it has found.
ii. Find information a connected source holds that the agent never reads, and expose it.
Try it for yourself Paste this into Claude Code, or any coding agent, in your agent's repo to check it for these optimizations.
Read these agent optimizations (Retrieval: Expanding sources), each with the signs that it applies:
- 8.a.i Choose the retriever by corpus size and question type: https://mahalsystems.ai/aot/optimizations/choose-retriever.md
- 8.a.ii Surface information the source holds but the agent cannot read: https://mahalsystems.ai/aot/optimizations/surface-unreadable-information.md
Then check whether any of them applies to the agent in this repository. Look for each one's signs under "When it applies" in its code, prompts and tools, and in any traces or eval results you can find. Tell me which apply, strongest first, with what you found for each. Don't change anything yet. Copy prompt