-
Notifications
You must be signed in to change notification settings - Fork 2k
Kg vespa new schema #4864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kg vespa new schema #4864
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Refactors knowledge graph (KG) storage and filtering in Vespa, significantly changing how relationships and entities are handled to support more precise querying patterns.
- Changes KG storage format in
backend/onyx/document_index/vespa/app_config/schemas/danswer_chunk.sd.jinja
from weightedset to array types with structured relationship storage - Implements fail-loud error handling in
backend/onyx/agents/agent_search/kb_search/nodes/a3_generate_simple_sql.py
by raising exceptions instead of silently continuing on SQL failures - Removes entity/relationship generalization (e.g., 'LINEAR::*') from
backend/onyx/document_index/vespa/kg_interactions.py
in favor of exact matching - Adds sophisticated KG filtering in
backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py
with support for wildcards and relationship-based queries
5 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
backend/onyx/agents/agent_search/kb_search/nodes/a3_generate_simple_sql.py
Outdated
Show resolved
Hide resolved
backend/onyx/agents/agent_search/kb_search/nodes/a3_generate_simple_sql.py
Outdated
Show resolved
Hide resolved
backend/onyx/agents/agent_search/kb_search/nodes/a3_generate_simple_sql.py
Outdated
Show resolved
Hide resolved
backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py
Show resolved
Hide resolved
backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py
Outdated
Show resolved
Hide resolved
backend/onyx/document_index/vespa/shared_utils/vespa_request_builders.py
Outdated
Show resolved
Hide resolved
83a3fc3
to
dc0a7d4
Compare
8cdc5b3
to
9954440
Compare
9954440
to
4002130
Compare
Merging with the subtype pr |
Description
IMPORTANT MAYBE?: Run kg_rs_vespa inside KG Dev Assistant if you have already extracted & clustered some kg stuff
Updated how kg relationships and entities are stored/filtered in vespa
How Has This Been Tested?
Locally, with these questions:
Filtered Search Entity
Filtered Search Relations
Made sure normal search works fine
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.