Best practices for recall() in an infra ops agent: search type selection, routing, and tradeoffs #3697
|
I'm building an infra agent that stores tickets, incidents, dev Q&A and infra memories — each session is ingested and cognified into a common dataset. The agent LLM decides when to call recall() as a tool (not every turn — only when it determines retrieval is needed). auto_route=True — is it enough? The alternative is exposing one tool per search type — recall_chunks, recall_graph, recall_temporal, recall_summaries — and letting the agent LLM decide which to call based on query intent. This gives explicit control but adds decision overhead to the LLM and risks multi-tool calls per turn multiplying latency. What's the recommended pattern here? Is it better to trust auto_route and keep a single tool, or guide the agent with multiple tools and descriptions that explain when each applies? Is there a middle ground — e.g. a single auto_route tool as default plus 1-2 explicit tools for known edge cases? What's the rough ordering of CHUNKS_LEXICAL, SUMMARIES, RAG_COMPLETION, GRAPH_COMPLETION, and HYBRID_COMPLETION in terms of latency, token cost, and recall depth? For a knowledge base heavy on relationships between incidents, tickets, and services — does graph traversal meaningfully improve results over RAG, or is the extra cost rarely justified for most query types? |
Replies: 1 comment 1 reply
|
@pablomdc auto_route is not enough for production use cases Cognee is modular and idea is that you can extend it yourself with custom retrievers and patterns to fit the way you want to be using it. I'd add a custom retriever that is based on cypher for your use case, that would be simplest. Together with custom model, that is something that would work. Regarding the question of: What's the rough ordering of CHUNKS_LEXICAL, SUMMARIES, RAG_COMPLETION, GRAPH_COMPLETION, and HYBRID_COMPLETION in terms of latency, token cost, and recall depth? Will add that to docs this week so we don't repeat ourselves here. Please check docs.cognee.ai does graph traversal meaningfully improve results over RAG -> yes, check our BEAM report in evals |
@pablomdc auto_route is not enough for production use cases
Cognee is modular and idea is that you can extend it yourself with custom retrievers and patterns to fit the way you want to be using it.
I'd add a custom retriever that is based on cypher for your use case, that would be simplest. Together with custom model, that is something that would work.
Regarding the question of: What's the rough ordering of CHUNKS_LEXICAL, SUMMARIES, RAG_COMPLETION, GRAPH_COMPLETION, and HYBRID_COMPLETION in terms of latency, token cost, and recall depth?
Will add that to docs this week so we don't repeat ourselves here. Please check docs.cognee.ai
does graph traversal meaningfully improve results over RA…