Skip to content

Add structured memory fields with field-level embeddings #17

@aurexav

Description

@aurexav

Context
claude-mem separates observations into narrative, facts, and concepts, which improves retrieval granularity. ELF currently embeds full note text only.

Goal
Improve semantic precision by embedding structured fields and allowing field-specific retrieval.

Scope

  1. Data model
  • Extend the memory note representation with optional structured fields (examples):
    • summary (short)
    • facts (list of short sentences)
    • concepts (list of short phrases)
  • Preserve the existing text field as the canonical human-readable note.
  1. Write semantics
  • add_event: extractor may populate structured fields. Evidence binding requirements must still hold for stored facts.
  • add_note: remain deterministic (no LLM). Structured fields are optional input; omission must not change current behavior.
  1. Indexing
  • Generate field-level embeddings and index them separately.
  • Merge field matches back to a single result per note with explicit explain output showing which fields matched.

Non-goals

  • No graph database backend.
  • No graph traversal queries.

Related issues

Testing and evaluation

  • Add a small evaluation set focused on fact-like queries.
  • Compare precision and false positives before/after using the retrieval harness.

Acceptance criteria

  • Field-level retrieval improves precision on fact-like queries without degrading general queries.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providersEmbedding, rerank, and extractor provider integrations.area:serviceRetrieval logic, ranking, and request orchestration.area:storagePostgres schema, SQL queries, and storage correctness.kind:specSpecification or contract definition (APIs, schemas, invariants, query semantics).theme:provenanceEvidence, citations, lineage, and explainability.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions