Skip to content

feat(memory): structured summarization with typed key facts #552

@bug-ops

Description

@bug-ops

Problem

Summarization currently produces free-form text. Key facts and entities are not separately addressable for semantic search or retrieval.

Solution

Use chat_typed to produce structured summaries:

#[derive(Deserialize, JsonSchema)]
struct StructuredSummary {
    summary: String,
    key_facts: Vec<String>,
    entities: Vec<String>,
}

Store key_facts and entities as separate Qdrant points for better retrieval. The summary field replaces the current free-form output.

Acceptance criteria

  • StructuredSummary struct with JsonSchema derive
  • Updated summarize() in SemanticMemory to use chat_typed
  • Individual key facts stored as Qdrant points
  • Fallback to plain text summary if structured parsing fails
  • Unit tests with MockProvider

Part of Epic #549

Metadata

Metadata

Assignees

No one assigned

    Labels

    M28Milestone 28: VectorStore AbstractionllmLLM provider relatedmemoryPersistence and memory

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions