Skip to main content
Retrieval in Persona is a process of context construction, not document fetching. The goal is to assemble a coherent picture of the user that informs the LLM’s response.

Tuning Parameters

The retrieval process is controlled by two parameters:

Static Context

Before any query processing, the system fetches “always-on” context. This currently includes:
  • Active Goals: All goals not marked COMPLETED.
  • Core Psyche: The first 5 psyche traits (traits, preferences, values).
This ensures the agent always knows the user’s current objectives and baseline identity, even if the query doesn’t mention them.

Why Graph Traversal Matters

Consider the query: “What happened before my meeting with Sarah?” Vector search can find documents mentioning “Sarah” and “meeting.” But it cannot answer “before.” Only graph traversal can follow the PREVIOUS edge to return the chronologically preceding episode. Similarly, a query about “why I’m stressed” might match an episode about stress. Graph traversal finds the derived_from link connecting that episode to a goal with an approaching deadline—the actual cause. This is the core value of the hybrid approach: vector finds the topic, graph finds the context.

Output Format

The final context is returned as structured XML to the LLM:
This format groups memories by type, giving the LLM a structured view of the user’s state, identity, and recent history.