> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evermind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# EverOS vs Standard RAG

> Advantages of structured memory over RAG

## Why Do Agents Need Structured Memory?

<Info>
  RAG works well for **static documents**, but many real-world use cases require agents to maintain a **persistent, evolving user state**—including preferences, constraints, intents—across time and interactions.
</Info>

While RAG works well for document QA, it falls short in many other use cases. Conventional RAG architectures have fundamental limitations: they retrieve explicit content (“what was said”) but **fail to infer implicit signals such as the user’s state and intent.**

RAG relies on **semantic similarity**. While it can retrieve recent chat logs to provide surface-level context, it treats dialogue as static chunks of data. As a result, it fails to capture **Implicit Traits**—the behavioral patterns, evolving preferences, and potential intents—that are essential for true personalization. EverOS addresses this gap by moving beyond simple indexing to **structured state extraction**.

| Feature               | Standard RAG           | EverOS                                |
| :-------------------- | :--------------------- | :------------------------------------ |
| **Storage Structure** | Document Chunks        | Temporal Facts & Relationships        |
| **Update Method**     | Manual Static Updates  | LLM-driven Automatic Updates          |
| **Query Method**      | Vector Similarity Only | BM25, Vector, RRF, and Agentic Search |
| **Query Scope**       | Document Level         | User/Chat Session-level               |

## Why Standard RAG Falls Short for Long-term Interaction?

<AccordionGroup>
  <Accordion title="1) Low signal-to-noise ratio" description="Top-k retrieval often surfaces 'similar but useless' chat segments.">
    Standard RAG relies on Top-k retrieval. Conversational streams are filled with phatic expressions (small talk) and transitional noise. RAG often retrieves high-similarity but low-value segments, diluting the effective density of the context window.
  </Accordion>

  <Accordion title="2) State conflict: raw logs vs dynamic state" description="Append-only logs accumulate contradictory signals, forcing the model to arbitrate at inference time..">
    RAG is typically **append-only**. If a user changes their preference over time, RAG retrieves both contradictory chunks. The LLM is forced to arbitrate this conflict at runtime. A robust system requires a **Dynamic Profile** that resolves these states at write-time, not a dump of raw logs.
  </Accordion>

  <Accordion title="3) Multi-user attribution failure" description="Treating group dialogue as a single stream causes misattribution of events, polluting individual user state.">
    In group chat scenarios, RAG treats the conversation as a flat text sequence. It struggles to correctly define relationships between specific events or preferences and the correct speaker (**Subject-Event Attribution**). This leads to "profile contamination," where user A’s preferences are mistakenly attributed to user B. EverOS solves this by isolating memory extraction per user, maintaining distinct episodes and profiles for multiple participants simultaneously.
  </Accordion>
</AccordionGroup>

## Implementation Path Comparison

#### Write path (ingestion)

<Columns cols={1}>
  <Card title="Standard RAG pipeline" icon="layer-group">
    ```
    Text -> Fixed-size Chunking -> Embedding -> Vector DB
    ```

    Data is mechanically sliced, losing temporal coherence and subject boundaries.
  </Card>

  <Card title="EverOS workflow" icon="brain-circuit">
    1. **Topic boundary detection**: detect real-time topic shifts (not fixed token windows).
    2. **Semantic MemCell**: construct independent memory units per topic/subject.
    3. **Subject disentanglement**: separate streams by speaker in multi-user chats.
    4. **Multi-dimensional extraction**:
       * **Episode**: episodic memory (events).
       * **Dynamic Profile**: update user state and resolve conflicts.
       * **Foresight**: generate predictive constraints from history.
  </Card>
</Columns>

#### Read path (retrieval)

<Columns cols={1}>
  <Card title="Standard RAG pipeline" icon="magnifying-glass">
    ```
    User Query -> Vector Search -> Context Stuffing
    ```

    A linear process: whatever is found is fed directly to the model.
  </Card>

  <Card title="EverOS workflow (closed-loop retrieval)" icon="arrows-rotate">
    1. **Initial retrieval**: run a baseline query.
    2. **Context fusion**: fuse results with **Scene**, **Context**, and **Dynamic Profile**.
    3. **LLM refinement**: reason over fused state to rewrite queries or generate responses aligned with the user’s current state.
  </Card>
</Columns>

## How to Choose

To choose the right architecture, define the source of truth and the nature of the data.

<Columns cols={2}>
  <Card title="Use Memory for..." icon="brain">
    * AI companion/therapist: The agent must remember the user's mood history, relationship evolution, and deep personal context over months.
    * Multi-user group chats: You need to track distinct profiles for multiple people in one channel.
    * Educational/coaching agents: Tracking a student's learning curve, weak points, and progress over multiple sessions.
    * Immersive gaming NPCs: Characters that need to form unique relationships with players based on past interactions and choices.
  </Card>

  <Card title="Use RAG for..." icon="magnifying-glass">
    * Enterprise knowledge hub: You need to answer questions based on static manuals, HR policies, or IT documentation.
    * "Chat with PDF": The scope is limited to specific uploaded documents where the text is the absolute truth.
    * General FAQs: Answering FAQs where consistency with a script is more important than personalization.
    * Code search: Retrieving specific code snippets or technical documentation based on syntax.
  </Card>
</Columns>

<Tip>
  If your agent needs to remember **who said what, how it evolved, and what is currently true**, classic RAG is no longer sufficient. What you need is **structured memory**.
</Tip>
