Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/docs/docs/core-concepts/hybrid-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ Entity expansion follows entity tags to find related memories. This enables quer
**How it works:**

1. Execute initial recall to get seed results
2. For each seed result, extract entities using `extract_entities()`
3. Convert extracted entities to `entity:<type>:<slug>` tags
2. For each seed result, extract entity names from existing `entity:*` tags using `_extract_entities_from_results()`
3. Convert extracted entity names to `entity:<type>:<slug>` search tags
Comment on lines +327 to +328

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract_entities() does exist — it's defined in automem/utils/entity_extraction.py and is used by the enrichment pipeline to run spaCy NLP on newly stored memory content. The references in overview.md (rows/diagram for "Enrichment Pipeline") and architecture/enrichment.md (enrichment worker sequence) describe that flow correctly and need no change.

This PR fixes a different path: entity expansion during recall. When a user calls /recall?expand_entities=true, the recall pipeline reads back entity tags already stored on memories (created earlier by the enrichment step) via _extract_entities_from_results() — it does not call the NLP extractor again. The old extract_entities() reference in hybrid-search.md was conflating these two operations.


Generated by Claude Code

4. Query FalkorDB/Qdrant for memories with matching entity tags
5. Merge entity-expanded results with seed results
6. Apply expansion limits and filters
Expand Down