Skip to content

docs(genai-tools): rewrite GraphRAG-SDK page for v1.1.x API#479

Merged
galshubeli merged 2 commits into
mainfrom
docs/update-graphrag-sdk-page
May 13, 2026
Merged

docs(genai-tools): rewrite GraphRAG-SDK page for v1.1.x API#479
galshubeli merged 2 commits into
mainfrom
docs/update-graphrag-sdk-page

Conversation

@galshubeli
Copy link
Copy Markdown
Contributor

Summary

The /genai-tools/graphrag-sdk.html page described a pre-1.0 SDK API — KnowledgeGraph, Ontology.from_kg_graph, LiteModel, KnowledgeGraphModelConfig, kg.chat_session(), chat.send_message() — none of which exist in graphrag-sdk>=1.0.0. Anyone copy-pasting the Quick Start hits ImportError on the first line.

This PR rewrites the page to mirror the canonical v1.1.x surface as shipped in the SDK README and verified against the installed package (graphrag-sdk==1.1.1).

What changed

  • Quick Start: async GraphRAG context manager built from ConnectionConfig + LiteLLM + LiteLLMEmbedder; ingest(text=..., document_id=...)finalize()completion() flow
  • New section — Define a schema (optional): shows GraphSchema with EntityType/RelationType and the patterns argument on relations
  • New section — Incremental Updates: documents update() / delete_document() / apply_changes() (the headline v1.1.0 feature — same code path that powers the docs-CI workflow merged in ci: incrementally update docs graph on PR merge #478)
  • Cost model note on finalize() so users don't call it per-file in CI loops
  • Updated Key Features and How it works to reflect the actual current pipeline (hybrid retrieval, schema-guided extraction, provenance edges, cited answers, multi-tenant via graph_name)

Frontmatter (title, nav_order, description, redirect_from) preserved.

API surface verified

Imports + signatures in the new example were checked against the installed SDK to avoid the kind of drift the old page suffered from:

Symbol Verified
GraphRAG, ConnectionConfig, LiteLLM, LiteLLMEmbedder, GraphSchema, EntityType, RelationType importable from graphrag_sdk
GraphRAG.__aenter__ exists (async context manager)
GraphRAG.ingest(text=..., document_id=...) param names match
GraphRAG.completion(question=..., return_context=...) -> RagResult signature + return type match
GraphRAG.finalize() exists
IngestionResult.nodes_created, .relationships_created, .chunks_indexed fields exist
RagResult.answer field exists
GraphSchema(entities=..., relations=...) constructor signature matches
RelationType(label=, description=, patterns=) constructor signature matches
ConnectionConfig(host, port, username, password, graph_name) constructor signature matches

Test plan

  • All imports/signatures used in code examples verified against installed graphrag-sdk==1.1.1
  • Jekyll build renders correctly (CI)
  • Spot-check the live page once merged

🤖 Generated with Claude Code

The page described a pre-1.0 API (``KnowledgeGraph``, ``Ontology.from_kg_graph``,
``LiteModel``, ``KnowledgeGraphModelConfig``, ``kg.chat_session()``,
``chat.send_message()``) that no longer exists in the SDK. Anyone copy-pasting
the Quick Start would get ``ImportError`` on the first line.

Rewrites the page to mirror the canonical v1.1.x surface as documented in
the SDK README, verified against the installed package:

- Async ``GraphRAG`` context manager with ``ConnectionConfig`` / ``LiteLLM``
  / ``LiteLLMEmbedder``
- ``ingest(text=..., document_id=...)`` → ``finalize()`` → ``completion()``
  flow with cited answers
- Optional ``GraphSchema`` with ``EntityType`` / ``RelationType``
- New "Incremental Updates" section covering ``update()`` /
  ``delete_document()`` / ``apply_changes()`` — the headline v1.1.0 feature
  that powers the docs-CI workflow added in #478
- Updated "Key Features" and "How it works" to reflect the actual current
  pipeline (hybrid retrieval, schema-guided extraction, provenance edges)

Frontmatter (title, nav_order, description, redirect_from) preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Warning

Rate limit exceeded

@galshubeli has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 38 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1781159-7321-4ec0-b30b-3b74f6f58069

📥 Commits

Reviewing files that changed from the base of the PR and between 62df1a3 and 23b662a.

📒 Files selected for processing (2)
  • .wordlist.txt
  • genai-tools/graphrag-sdk.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/update-graphrag-sdk-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Spellcheck CI flagged 9 terms introduced by the v1.1.x page rewrite. All
are legitimate technical vocabulary used in the SDK documentation:

- chunkers, embedder — ingestion pipeline components
- cutover, rollforward — crash-safety semantics of update()
- queryable, runnable — descriptors used in feature/example callouts
- Reranking — retrieval pipeline stage
- PRs, SHA — common abbreviations in incremental-updates context

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@galshubeli galshubeli merged commit f7229b8 into main May 13, 2026
8 checks passed
@galshubeli galshubeli deleted the docs/update-graphrag-sdk-page branch May 13, 2026 14:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Rewrites the GraphRAG-SDK documentation page under genai-tools/ to reflect the current graphrag-sdk v1.1.x API (replacing the pre-1.0 API that would cause immediate import/signature errors when copy-pasted).

Changes:

  • Replaced the Quick Start with an async GraphRAG + ConnectionConfig + LiteLLM/LiteLLMEmbedder flow (ingest → finalize → completion).
  • Added new sections documenting optional schema definition (GraphSchema / EntityType / RelationType) and incremental updates (apply_changes, plus cost model guidance for finalize()).
  • Updated the page’s feature/pipeline descriptions and added new spellcheck wordlist entries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
genai-tools/graphrag-sdk.md Replaces outdated SDK API examples and rewrites sections to match the v1.1.x GraphRAG ingestion/query/update workflow.
.wordlist.txt Adds new documentation terms to the spellcheck allowlist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .wordlist.txt
Comment on lines +906 to +914
chunkers
cutover
embedder
PRs
queryable
Reranking
rollforward
runnable
SHA
- **From Schema Graphs**: Import ontologies directly from graph schemas with `Ontology.from_schema_graph()`
- **From JSON**: Load pre-defined ontologies from JSON configurations
### 1️⃣ Ingest documents into a knowledge graph
- **Document loading**: Markdown, plain text, and (with the `pdf` extra) PDF inputs go through structural-aware chunkers.
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.

3 participants