Repolode
robert-mcdermott

robert-mcdermott/ai-knowledge-graph

Turns unstructured text into an interactive knowledge graph by using an LLM to extract subject-predicate-object triples.

Stars
3,124
Forks
434
Open issues
8
Last commit
last month

What is it?

AI Knowledge Graph Generator takes text documents such as .txt, .md, .pdf and .docx files and uses an LLM to extract Subject-Predicate-Object triples with entity types. The triples are merged, standardized and optionally enriched with inferred relationships, then rendered as a single self-contained interactive HTML page with search, communities, a path finder and a relationships panel that shows the source sentence for each extracted edge.

The tool works with any OpenAI-compatible endpoint, including local models through Ollama, LM Studio or vLLM, and hosted services such as OpenAI and Gemini. Results can also be exported as JSON, CSV, GraphML for Gephi, Cytoscape or yEd, and a Cypher script for Neo4j.

Optional commands let you ask questions of a generated graph with cited answers (graph-chat) or browse and build graphs from a local web interface (graph-serve). Sample graphs are included so the explorer can be tried without an LLM.

Key features

  • 01Extracts typed Subject-Predicate-Object triples from .txt, .md, .rst, .pdf and .docx inputs
  • 02Standardizes entity name variants and optionally uses an LLM to merge the rest
  • 03Infers extra relationships, marking each inferred edge with its method
  • 04Exports to JSON, CSV, GraphML and Neo4j Cypher
  • 05Produces a self-contained interactive HTML explorer with search, communities and path finding
  • 06Works with any OpenAI-compatible LLM endpoint and caches responses on disk

Use cases

  • Turning meeting notes, research papers or long reports into a visual map of entities and relationships
  • Exploring the structure of a biography, historical period or supply chain from a text corpus
  • Loading extracted triples into Neo4j or Gephi for further analysis
  • Running entity extraction with a local model so the source text stays on your machine

Topics

FAQ

What is ai-knowledge-graph?
Turns unstructured text into an interactive knowledge graph by using an LLM to extract subject-predicate-object triples. AI Knowledge Graph Generator takes text documents such as .txt, .md, .pdf and .docx files and uses an LLM to extract Subject-Predicate-Object triples with entity types. The triples are merged, standardized and optionally enriched with inferred relationships, then rendered as a single self-contained interactive HTML page with search, communities, a path finder and a relationships panel that shows the source sentence for each extracted edge.
Is ai-knowledge-graph free to use? What license does it have?
ai-knowledge-graph is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is ai-knowledge-graph still maintained?
Updated within 6 months. The last commit to ai-knowledge-graph was on Sep 13, 2026.
What can I use ai-knowledge-graph for?
Turning meeting notes, research papers or long reports into a visual map of entities and relationships Exploring the structure of a biography, historical period or supply chain from a text corpus Loading extracted triples into Neo4j or Gephi for further analysis Running entity extraction with a local model so the source text stays on your machine
Where can I get ai-knowledge-graph?
The source code and installation instructions are on GitHub: https://github.com/robert-mcdermott/ai-knowledge-graph

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects