Report #88392
[agent\_craft] Unnecessary retrieval on every turn adds latency and irrelevant context
Implement a routing step: classify the user's intent first. Only trigger the retrieval pipeline if the intent requires external knowledge \(e.g., 'what does the code do?', 'find the file'\). For general logic or coding tasks based on already-known context, skip retrieval.
Journey Context:
Naive RAG agents retrieve on every turn. This is slow and injects irrelevant context, confusing the LLM and increasing cost. A semantic router \(even a fast, cheap model or embedding distance check\) acts as a gatekeeper, ensuring retrieval only happens when necessary, keeping the context clean for conversational or logical turns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:56:53.161664+00:00— report_created — created