Skip to content

GML-2323 Release GraphRAG 2.0.4 - #72

Merged
chengbiao-jin merged 32 commits into
mainfrom
release_2.0.4
Oct 21, 2026
Merged

chengbiao-jin merged 32 commits into
mainfrom
release_2.0.4

Conversation

@chengbiao-jin

@chengbiao-jin chengbiao-jin commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Release GraphRAG 2.0.4 into main. Merges all 2.0.4 work on release_2.0.4 (based on current main).

Epic: GML-2323

Added

  • cypher_max_attempts setting — how many times a graph query may be generated for one question, default 10 (GML-2336).
  • planner_max_output_tokens setting — caps the planner's output per plan (GML-2324).

Changed

  • Agentic answers reuse what the conversation and the graph schema already hold — the planner reviews its context (conversation and schema) first; it answers from that context when it covers the question, including questions about the knowledge base itself, retrieves only the missing parts, and retrieves again for bad earlier answers or questions about the current state (GML-2325).
  • A question without an answer tells the user how to ask again, with more specific information or a narrower scope (GML-2328).
  • Failed answers show their error in Trace Logs (superuser only); the chat message asks to rephrase the question (GML-2328).
  • Trace Logs show the structured query that ran, plus failed attempts (GML-2327).
  • Routine requests log less — one audit line per request; request entry and HTTP client lines at DEBUG (GML-2337).

Fixed

  • Agentic plans no longer come back without steps (GML-2325).
  • The agentic planner plans from the graph schema (GML-2331).
  • Structured queries skip the pyTigerGraph function step when no functions are registered, and an empty query result no longer counts as data in either engine (GML-2327).
  • Generated graph queries succeed more often — code blocks are removed correctly, TigerGraph's to_datetime() is used, each query is checked by TigerGraph before it runs, queries that change data are rejected (GML-2336), questions about missing values match the data, and generation stops when TigerGraph repeats the same error (GML-2341).
  • External MCP servers load again — the MCP SDK is held below version 2 (GML-2326).
  • The planner and reactive agent see the most recent conversation turns (GML-2325).
  • Agentic planning no longer loops in its plan summary (GML-2324), and Gemini 3 plans at its recommended temperature (GML-2335).
  • The Trace Logs window keeps long content inside it, with Close always visible (GML-2327).
  • Regenerate embeddings no longer loses an embedding while reporting success — a vertex counts as regenerated only when its embedding is saved (GML-2345).

Removed

  • The tg_run_query and tg_get_neighbors agent tools — custom planner or agent prompts that name them should drop them (GML-2332).

Dependencies

  • openai is held at >=2.45,<3 (was >=1.92.2); 3.14.1 and later break Regenerate embeddings (GML-2345). The MCP SDK stays below 2 (GML-2326).

Verification

Unit suite: 535 passed, 41 skipped, 0 failed (stale tests fixed in GML-2333). Live against a TigerGraph instance with gpt-5.4-mini and gemini-3.5-flash: multi-turn conversation tests in planned and reactive mode, and structured-query checks in planned, reactive and classic mode.

See CHANGELOG.md [2.0.4] for full details.

- Ask for one short sentence in the plan summary and step reasons, and
  shorten an overlong value instead of failing the plan
- Cap the planner's output tokens, with a new planner_max_output_tokens
  setting and a higher floor for reasoning models

Refs: GML-2324
- Planner and reactive agent decide first whether the conversation answers
  the question fully, partly, or not at all, and retrieve only what is missing
- Questions about the current or latest state still retrieve
- Answer step reads the recent conversation alongside retrieved context
- Planner and reactive agent see the most recent turns, not the oldest
- Trace Logs mark a plan that answers without retrieval

Refs: GML-2325
- Keep the MCP SDK below version 2, whose client API the add-on support does not use yet

Refs: GML-2326
- Planner and reactive agent compare each fact the question asks for with the conversation
- In planned mode, a plan without retrieval gets a second check
- A question the conversation does not fully answer is looked up instead

Refs: GML-2325
… rows

- Structured query steps show the query that ran, plus failed or empty attempts
- A structured query that returns no rows no longer counts as data
- A valid openCypher query with no rows is not regenerated

Refs: GML-2327
- Trace log of a failed answer ends with an Error step that states the error
- Chat error message asks to rephrase the question, not the prompt

Refs: GML-2328
- Structured queries go straight to openCypher when no functions are registered
- A question that names no relationships no longer fails the function step

Refs: GML-2327
- Drop the agent tools that ran self-written GSQL and neighbor expansion
- GraphRAG code reaches TigerGraph only through pyTigerGraph

