feat(search): add summary_embedding semantic search for nodes #1163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
summary_embeddingfield toEntityNodefor semantic search over node summariesNodeSearchMethod.summary_similarityfor querying nodes by summary contentExample: Query "when to write unit tests" now finds a node named "Software Testing Best Practices" with summary "describes when to write unit tests, integration tests, e2e tests".
Changes
Data Model (
nodes.py)summary_embedding: list[float] | Nonefield toEntityNodegenerate_summary_embedding()method (mirrorsgenerate_name_embedding())load_summary_embedding()method for all providerscreate_entity_node_embeddings()for batch generationCommunityNodefor consistencySearch (
search_config.py,search_utils.py,search.py)NodeSearchMethod.summary_similarityenum valuenode_summary_similarity_search()functionnode_search()dispatchPersistence (
node_db_queries.py)Recipes (
search_config_recipes.py)summary_similarityto all node-related search recipes (RRF, MMR, etc.)Test plan
make lint)pyright)summary_embeddingis optional (Noneby default)🤖 Generated with Claude Code