Skip to content

Static query registration - #63

Open
prinskumar-tigergraph wants to merge 8 commits into
release_2.0.3from
static_query_registration
Open

Static query registration#63
prinskumar-tigergraph wants to merge 8 commits into
release_2.0.3from
static_query_registration

Conversation

@prinskumar-tigergraph

Copy link
Copy Markdown
Contributor

Summary

  • Add KG Admin Register Queries so operators can tag installed GSQL with a [GRAPHRAG_TOOL] description.
  • Inject those tagged queries into the agent catalog as graphrag__gsql__* tools; the planner uses one only when the description matches the question.
  • Unregister drops the description only — the installed query stays on the graph.

Test plan

  • Open KG Admin → Register Queries: list registered vs original queries, register one, confirm it appears as a tool in a matching chat, then unregister.
  • Confirm a question that does not match a tagged description still uses hybrid/community/structural as before.

Tag queries with a native GSQL description so the agent catalog can pick them by match, without treating every installed query as a tool.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prins Kumar and others added 7 commits September 3, 2026 19:46
Register Queries now collects the description as the same slots built-in
tools use (what it returns, use for, do not use) and merges them into one
line, with a preview of what the planner will see.

The planner and react strategies resolve the question against the
conversation, split it into sub-needs, and match each sub-need to the
whole catalog, so a registered query can cover one slice while hybrid or
structural covers the rest. Each unstructured step now carries a
standalone search question for its own slice, so a compound question no
longer sends the leftover wording to vector search.

Co-authored-by: Cursor <cursoragent@cursor.com>
…, resolve pronouns from Conversation

Co-authored-by: Cursor <cursoragent@cursor.com>
…-multi-clause-routing)

Pronoun resolution and standalone unstructured query rules are now in the
prompt-multi-clause-routing branch. This branch keeps only the
graphrag__gsql__* routing rules: match-description routing, INSTALLED kind,
and the GSQL-aware modifications to the Prioritize/Use-BOTH lines.
…ion, clarifying question fallback

- When a question refers to something from earlier in the conversation,
  resolve it from ## Conversation and use the full name in retrieval args.
  If history has multiple candidates and it is unclear which is meant,
  ask the user one short clarifying question instead of guessing.
- For each unstructured retrieval step, set the question to that clause
  only as a standalone search query. Do not pass the full multi-part
  question, a clause already covered by another step, or an unresolved
  reference from conversation history.
- When a question has multiple clauses, assign each clause to its own
  retrieval step; plan additional RAG steps for any clause not yet covered.
- Synthesizer: answer each part of a multi-part question from its matching
  source; do not mix structured notes with document-passage answers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant