control.query with mode: "agent_routed", and the runtime selects the best retrieval lane — semantic search, temporal scan, sparse recall, SDM, graph traversal, or a combination — based on the query and the data it already holds. You don’t hard-code the retrieval path; the agent routes itself.
What this looks like in practice
How this works
| Concern | RAG pipeline (you own it) | MuBit agent-routed (runtime owns it) |
|---|---|---|
| Which index to query | Hard-coded per endpoint | Runtime selects lane from query semantics |
| Top-k and ranking | Fixed or tuned per use-case | Adaptive per memory compartment |
| Context assembly | Your prompt-stuffing logic | Runtime returns ranked results; agent consumes |
| Adding a new retrieval mode | New code path + deploy | Already available — runtime routes when useful |
| Observability | You instrument each hop | Built-in: lane, latency, and match metadata in response |
When to override
Agent-routed retrieval is the right default. Override it when you have an explicit reason:direct_lane: "semantic_search"— force pure vector similarity when you know the answer is a nearest-neighbor match.- Explicit RAG — when you need to assemble context from multiple external sources before calling MuBit, or when your compliance rules require auditable retrieval steps. In this case, use
control.ingest/control.batch_insertto load data andcontrol.querywith a specificdirect_laneto retrieve it.
Failure modes and troubleshooting
| Symptom | Root cause | Fix |
|---|---|---|
| Inconsistent answers across requests | Switching between agent-routed and hard-coded lanes | Pick one default mode and stick with it |
| Hard incident triage | Retrieval path not logged | Inspect lane and match_metadata fields in query response |
| Missing deterministic relationships | Relying on similarity for structured facts | Ingest explicit facts and use control filters or graph-aware recall |
| Context window overflow | Returning too many results | Set limit on query; let the agent prune |
Next steps
- Build retrieval contracts at Retrieve data.
- Review permissions governance at Data guardrails.