
Description
A long article, a research report, a book chapter — while reading it all makes sense, but once closed you keep only the gist, and who relates to whom or which concept influenced which blurs together. Linear text was never good at holding a web of knowledge.
ai-knowledge-graph turns the text into a graph. Feed in a document and it uses an LLM to extract subject-predicate-object triplets (“steam engine — drove — industrial revolution”), then connects those relationships into an interactive knowledge graph where the links are plain to see. Large documents are chunked and processed separately, then entity names that refer to the same thing across chunks are standardised into one.
It also infers implicit relationships: two nodes not directly adjacent in the source but logically related get a dashed connection — solid edges are extracted directly from the text, dashed ones are inferred, and the two are distinguished at a glance. The output is a single-file interactive HTML page with drag, zoom, community filtering, physics layout and a dark mode; send it to someone and it opens with nothing to install.
It is model-agnostic — any OpenAI-compatible endpoint works: local Ollama, LM Studio or vLLM, or cloud services like OpenAI and Anthropic. Apache 2.0.
SPO triplet extraction: Uses an LLM to identify entities and relationships in text as subject-predicate-object structures, forming the graph’s nodes and edges.
Automatic chunking: Splits large documents into manageable chunks, processes them separately and merges, beyond a single context window.
Entity standardisation: Unifies different spellings of the same thing across chunks into one entity, avoiding duplicate nodes.
Relationship inference: Adds inferred links between logically related but unconnected nodes, shown as dashed edges versus the solid extracted ones.
Interactive HTML output: Produces a single-file interactive page with drag, zoom, physics layout, community filtering and dark mode, shareable with nothing to install.
Any LLM: Works with any OpenAI-compatible endpoint: local Ollama, LM Studio, vLLM, or cloud services like OpenAI and Anthropic.
ai-knowledge-graph turns the text into a graph. Feed in a document and it uses an LLM to extract subject-predicate-object triplets (“steam engine — drove — industrial revolution”), then connects those relationships into an interactive knowledge graph where the links are plain to see. Large documents are chunked and processed separately, then entity names that refer to the same thing across chunks are standardised into one.
It also infers implicit relationships: two nodes not directly adjacent in the source but logically related get a dashed connection — solid edges are extracted directly from the text, dashed ones are inferred, and the two are distinguished at a glance. The output is a single-file interactive HTML page with drag, zoom, community filtering, physics layout and a dark mode; send it to someone and it opens with nothing to install.
It is model-agnostic — any OpenAI-compatible endpoint works: local Ollama, LM Studio or vLLM, or cloud services like OpenAI and Anthropic. Apache 2.0.
Features
SPO triplet extraction: Uses an LLM to identify entities and relationships in text as subject-predicate-object structures, forming the graph’s nodes and edges.
Automatic chunking: Splits large documents into manageable chunks, processes them separately and merges, beyond a single context window.
Entity standardisation: Unifies different spellings of the same thing across chunks into one entity, avoiding duplicate nodes.
Relationship inference: Adds inferred links between logically related but unconnected nodes, shown as dashed edges versus the solid extracted ones.
Interactive HTML output: Produces a single-file interactive page with drag, zoom, physics layout, community filtering and dark mode, shareable with nothing to install.
Any LLM: Works with any OpenAI-compatible endpoint: local Ollama, LM Studio, vLLM, or cloud services like OpenAI and Anthropic.

