docs(genai-tools): rewrite GraphRAG-SDK page for v1.1.x API#479
Conversation
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>
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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>
There was a problem hiding this comment.
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/LiteLLMEmbedderflow (ingest → finalize → completion). - Added new sections documenting optional schema definition (
GraphSchema/EntityType/RelationType) and incremental updates (apply_changes, plus cost model guidance forfinalize()). - 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.
| 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. |
Summary
The
/genai-tools/graphrag-sdk.htmlpage described a pre-1.0 SDK API —KnowledgeGraph,Ontology.from_kg_graph,LiteModel,KnowledgeGraphModelConfig,kg.chat_session(),chat.send_message()— none of which exist ingraphrag-sdk>=1.0.0. Anyone copy-pasting the Quick Start hitsImportErroron 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
GraphRAGcontext manager built fromConnectionConfig+LiteLLM+LiteLLMEmbedder;ingest(text=..., document_id=...)→finalize()→completion()flowGraphSchemawithEntityType/RelationTypeand the patterns argument on relationsupdate()/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)finalize()so users don't call it per-file in CI loopsgraph_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:
GraphRAG,ConnectionConfig,LiteLLM,LiteLLMEmbedder,GraphSchema,EntityType,RelationTypegraphrag_sdkGraphRAG.__aenter__GraphRAG.ingest(text=..., document_id=...)GraphRAG.completion(question=..., return_context=...) -> RagResultGraphRAG.finalize()IngestionResult.nodes_created,.relationships_created,.chunks_indexedRagResult.answerGraphSchema(entities=..., relations=...)RelationType(label=, description=, patterns=)ConnectionConfig(host, port, username, password, graph_name)Test plan
graphrag-sdk==1.1.1🤖 Generated with Claude Code