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

# CaseMind Memory System

> Persistent case memory that remembers everything and gets smarter with every interaction

## What is CaseMind?

CaseMind is Victoria AI's **persistent memory system** that stores, organizes, and recalls all information about your cases. Unlike traditional chatbots that forget context between sessions, CaseMind remembers everything across all conversations, documents, and interactions.

## Key Features

<CardGroup cols={2}>
  <Card title="289+ Fact Types" icon="database">
    Automatically extracts and categorizes facts into 289+ structured types (parties, assets, dates, etc.)
  </Card>

  <Card title="Intelligent Deduplication" icon="sparkles">
    3-tier deduplication ensures no duplicate facts, even when information appears multiple times
  </Card>

  <Card title="Temporal Tracking" icon="clock">
    Tracks when facts were learned, updated, and from which source
  </Card>

  <Card title="Confidence Scoring" icon="gauge">
    Each fact has a confidence score based on source quality and consistency
  </Card>
</CardGroup>

## How It Works

<Steps>
  <Step title="Information Extraction">
    When you interact with Victoria or upload documents, CaseMind automatically extracts relevant facts:

    * Party information (names, ages, occupations)
    * Financial data (assets, income, debts)
    * Dates and deadlines
    * Case events and history
    * Legal issues and claims
  </Step>

  <Step title="Deduplication">
    Before storing, CaseMind checks for duplicates using a 3-tier system:

    1. **Exact match**: Identical facts are merged
    2. **Semantic similarity**: Similar facts are reconciled
    3. **Temporal ordering**: Newer information updates older facts
  </Step>

  <Step title="Storage & Indexing">
    Facts are stored in PostgreSQL with:

    * Full-text search indexing
    * Vector embeddings for semantic search
    * Relationships between facts
    * Source attribution
  </Step>

  <Step title="Retrieval">
    When Victoria needs context, CaseMind:

    * Searches relevant facts by keyword or semantic meaning
    * Ranks by confidence and recency
    * Returns contextual information to the AI agent
  </Step>
</Steps>

## Extractable Fact Types

CaseMind can extract 289+ different fact types, organized into categories:

### Party Information

* Full names, aliases, maiden names
* Ages, birthdates
* Occupations, employers
* Contact information
* Residency and domicile

### Financial Facts

* Assets (real estate, vehicles, accounts)
* Income sources and amounts
* Debts and liabilities
* Business interests
* Retirement accounts

### Case Timeline

* Marriage date
* Separation date
* Filing date
* Important events
* Court dates and deadlines

### Children

* Names and ages
* Custody arrangements
* Support orders
* School and medical info
* Special needs

### Legal Issues

* Contested issues
* Settlement positions
* Court orders
* Pending motions
* Discovery status

<Tip>
  You can view all extracted facts for a case in the **Case Details** panel in Case Workspace.
</Tip>

## Deduplication System

CaseMind's 3-tier deduplication prevents information overload:

### Tier 1: Exact Match

```
Input: "John Smith is 45 years old"
Existing: "John Smith is 45 years old"
Result: No new fact created (exact duplicate)
```

### Tier 2: Semantic Similarity

```
Input: "Husband earns $150,000 annually"
Existing: "John Smith's annual income is $150,000"
Result: Facts merged, confidence score increased
```

### Tier 3: Temporal Updates

```
Input: "John now earns $160,000/year" (dated today)
Existing: "John earns $150,000/year" (dated 6 months ago)
Result: New fact stored, old fact marked as historical
```

## Source Attribution

Every fact in CaseMind tracks its source:

| Source Type      | Examples                        | Confidence Weight    |
| ---------------- | ------------------------------- | -------------------- |
| Court Documents  | Filed motions, orders           | High (90-100%)       |
| Client Documents | Financial affidavits, pay stubs | High (85-95%)        |
| AI Conversations | Victoria chat sessions          | Medium (70-85%)      |
| Manual Entry     | User-entered data               | High (90-100%)       |
| Third-Party      | Public records                  | Medium-High (80-90%) |

