GML-2162: route document statistics analysis to vectorstore#51
Open
prinskumar-tigergraph wants to merge 1 commit into
Open
GML-2162: route document statistics analysis to vectorstore#51prinskumar-tigergraph wants to merge 1 commit into
prinskumar-tigergraph wants to merge 1 commit into
Conversation
Keep mandatory functions routing for graph metadata; add a narrow exception for domain analysis that asks for stats instead of narrative text.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Comment on lines
+808
to
+813
| ## Document analysis exception → `vectorstore` | ||
| Use `vectorstore` (or `history` if the question clearly continues a prior answer) only for this case: | ||
| - Domain / document analysis that asks for statistics or data **instead of** narrative text or description. | ||
| - Examples: "backed by statistics of data instead of just reading from the text/description"; same intent plus a document topic (e.g. product stability trends). | ||
| - Do **not** use this exception if the question asks for graph / vertex / edge / schema counts. | ||
| - Do **not** broaden this exception. If the question could reasonably be a structured graph query, route to `functions`. |
There was a problem hiding this comment.
Suggestion: The new exception is broad enough that questions asking for structured counts or lookups on schema entities could still be routed to vectorstore. Tighten it so vectorstore applies only when the requested statistics are explicitly sourced from document text or document analysis, not from graph entities. [possible issue, importance: 4]
Suggested change
| ## Document analysis exception → `vectorstore` | |
| Use `vectorstore` (or `history` if the question clearly continues a prior answer) only for this case: | |
| - Domain / document analysis that asks for statistics or data **instead of** narrative text or description. | |
| - Examples: "backed by statistics of data instead of just reading from the text/description"; same intent plus a document topic (e.g. product stability trends). | |
| - Do **not** use this exception if the question asks for graph / vertex / edge / schema counts. | |
| - Do **not** broaden this exception. If the question could reasonably be a structured graph query, route to `functions`. | |
| ## Document analysis exception → `vectorstore` | |
| Use `vectorstore` (or `history` if the question clearly continues a prior answer) only when the question explicitly asks to analyze statistics, trends, evidence, or data contained in documents/text for a document topic: | |
| - Examples: "backed by statistics of data instead of just reading from the text/description"; same intent plus a document topic (e.g. product stability trends). | |
| - Do **not** use this exception for counts, lists, lookups, aggregations, or summaries over graph / vertex / edge / schema entities or relationships. | |
| - Do **not** broaden this exception. If the question could reasonably be a structured graph query, route to `functions`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
User description
Keep mandatory functions routing for graph metadata; add a narrow exception for domain analysis that asks for stats instead of narrative text.
PR Type
Enhancement
Description
Refines datasource routing precedence
Adds document-analysis vectorstore exception
Preserves graph metadata function routing
Diagram Walkthrough
File Walkthrough
base_llm.py
Refine LLM datasource routing promptcommon/llm_services/base_llm.py
functionsrouting priority for graph metadata.functionsexamples.vectorstore.counts.