Skip to main content
Associative retrieval in MuBit is not just vector similarity. It is the control-plane contract that combines scoped memory selection, evidence ranking, and answer or context synthesis. For most applications, the primary retrieval surfaces are:
  • recall() for answer-oriented retrieval
  • getContext() / get_context() for prompt-ready context assembly
  • raw control.query when you need wire-level control

Mental model

  • Default to the routed retrieval path.
  • Keep run_id / session_id stable.
  • Use entry_types when you need only facts, lessons, or rules.
  • Use explicit context budgeting when the downstream model window matters.

Minimal helper-first example

query_payload.json
{
  "run_id": "support-thread-42",
  "query": "What customer preferences are already known?",
  "mode": "agent_routed",
  "limit": 5,
  "entry_types": ["fact", "lesson", "rule"]
}

Failure modes and troubleshooting

SymptomRoot causeFix
Sparse evidenceScope mismatch or weak memory writesKeep one stable run scope and tag memory intentionally
Context is too wideNo token budget or type restrictionUse getContext() budgeting and entry_types
Retrieval still looks weakMemory quality degradedUse diagnose() and memoryHealth() / memory_health()

Next steps