<Warning>
  Facts from AI conversations have lower confidence scores and should be verified against source documents before relying on them in court.
</Warning>

## Memory Retrieval

When Victoria needs information, CaseMind uses hybrid search:

1. **Keyword Search**: Full-text search on fact content
2. **Semantic Search**: Vector similarity for conceptual matches
3. **Relationship Traversal**: Following connections between facts
4. **Temporal Filtering**: Prioritizing recent or historically relevant facts

### Example Query Flow

```
User asks: "What is the husband's income?"

CaseMind retrieves:
1. "John Smith's current income: $160,000/year" (source: latest pay stub)
2. "Previous income: $150,000/year" (source: financial affidavit, 6mo ago)
3. "Income includes $10,000 bonus" (source: Victoria conversation)

Victoria responds with current income and notes the increase.
```

## Privacy & Security

CaseMind memory is protected by:

* **Firm Isolation**: Each firm's CaseMind data is completely separate
* **Case Isolation**: Facts are scoped to specific cases
* **Encryption**: All data encrypted at rest (AES-256) and in transit (TLS 1.3)
* **Access Control**: Only authorized users can access case facts
* **Audit Logs**: All fact access and modifications are logged

## Managing CaseMind

### Viewing Extracted Facts

In Case Workspace, click **Case Details** → **Extracted Facts** to see:

* All facts organized by category
* Source attribution for each fact
* Confidence scores
* Last updated timestamps

### Editing Facts

You can manually edit or remove incorrect facts:

1. Navigate to **Case Details** → **Extracted Facts**
2. Click on any fact to edit or delete
3. Changes are logged in the audit trail

### Exporting Facts

Export all case facts to:

* **JSON**: For data analysis or backup
* **PDF**: For court filing or client review
* **CSV**: For spreadsheet analysis

## Best Practices

<AccordionGroup>
  <Accordion title="Upload Documents Early" icon="upload">
    The more documents CaseMind processes, the richer the memory:

    * Upload financial affidavits first
    * Add court orders and pleadings
    * Include correspondence when relevant
  </Accordion>

  <Accordion title="Review Extracted Facts" icon="eye">
    Periodically review extracted facts for accuracy:

    * Check financial figures against source documents
    * Verify dates and deadlines
    * Correct any AI extraction errors
  </Accordion>

  <Accordion title="Use Specific Names" icon="tag">
    Help CaseMind by using full names consistently:

    * "John Smith" vs. "the husband"
    * "Acme Corp" vs. "his business"
    * "2023 Toyota Camry" vs. "the car"
  </Accordion>

  <Accordion title="Provide Date Context" icon="calendar">
    When information changes over time, mention dates:

    * "As of January 2025, John earns..."
    * "Before the separation, they owned..."
    * "The most recent appraisal shows..."
  </Accordion>
</AccordionGroup>

## Memory Optimization

CaseMind automatically optimizes memory usage:

* **Fact Pruning**: Very old, low-confidence facts may be archived
* **Consolidation**: Related facts are linked and summarized
* **Prioritization**: Frequently accessed facts get higher retrieval priority

<Tip>
  CaseMind memory is unlimited—you don't need to worry about storage limits. The system automatically manages memory efficiently.
</Tip>

## Integration with Victoria AI

Every Victoria AI agent has full access to CaseMind:

* **Co-Counsel**: Uses facts for legal strategy and motion drafting
* **Financial Analyst**: Retrieves financial data for calculations
* **Discovery Manager**: References known facts to identify gaps
* **Case Manager**: Tracks deadlines and case timeline
* **Client Liaison**: Recalls case details for client communications

## Next Steps

<CardGroup cols={2}>
  <Card title="Explore LexVault" icon="folder" href="/features/lexvault">
    Learn how documents feed into CaseMind
  </Card>

  <Card title="Victoria AI Agents" icon="brain" href="/features/victoria-ai">
    See how agents use CaseMind memory
  </Card>
</CardGroup>