Refs: GML-2332
- Planner gets a compact schema summary to decide on structural retrieval
- The summary is cached per graph and refreshed when the schema changes

Refs: GML-2331
- Classic and agentic engines judge a query result empty the same way
- An empty result returned as JSON text counts as no rows in the classic engine

Refs: GML-2327
- Connection tests no longer leave mocked modules behind for later tests
- Tests follow per-user sign-in, three-part role lookup and masked secrets
- Extractor tests use the schema-based extractor setup
- LLM regression tests are skipped cleanly outside a git checkout

Refs: GML-2333
- README describes schema-based planning and what Trace Logs record
- CHANGELOG entries describe behavior without diagnostic detail
- Bump the version to 2.0.4
- Add the 2.0.4 entry to the README release list
- A plan summary or step reason that repeats a few characters in place is cut where the repeat starts

Refs: GML-2324
- Gemini 3 planning, conversation check and triage use temperature 1.0 when the configured value is lower
- Answers, knowledge graph building and other models keep the configured temperature

Refs: GML-2335
- An earlier answer that says the information was not found, hedges, or is incomplete is retrieved again
- Trace Logs list dropped plan steps and show the fallback retrieval
- The fallback retrieval queries the graph as well as the documents

Refs: GML-2325
…orrectly

- A code block labelled opencypher or cypher no longer leaves the label in the query
- Generated queries run in interpreted mode through pyTigerGraph, not the GSQL shell
- Trace Logs show only the generated query, without the graph wrapper

Refs: GML-2336
- A query that fails TigerGraph's check is not run; its errors go back to the generator
- Up to 10 attempts (configurable), stopping early when the generator repeats itself
- The generator uses TigerGraph's date functions, and queries that change data are rejected

Refs: GML-2336
- Long unbroken lines in step input and output wrap inside the window
- Download and Close stay visible at the bottom of the window

Refs: GML-2327
- Answers without supporting information ask the user to rephrase with more specific information or scope
- Fixed no-answer messages share one wording and no longer name internal steps

Refs: GML-2328
- The planner reviews the conversation before planning and records the review in the plan
- A plan without retrieval is used only when the review backs it; otherwise one replan, then the fallback retrieval
- Plans must include their steps, so a plan can no longer come back empty
- The separate conversation check is removed

Refs: GML-2325
- Each request is recorded by its audit entry only; entry and HTTP client lines are at DEBUG
- The web server's per-request access log is off

Refs: GML-2337
- CHANGELOG entries state what changed since 2.0.3, not where problems were found

Refs: GML-2323
- Structured query summaries give the row and character count, like document searches

Refs: GML-2327
@chengbiao-jin

Copy link
Copy Markdown
Collaborator Author

@prinskumar-tigergraph please review the planner changes specifically for gemini-3.x

- Schema given to query generation marks NULLABLE attributes
- Generated queries use IS NULL only on NULLABLE attributes and compare
  other attributes with the default of their type
- A query that fails to run because of a null test gets a rewrite hint
- String comparisons lowercase both the attribute and the literal

Refs: GML-2341
- The query a structured step ran is no longer shortened with its rows
  when the step output exceeds the trace size limit

Refs: GML-2327
- The planner reviews its whole context, the conversation and the graph
  schema, before deciding to retrieve
- Questions about the knowledge base itself are answered from the schema
- The planner names the context and earlier turns the answer uses
- An earlier answer is not reused for a question about the current state
- The planner's schema names the graph the chat uses

Refs: GML-2325
- Generated queries avoid combining a string match with OPTIONAL MATCH,
  CASE or a null test
- A run error from such a combination names the construct to remove
- Query generation stops when TigerGraph returns the same error three
  times in a row

Refs: GML-2341

@prinskumar-tigergraph prinskumar-tigergraph left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good for merge

- The planner's schema refreshes when a type description changes, not
  only when the schema changes
- Query generation uses the current type descriptions on every query

Refs: GML-2331
- Hold the OpenAI client below version 3
- Count a regenerated vertex only when its embedding is saved

Refs: GML-2345

@prinskumar-tigergraph prinskumar-tigergraph left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approved

- Changelog entries state each problem and change, with ticket keys
- Code comments name the constraint and the ticket instead of the cause

Refs: GML-2323
Keys from the private tracker gave outside readers nothing to follow.

- Changelog entries and code comments stand on their own
- The openai version limit is marked as temporary, with its follow-up

Refs: GML-2323
@chengbiao-jin
chengbiao-jin merged commit ba5f13c into main Oct 21, 2026
1 check failed
@chengbiao-jin
chengbiao-jin deleted the release_2.0.4 branch October 21, 2026 23:11
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.

2 participants