Read the source code of your memory.
Cognitive regions
Seven types of knowledge, each with tuned caching, retrieval weights, and reasoning prompts.
Every stardust record is tagged with a cognitive region. This isn't metadata — it's a first-class dimension that changes how the record is cached, retrieved, and reasoned about.
The core insight: different types of knowledge have different access patterns. A procedure ("how to deploy") needs exact keyword matching. A decision ("why we chose Postgres") needs semantic similarity. A goal ("reduce latency by 50%") needs to persist in cache for days. Treating them identically leaves retrieval precision on the table.
The seven regions
| Region | Cache TTL | Retrieval bias | Stores |
|---|---|---|---|
analytical |
8h | Semantic similarity | Decisions, tradeoffs, reasoning |
procedural |
24h | Keyword match | Commands, workflows, how-tos |
contextual |
4h | Recency | Project state, preferences |
creative |
72h | Semantic similarity | Analogies, lateral connections |
empathetic |
1h | Entity graph | Communication preferences, dynamics |
critical |
8h | Keyword match | Failure patterns, edge cases |
strategic |
7d | Semantic similarity | Goals, roadmaps, priorities |
How regions affect retrieval
Orion's search pipeline uses Reciprocal Rank Fusion to blend three signals: keyword cache, vector similarity, and graph traversal. Regions tune the weights:
- Procedural queries boost keyword weight and lower the RRF
kparameter (sharper ranking). You want the exact deploy command, not a paraphrase. - Analytical queries boost semantic weight and raise
k(smoother blending). You want related decisions even if they use different words. - Contextual queries boost recency. Current state matters more than last month's state.
- Empathetic queries boost graph weight. "How does Sarah communicate?" is best answered by traversing from the "Sarah" entity.
In benchmarks, region-aware retrieval improves precision@5 by 28% compared to untyped retrieval.
Storage partitioning
Each region gets its own ChromaDB collection per galaxy:
orion_{galaxy_id}_analytical
orion_{galaxy_id}_procedural
orion_{galaxy_id}_contextual
...
This enables region-specific embedding strategies and prevents procedural content (short, command-heavy) from polluting the vector space of analytical content (long, reasoning-heavy).
Cognitive mode prompts
When brain.think or brain.recall specifies a cognitive_mode, Orion injects a region-specific reasoning prompt that shapes how the LLM processes retrieved context:
# analytical mode
"Draw on accumulated logical frameworks, decision records, and trade-off
analyses. Prioritize precision. What is the most defensible conclusion?"
# procedural mode
"Draw on established patterns, verified workflows, and step-by-step
procedures. Prioritize accuracy and completeness. What is the exact
sequence of steps?"
The combination of typed retrieval and typed reasoning produces better results than either alone.