Agent Architecture
Retrieval and context systems designed for reliable multi-step agent behavior. The question here: does a retrieval index built for single-shot RAG queries also serve as a good context substrate for multi-step agent tool-calling, or do the two use cases pull the architecture in different directions?
Key findings
- Shared context stores reduced duplicate retrieval calls across agent steps working the same task.
- Retrieval indices tuned for agent tool-calling cost some precision for ad-hoc human search — a real tradeoff, not a free win.
- Context window pruning strategy matters more for multi-turn agent reliability than I expected going in.
Benchmark
| Index design | Avg. retrieval (ms) | Storage overhead | Δ vs. baseline |
|---|---|---|---|
| Flat vector index | 84 | 1.0x | — |
| HNSW index | 51 | 1.4x | −39% |
| HNSW + metadata filtering | 37 | 1.9x | −56% |
Attachment
agent-architecture-notes.pdf
Download