Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.
A knowledge base can build a knowledge graph on top of its documents: named
entities and the typed relationships between them, extracted at ingest. Agents
then retrieve over it with GraphRAG - vector search to find relevant
passages, plus multi-hop traversal of the graph to pull in connected facts. That
answers relational questions (“how is X connected to Y?”, “what did X acquire and
who runs it?”) that plain similarity search misses.This builds on ordinary knowledge bases; enable it
per base.
How it works
Create a knowledge base with Build a knowledge graph turned on, and pick
an extraction model (see below).
Add documents. Each is split with hierarchical chunking: small child
chunks are embedded for precise retrieval, and grouped under larger parent
blocks that give the model richer context.
A background graph-worker runs the extraction model over each parent
block and writes the entities, typed relationships, and provenance back to
the chunk each fact came from.
Retrieval matches child chunks by vector, links them to their graph
entities, traverses the typed-edge graph up to two hops, and returns the
parent passages plus the related facts.
Embeddings still come from the self-hosted embedder
(bge-small-en-v1.5); only the entity/relationship extraction uses a chat
model.
The extraction model
Extraction runs on your own model, resolved through the
model gateway: the extraction model is a fully-qualified
name like openrouter/openai/gpt-4o-mini, whose provider prefix must match a
provider you have connected. Its cost lands on your provider connection.
The extraction model is required when the graph is enabled. If a base has no
extraction model, its documents ingest and embed normally but their graph shows
error. A cheap, JSON-reliable model such as openrouter/openai/gpt-4o-mini is
a good default.
The graph inspector
The knowledge base page shows a graph tab once extraction finishes. It lays
the entities out with a force-directed layout so connected entities cluster,
colors them by type, and lets you filter to the neighborhood of a named entity.
Each document also shows a graph: status (pending → ready, or error)
alongside its ingest status.
From an agent
Add a tool with the built-in key graph_search and reference it from an agent
node. At run time the agent calls graph_search(query), which returns relevant
passages plus the entities and typed relationships connected to them:
Passages:- Acme Corporation was founded by Jane Doe in 2010. In 2020 Acme acquired ...Related facts (knowledge graph):- Acme Corporation FOUNDED_BY Jane Doe- Acme Corporation ACQUIRED Beta Analytics- Beta Analytics LED_BY John Smith
Use graph_search instead of (or alongside) knowledge_search when questions
are about how things relate, not just what a passage says.
API
POST /v1/knowledge with "graph_enabled": true and "graph_model": "<fqn>" -
create a graph-enabled base
GET /v1/knowledge/{kb}/graph - the extracted graph (stats, nodes,
edges); optional entity filter and limit
GET /v1/knowledge/{kb}/documents - each document’s graph_status
Multi-tenant and private. The graph is stored in the same Postgres as
everything else, scoped by row-level security to your workspace.
Re-ingesting a document rebuilds its part of the graph; it does not leave
stale entities or edges behind.
Extraction quality depends on the document. Prose rich in named things and
explicit relationships (bios, org policies, contracts, reports) yields dense
graphs; free-form narrative yields sparser ones. Every extracted fact is
grounded in the source text - the extractor is instructed never to invent
relationships.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cruq AI","description":"Build, run, and observe AI agents you own.","colors":{"primary":"#f59e0b","light":"#fbbf24","dark":"#d97706"},"logo":{"light":"https://mintcdn.com/cruq-ai/ogvCfBkVg-mvCgn_/docs/logo/light.png?fit=max\u0026auto=format\u0026n=ogvCfBkVg-mvCgn_\u0026q=85\u0026s=3eaea04689c981d8ced0a69a3a2e0529","dark":"https://mintcdn.com/cruq-ai/ogvCfBkVg-mvCgn_/docs/logo/dark.png?fit=max\u0026auto=format\u0026n=ogvCfBkVg-mvCgn_\u0026q=85\u0026s=3870700a5ab405fc378831264382b1bb","href":"https://cruq.ai"},"favicon":"https://mintcdn.com/cruq-ai/rHCea_HjoEI7_z1y/docs/favicon.png?fit=max\u0026auto=format\u0026n=rHCea_HjoEI7_z1y\u0026q=85\u0026s=3718276ccd65a8486dbee1423978e1e0","navbar":{"primary":{"type":"button","label":"Open app","href":"https://app.cruq.ai"}},"footer":{"socials":{"website":"https://cruq.ai"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cruq-ai","hasAudioNarration":false,"actualSubdomain":"cruq-ai","customDomains":["docs.cruq.ai"],"gitSource":{"type":"github","owner":"cruq-ai","repo":"cruq-ai","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b0549298d7bec1ff56f79a7","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"Concepts","count":17},{"language":"default","tag":"Reference","count":5},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Demos","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"docs/concepts/knowledge-graph","slug":"/docs/concepts/knowledge-graph","pageMetadata":{"title":"Knowledge graphs (GraphRAG)","description":"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.","href":"/docs/concepts/knowledge-graph"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A knowledge base can build a `,_jsx(_components.strong,{children:`knowledge graph`}),` on top of its documents: named\nentities and the typed relationships between them, extracted at ingest. Agents\nthen retrieve over it with `,_jsx(_components.strong,{children:`GraphRAG`}),` - vector search to find relevant\npassages, plus multi-hop traversal of the graph to pull in connected facts. That\nanswers relational questions (“how is X connected to Y?”, “what did X acquire and\nwho runs it?”) that plain similarity search misses.`]}),`\n`,_jsxs(_components.p,{children:[`This builds on ordinary `,_jsx(_components.a,{href:`/docs/concepts/knowledge`,children:`knowledge bases`}),`; enable it\nper base.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Create a knowledge base with `,_jsx(_components.strong,{children:`Build a knowledge graph`}),` turned on, and pick\nan `,_jsx(_components.strong,{children:`extraction model`}),` (see below).`]}),`\n`,_jsxs(_components.li,{children:[`Add documents. Each is split with `,_jsx(_components.strong,{children:`hierarchical chunking`}),`: small child\nchunks are embedded for precise retrieval, and grouped under larger parent\nblocks that give the model richer context.`]}),`\n`,_jsxs(_components.li,{children:[`A background `,_jsx(_components.strong,{children:`graph-worker`}),` runs the extraction model over each parent\nblock and writes the entities, typed relationships, and provenance back to\nthe chunk each fact came from.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Retrieval`}),` matches child chunks by vector, links them to their graph\nentities, traverses the typed-edge graph up to two hops, and returns the\nparent passages plus the related facts.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Embeddings still come from the `,_jsx(_components.a,{href:`/docs/concepts/knowledge`,children:`self-hosted embedder`}),`\n(`,_jsx(_components.code,{children:`bge-small-en-v1.5`}),`); only the entity/relationship extraction uses a chat\nmodel.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-extraction-model`,children:`The extraction model`}),`\n`,_jsxs(_components.p,{children:[`Extraction runs on `,_jsx(_components.strong,{children:`your own model`}),`, resolved through the\n`,_jsx(_components.a,{href:`/docs/concepts/models`,children:`model gateway`}),`: the extraction model is a fully-qualified\nname like `,_jsx(_components.code,{children:`openrouter/openai/gpt-4o-mini`}),`, whose provider prefix must match a\nprovider you have connected. Its cost lands on your provider connection.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The extraction model is `,_jsx(_components.strong,{children:`required`}),` when the graph is enabled. If a base has no\nextraction model, its documents ingest and embed normally but their graph shows\n`,_jsx(_components.code,{children:`error`}),`. A cheap, JSON-reliable model such as `,_jsx(_components.code,{children:`openrouter/openai/gpt-4o-mini`}),` is\na good default.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`the-graph-inspector`,children:`The graph inspector`}),`\n`,_jsxs(_components.p,{children:[`The knowledge base page shows a `,_jsx(_components.strong,{children:`graph tab`}),` once extraction finishes. It lays\nthe entities out with a force-directed layout so connected entities cluster,\ncolors them by type, and lets you filter to the neighborhood of a named entity.\nEach document also shows a `,_jsx(_components.code,{children:`graph:`}),` status (`,_jsx(_components.code,{children:`pending`}),` → `,_jsx(_components.code,{children:`ready`}),`, or `,_jsx(_components.code,{children:`error`}),`)\nalongside its ingest status.`]}),`\n`,_jsx(Heading,{level:`2`,id:`from-an-agent`,children:`From an agent`}),`\n`,_jsxs(_components.p,{children:[`Add a tool with the built-in key `,_jsx(_components.code,{children:`graph_search`}),` and reference it from an agent\nnode. At run time the agent calls `,_jsx(_components.code,{children:`graph_search(query)`}),`, which returns relevant\npassages `,_jsx(_components.strong,{children:`plus`}),` the entities and typed relationships connected to them:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`8`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Passages:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Acme Corporation was founded by Jane Doe in 2010. In 2020 Acme acquired ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Related facts (knowledge graph):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Acme Corporation FOUNDED_BY Jane Doe`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Acme Corporation ACQUIRED Beta Analytics`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Beta Analytics LED_BY John Smith`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`graph_search`}),` instead of (or alongside) `,_jsx(_components.code,{children:`knowledge_search`}),` when questions\nare about how things relate, not just what a passage says.`]}),`\n`,_jsx(Heading,{level:`2`,id:`api`,children:`API`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /v1/knowledge`}),` with `,_jsx(_components.code,{children:`\"graph_enabled\": true`}),` and `,_jsx(_components.code,{children:`\"graph_model\": \"\u003cfqn>\"`}),` -\ncreate a graph-enabled base`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET /v1/knowledge/{kb}/graph`}),` - the extracted graph (`,_jsx(_components.code,{children:`stats`}),`, `,_jsx(_components.code,{children:`nodes`}),`,\n`,_jsx(_components.code,{children:`edges`}),`); optional `,_jsx(_components.code,{children:`entity`}),` filter and `,_jsx(_components.code,{children:`limit`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET /v1/knowledge/{kb}/documents`}),` - each document’s `,_jsx(_components.code,{children:`graph_status`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/docs/api-reference/overview`,children:`API overview`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Multi-tenant and private.`}),` The graph is stored in the same Postgres as\neverything else, scoped by row-level security to your workspace.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Re-ingesting`}),` a document rebuilds its part of the graph; it does not leave\nstale entities or edges behind.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Extraction quality`}),` depends on the document. Prose rich in named things and\nexplicit relationships (bios, org policies, contracts, reports) yields dense\ngraphs; free-form narrative yields sparser ones. Every extracted fact is\ngrounded in the source text - the extractor is instructed never to invent\nrelationships.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Knowledge graphs (GraphRAG)","description":"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.","href":"/docs/concepts/knowledge-graph"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"The extraction model","slug":"the-extraction-model","depth":2,"children":[]},{"title":"The graph inspector","slug":"the-graph-inspector","depth":2,"children":[]},{"title":"From an agent","slug":"from-an-agent","depth":2,"children":[]},{"title":"API","slug":"api","depth":2,"children":[]},{"title":"Notes","slug":"notes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cruq-ai","siteName":"Cruq AI","title":"Knowledge graphs (GraphRAG) - Cruq AI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-25T20:36:42.463Z","originalFileLocation":"docs/concepts/knowledge-graph.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cruq AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Knowledge graphs (GraphRAG) - Cruq AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cruq AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cruq.ai/docs/concepts/knowledge-graph\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cruq-ai.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Knowledge+graphs+%28GraphRAG%29\u0026amp;description=Extract+an+entity-relationship+graph+from+a+knowledge+base+and+retrieve+over+it+with+multi-hop+traversal.\u0026amp;theme=d9ad80ac8d733e7a5d61ad99\u0026amp;signature=db0f6c8dc58d2e210d8671743c74588de8a30002036b8cf05aef1fa0954e95c0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Knowledge graphs (GraphRAG) - Cruq AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cruq-ai.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Knowledge+graphs+%28GraphRAG%29\u0026amp;description=Extract+an+entity-relationship+graph+from+a+knowledge+base+and+retrieve+over+it+with+multi-hop+traversal.\u0026amp;theme=d9ad80ac8d733e7a5d61ad99\u0026amp;signature=db0f6c8dc58d2e210d8671743c74588de8a30002036b8cf05aef1fa0954e95c0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cruq-ai/utorlzCqWbCgkd8u/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cruq AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#f59e0b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cruq.ai/docs/concepts/knowledge-graph\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/concepts/knowledge-graph.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cruq.ai/#organization\",\"name\":\"Cruq AI\",\"url\":\"https://docs.cruq.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cruq-ai/ogvCfBkVg-mvCgn_/docs/logo/light.png?fit=max\u0026auto=format\u0026n=ogvCfBkVg-mvCgn_\u0026q=85\u0026s=3eaea04689c981d8ced0a69a3a2e0529\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cruq.ai#website\",\"name\":\"Cruq AI\",\"url\":\"https://docs.cruq.ai\",\"publisher\":{\"@id\":\"https://docs.cruq.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph#webpage\",\"url\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph\",\"name\":\"Knowledge graphs (GraphRAG)\",\"description\":\"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.\",\"dateModified\":\"2026-08-25T20:36:42.463Z\",\"isPartOf\":{\"@id\":\"https://docs.cruq.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Concepts\",\"item\":\"https://docs.cruq.ai/docs/concepts/agents\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge graphs (GraphRAG)\",\"item\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph#article\",\"headline\":\"Knowledge graphs (GraphRAG)\",\"name\":\"Knowledge graphs (GraphRAG)\",\"description\":\"Extract an entity-relationship graph from a knowledge base and retrieve over it with multi-hop traversal.\",\"url\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cruq.ai/docs/concepts/knowledge-graph#webpage\"},\"dateModified\":\"2026-08-25T20:36:42.463Z\",\"publisher\":{\"@id\":\"https://docs.cruq.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cruq.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cruq AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cruq AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/concepts/knowledge-graph.md","siteName":"Cruq AI","nav":{"global":null,"groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/docs/introduction"},{"title":"Quickstart","href":"/docs/quickstart"},{"title":"What's new","href":"/docs/changelog"}]},{"group":"Demos","pages":[{"title":"Demo: cold-chain operations","href":"/docs/demos/cold-chain"}]},{"group":"Concepts","pages":[{"title":"Agents","href":"/docs/concepts/agents"},{"title":"Agent Builder","href":"/docs/concepts/agent-builder"},{"title":"Browser","href":"/docs/concepts/browser"},{"title":"Code mode","href":"/docs/concepts/code-mode"},{"title":"Long-running agents","href":"/docs/concepts/long-running-agents"},{"title":"Voice agents","href":"/docs/concepts/voice"},{"title":"Models \u0026 providers","href":"/docs/concepts/models"},{"title":"Prompt caching","href":"/docs/concepts/prompt-caching"},{"title":"Knowledge (RAG)","description":"Knowledge bases with self-hosted embeddings and pgvector retrieval.","href":"/docs/concepts/knowledge"},{"title":"Knowledge graphs (GraphRAG)","href":"/docs/concepts/knowledge-graph"},{"title":"Memory","description":"Long-term facts recalled semantically across threads.","href":"/docs/concepts/memory"},{"title":"Skills \u0026 schedules","href":"/docs/concepts/skills-schedules"},{"title":"Integrations \u0026 channels","href":"/docs/concepts/integrations"},{"title":"Guardrails \u0026 Prompts","href":"/docs/concepts/guardrails-prompts"},{"title":"Evals","href":"/docs/concepts/evals"},{"title":"Observability","href":"/docs/concepts/observability"},{"title":"OpenTelemetry","href":"/docs/concepts/opentelemetry"}]},{"group":"Reference","pages":[{"title":"CLI","href":"/docs/cli"},{"title":"API Overview","href":"/docs/api-reference/overview"},{"title":"MCP server","href":"/docs/mcp"},{"title":"OAuth 2.0","href":"/docs/oauth"},{"title":"Plans \u0026 limits","href":"/docs/plans"}]}]},"basePath":"","title":"Knowledge graphs (GraphRAG) - Cruq AI","deploymentId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","buildId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","dynamics":[],"chunks":[]}