LLM knowledge graph databases

holds a wide lead for building knowledge graphs from unstructured text for LLM querying.

It depends

For ontology-free extraction, its answer points to instead.

Since Jul 5Updated Nov 7, 2026Based on 149 AI answersReviewed by

How we measure

Brands AI mentions

#BrandMentioned in
#1Neo4j90%

Neo4j pairs GraphRAG with graph capabilities, hybrid retrieval, and LLM integration.

Mentioned in, on ChatGPT and Google AI Mode

Questions and answers

  • Google AI ModeNov 3, 2026

    1. 1Neo4j
    2. 2Apache Jena
    3. 3GraphDB
    4. 4NebulaGraph
    5. 5NetworkX
    6. 6LangChain
    7. 7GraphCypherQAChain
    8. 8LlamaIndex
    9. 9Graphiti

    To build a knowledge graph (KG) that an LLM can effectively query, you need a setup that translates natural language into structured queries (like SPARQL or Cypher) or uses vector embeddings for hybrid semantic/symbolic retrieval.

    Here is a structured architectural blueprint and toolchain to set this up:

    1. Choose Your Graph Backend

    • Neo4j : Excellent for property graphs. It supports Cypher and has native integrations like Neo4j GraphRAG for LLMs.
    • Apache Jena / GraphDB : Best if you need semantic web standards (RDF, OWL, and SPARQL).
    • NebulaGraph : Built for massive, high-concurrency distributed graph storage.
    • NetworkX (Python) : Great for lightweight, in-memory graphs during prototyping or local development.

    2. The LLM Integration Architecture

    To let an LLM query the graph, use one of these two common patterns:

    • Text-to-Query (GraphRAG) : The LLM takes a user prompt, writes a query (e.g., Cypher or SPARQL), executes it against the database, and summarizes the JSON/tabular results.
    • Vector + Graph Hybrid : Store entity descriptions and relationship chunks in a vector database alongside the structural graph, or use a graph database with vector embedding capabilities (like Neo4j's vector index) to find starting nodes via semantic similarity before traversing edges.

    3. Recommended Tools & Frameworks

    • LangChain : Provides built-in chains like GraphCypherQAChain which automatically converts natural language to Cypher queries for Neo4j.
    • LlamaIndex : Offers robust abstractions for constructing knowledge graphs from raw documents and querying them using property graph indices.
    • Graphiti (or similar dynamic memory layers): Useful if you need a temporal knowledge graph that updates dynamically as the LLM interacts.

    4. Implementation Steps

    1. Define Schema : Outline your node types (e.g., Person, Organization, Concept ) and relationship types (e.g., WORKS_FOR, RELATED_TO).
    2. Populate the Graph : Extract entities and relations from your source text using an LLM extractor or NLP pipeline, then ingest them into your chosen database.
    3. Connect the LLM : Use an agentic framework (like LangChain or LlamaIndex) with a validated prompt template so the LLM understands the exact schema names before attempting to write queries.

    If you'd like to dive deeper, let me know:

    • What kind of data or documents are you pulling from?
    • Do you prefer a property graph (like Neo4j) or an RDF/Semantic Web (SPARQL) approach?
    • Are you building this locally in Python or deploying to a production cloud environment?

    ChatGPTNov 3, 2026

    1. 1Neo4j
    2. 2Amazon Neptune
    3. 3AWS
    4. 4FalkorDB
    5. 5Stardog
    6. 6LlamaIndex
    7. 7LangChain

    If you need a knowledge graph that can be queried by a Large Language Model (LLM), I recommend building a GraphRAG architecture.

    The idea is to give your LLM access to structured knowledge, relationships, and context rather than relying exclusively on vector similarity search.

    A good architecture combines:

    1. Knowledge graph – stores entities, relationships, attributes, and facts.
    2. Vector database – stores embeddings for semantic retrieval.
    3. LLM – translates natural-language questions into graph queries and synthesizes answers.
    4. Retrieval layer – retrieves relevant graph substructures and supporting documents.
    5. API layer – exposes the graph to an LLM through tools or function calling.

    1. Recommended architecture

    User question

    "How does System A depend on System B?"

    LLM / Agent

    Understands intent and generates a query

    GraphRAG retrieval layer

    Text-to-Cypher / Text-to-SPARQL / hybrid retrieval

    Knowledge graph

    Entities, edges, properties

    Vector database

    Embeddings, documents, chunks

    Grounded LLM response

    Answer with retrieved facts and provenance

    2. Technology options

    These are the platforms I would evaluate.

    • A Knowledge Graph of Music Brand Partnerships with Neo4j — Shep Bryan

    1. Neo4j — Best general-purpose choice

    (My recommendation)

    • Property graph database.
    • Cypher query language.
    • Vector and full-text search.
    • Strong Python and LLM integrations.
    • Supports natural-language-to-Cypher querying.

    Website ·


    • Uncover hidden connections in unstructured financial data with Amazon Bedrock and Amazon Neptune | Artificial Intelligence

    2. Amazon Neptune — Best AWS-managed option

    • Managed graph database.
    • Supports RDF/SPARQL and property graph approaches.
    • Integrates with AWS Bedrock.
    • Managed GraphRAG capabilities.

    Website ·


    • Travel Planning - AG2

    3. FalkorDB — Lightweight graph infrastructure

    • Graph database designed for low-latency applications.
    • Cypher-compatible querying.
    • Useful for AI agents and graph-based retrieval.

    Website


    • How AI Uses Stardog | Stardog

    4. Stardog — Best for semantic enterprise knowledge

    • RDF knowledge graphs.
    • Ontologies and semantic reasoning.
    • SPARQL querying.
    • Useful for complex enterprise data integration.

    Website

    AWS also offers an open-source GraphRAG toolkit that supports Neo4j, Neptune, and FalkorDB as graph stores.

    3. How the LLM queries the graph

    For example, suppose your graph contains:

    (Person: John)
        |
        | WORKS_FOR
        v
    (Company: Acme)
        |
        | OWNS
        v
    (System: ERP)
        |
        | DEPENDS_ON
        v
    (System: PostgreSQL)

    The user asks:

    "Which systems does Acme depend on?"

    The LLM can generate a Cypher query:

    cypher
    MATCH (c:Company {name: "Acme"})
          -[:OWNS]->(s:System)
          -[:DEPENDS_ON*1..3]->(dependency)
    RETURN DISTINCT dependency.name;

    The graph returns the actual connected systems. The LLM then explains the results in natural language.

    This is called Text-to-Cypher. Another option is GraphRAG, which retrieves relevant entities, relationships, and source documents before generating the answer.

    4. My recommended implementation stack

    For a flexible, self-hosted solution:

    ComponentTechnology
    Graph databaseNeo4j
    Graph queryCypher
    EmbeddingsOpenAI embeddings
    Vector searchNeo4j vector index
    Graph constructionPython + LLM extraction
    RAG frameworkLlamaIndex or LangChain
    LLMGPT models
    Agent interfaceMCP or REST API
    FrontendWeb application

    One important consideration: Microsoft's original GraphRAG project is currently described as being in maintenance mode. I would evaluate its methodology, but not automatically make it the foundation of a new production system.

    5. Let's establish what you actually need

    There are several different types of knowledge graphs, and the right architecture depends on your data and querying requirements.

    1. What is the primary purpose?

    Enterprise knowledge graph (business, systems, processes, people)

    Technical knowledge graph (software, infrastructure, architecture, dependencies)

    Research knowledge graph (papers, concepts, citations, discoveries)

    Personal knowledge management

    General-purpose knowledge graph


    2. Where does the knowledge come from?

    PDFs, Word documents, and text files

    SQL databases and enterprise systems

    APIs and external data sources

    A combination of all these sources

    Manually curated knowledge and structured data


    3. Where should it run?

    Self-hosted / on-premises

    Cloud-hosted

    Hybrid

    Fully managed SaaS


    4. How should the LLM query it?

    Natural language questions only

    Generate and execute Cypher/SPARQL queries

    Autonomous AI agents using graph tools

    All of the above


    5. Expected size

    Small — under 100,000 entities

    Medium — 100,000 to 10 million entities

    Large — 10 million to 1 billion entities

    Not yet determined

    [Design my knowledge graph architecture]

    With these answers, I can develop a concrete architecture, including the graph schema, ingestion pipeline, database selection, LLM integration, and working Python implementation.

  • Google AI ModeOct 5, 2026

    1. 1Neo4j LLM Knowledge Graph Builder
    2. 2Neo4j
    3. 3Gemini
    4. 4LangChain
    5. 5LightRAG
    6. 6Microsoft GraphRAG

    When building a knowledge graph from unstructured text without a rigid, pre-defined schema, modern Large Language Model (LLM) pipelines let the extraction model dynamically discover entities and relationships on the fly.

    Top options for schema-free or dynamic-schema text extraction vary from turn-key developer tools to lightweight open-source indexing frameworks:

    • Neo4j LLM Knowledge Graph Builder is a popular open-source web application and framework. It ingests raw PDFs, documents, web pages, or transcripts and uses an LLM (OpenAI, Gemini, Claude, Llama) to dynamically extract entities and relationships directly into a Neo4j instance without demanding a strict upfront ontology.
    • LangChain LLM Graph Transformer provides programmatic primitives (LLMGraphTransformer ) in Python/JS. You pass it unstructured text documents and an LLM, and it automatically parses out nodes and triplets. While you can optionally pass allowed node/relationship types to restrict output, leaving them open allows the model to induce the schema dynamically from the text.
    • LightRAG is an emerging open-source RAG framework that treats a schema-free entity-relationship graph as the core indexing mechanism for raw text. Rather than forcing you to define categories beforehand, it automatically extracts entities, relationships, and dual-level retrieval structures directly from incoming documents on ingestion.
    • Microsoft GraphRAG uses a multi-stage LLM pipeline that reads unstructured text and first builds a comprehensive, schema-free knowledge graph via an automated extraction prompt, subsequently grouping elements into communities for holistic reasoning.

    If you want to narrow this down, tell me:

    • Are you looking for a Python library / code framework or a hosted/UI application?
    • What is your target database or storage (e.g., Neo4j, relational SQL, or file-based)?

    I can point you to the exact code snippet or setup guide for your stack.

    ChatGPTOct 5, 2026

    1. 1Neo4j
    2. 2Graphiti

    Yes. The strongest match I found is Neo4j LLM Knowledge Graph Builder.

    Best matches

    ToolSchema required?Unstructured textBest for
    Neo4j LLM Graph BuilderNo — schema is optional; it can infer entities/relationshipsPDFs, DOCX, TXT, web pages, YouTube, etc.Easiest ready-to-use solution
    GraphitiNo upfront ontology requiredDocuments, conversations, events, agent memoryDevelopers building a continuously evolving/temporal KG
    Knowledge Graph FoundryNo — explicitly discovers the ontologyPDF, DOCX, TXT, MD, JSON, CSV, XLSXSimple CLI/self-hosted pipeline

    1. Neo4j LLM Knowledge Graph Builder — my first choice

    This is almost exactly your requirement. You feed it unstructured sources and the LLM extracts entities, relationships, and properties; defining a schema is explicitly optional. Neo4j also has an experimental automatic-schema capability that can infer the schema using an LLM.

    It supports PDFs, documents, web pages, YouTube transcripts, and other sources, and stores the resulting graph in Neo4j.

    One caveat: completely schema-free extraction can produce a very large number of entity/relationship types. Neo4j itself recommends schema guidance for highly constrained production graphs, although its automatic consolidation can reduce the proliferation of types afterward.

    Good choice if: you want to upload documents and visually inspect the automatically generated graph without building the extraction pipeline yourself.

    2.

    Graphiti is more of a developer framework than a turnkey UI. Its strength is building dynamic/temporal knowledge graphs from continuously arriving information—particularly useful for agent memory, conversations, and changing facts. It supports Neo4j and other graph backends.

    Good choice if: you're embedding the KG into an application rather than just uploading a document corpus.

    3. Knowledge Graph Foundry

    This is an interesting newer CLI option. Its documentation explicitly says “No predefined schema required” and that it discovers the ontology from your data, while still allowing you to seed a schema later. It accepts common document formats and produces a Neo4j graph with provenance.

    Good choice if: you want a lightweight, code/CLI-oriented alternative to Neo4j's UI.

    My recommendation

    If your requirement is literally:

    “Give it arbitrary documents → automatically discover what entities and relationships exist → produce a knowledge graph without me designing an ontology first.”

    I'd start with Neo4j LLM Knowledge Graph Builder. It is the most mature and turnkey fit I found.

    If you tell me whether you want (a) a hosted SaaS, (b) open-source/self-hosted, or (c) a Python/API library, I can narrow this down to the best 3–5 options and compare schema discovery, entity resolution, provenance, temporal support, LLM requirements, and cost.

  • ChatGPTNov 1, 2026

    1. 1Neo4j
    2. 2Cognee
    3. 3Microsoft GraphRAG
    4. 4LlamaIndex
    5. 5LangChain
    6. 6Neo4j LLM Knowledge Graph Builder

    As of November 2026, my top recommendation is Neo4j, specifically its Document Intelligence / Knowledge Graph Builder capabilities.

    It is particularly well suited to automatically extracting entities, relationships, and properties from unstructured text and turning them into an explorable, queryable knowledge graph.

    However, there are several strong alternatives depending on whether you want a no-code tool, an open-source framework, or an enterprise solution.

    Top 5 tools compared

    • Build Real-Time Knowledge Graph For Documents with LLM | CocoIndex

    1. Neo4j

    (Best overall)

    • Automatic entity and relationship extraction.
    • Document ingestion from PDF, DOCX, TXT, Markdown and EPUB.
    • Graph visualization and entity resolution.
    • Supports GraphRAG.

    Best for: Production-ready knowledge graphs and enterprise applications.

    Official website ·


    • How to Give Your AI Agent a Knowledge Graph Memory with Cognee

    2. Cognee

    (Best for automated extraction)

    • Extracts entities and relationships automatically.
    • Builds and maintains knowledge graphs.
    • Supports ontology generation.
    • Designed for AI memory and RAG applications.

    Best for: Automating knowledge graph construction with minimal manual schema design.

    Official website


    • Welcome - GraphRAG

    3. Microsoft GraphRAG

    • Extracts entities and relationships from documents.
    • Builds graph communities and summaries.
    • Supports complex, multi-hop question answering.

    Best for: Large document collections and advanced knowledge discovery.

    GitHub repository


    • LLM knowledge graph builder—First release of 2025

    4. LlamaIndex

    • PropertyGraphIndex for knowledge graph construction.
    • LLM-based entity and relationship extraction.
    • Multiple graph database integrations.
    • Flexible retrieval pipelines.

    Best for: Developers building custom knowledge graph and RAG applications.

    Official website


    • Building Knowledge Graphs with LLM Graph Transformer

    5. LangChain

    • LLMGraphTransformer extracts nodes and relationships.
    • Supports custom entity types and relationship schemas.
    • Integrates with Neo4j.

    Best for: Developers who want control over extraction logic.

    Official website

    Sources:

    Quick comparison

    ToolAutomatic extractionNo-code optionBest use
    Neo4jYesYesEnterprise KG
    CogneeYesMore developer-orientedAutomated KG
    Microsoft GraphRAGYesNoDocument discovery
    LlamaIndexYesNoCustom RAG
    LangChainYesNoCustom extraction

    My recommendation

    I'd narrow the choice to three:

    • Neo4j: If you want to upload documents and get a visual knowledge graph.
    • Cognee: If you want automatic knowledge graph generation, ontology discovery, and ongoing knowledge management.
    • Microsoft GraphRAG: If you want to discover hidden connections across large collections of documents.

    One important distinction: extracting entities and relationships is only the first step. A good system should also support entity deduplication, relationship validation, source-document traceability, and incremental updates.

    One question to narrow down the best tool

    What is your primary objective?

    1. What do you want to accomplish?

    Upload documents and automatically generate a visual knowledge graph

    Extract entities and relationships from millions of documents

    Build a knowledge graph for AI agents and RAG

    Discover hidden connections across documents


    2. What kind of input data?

    PDFs, Word documents and text files

    Websites, articles and research papers

    Emails, conversations and transcripts

    Mixed data sources


    3. Preferred implementation?

    No-code / low-code

    Python / open-source

    Enterprise / managed platform

    No preference

    [Find my best-fit tool]

    Google AI ModeNov 1, 2026

    1. 1Microsoft GraphRAG
    2. 2LlamaIndex
    3. 3Neo4j
    4. 4Neo4j Bloom
    5. 5spaCy
    6. 6scispaCy
    7. 7Relik

    There isn't a single "one-size-fits-all" tool, but rather a few powerhouse frameworks depending on whether you want an out-of-the-box pipeline or a developer-friendly framework powered by Large Language Models (LLMs).

    The industry standards for extracting entities and relationships from unstructured text to build knowledge graphs fall into these top categories:

    1. Microsoft GraphRAG — Best out-of-the-box for deep, holistic extraction
      • How it works: It uses an LLM to automatically parse unstructured text into "TextUnits," extract entities, relationships, and key claims, and then runs hierarchical graph clustering (using the Leiden technique) to generate community summaries.
      • Why it's great: Unlike basic extraction tools that just map A-to-B relationships, Microsoft GraphRAG structures the data hierarchically so you can query high-level thematic questions across massive document sets, not just localized keyword lookups.
    2. LlamaIndex (Knowledge Graph Index) — Best for Python developers building custom RAG pipelines
      • How it works: LlamaIndex provides native abstractions (KnowledgeGraphIndex ) that ingest unstructured documents, slice them, prompt an LLM to extract the triple elements (subject, predicate, object), and store them directly into a graph backend (like Neo4j, FalkorDB, or NetworkX).
      • Why it's great: Highly modular. You can swap out your LLM provider, customize the custom extraction prompts, and choose your preferred graph database destination with minimal boilerplate code.
    3. Neo4j GraphRAG Ecosystem & Python Driver — Best for enterprise storage and visualization
      • How it works: Neo4j provides native pipelines and developer tools that interface with LLMs (via LangChain or their own APOC procedures) to extract entities/relationships and persist them into the Neo4j Graph Database.
      • Why it's great: Once the data is extracted, you get the industry's gold standard graph storage engine, powerful Cypher querying, and enterprise-grade visualization tools (like Neo4j Bloom/Workspace) to actually explore the resulting graph.
    4. spaCy + Scispacy / Relik — Best traditional NLP (Non-LLM) approach
      • How it works: Uses lighter, localized Named Entity Recognition (NER) models and relation extraction pipelines rather than expensive generative LLMs.
      • Why it's great: If you have millions of documents, strict data privacy needs, or a tight budget, running spaCy pipelines is deterministic, lightning-fast, and doesn't require API calls to external LLMs (though it lacks the deep semantic reasoning of an LLM).

    To help narrow down the ideal choice for your project, tell me:

    • What is the approximate scale and format of your unstructured text (e.g., a few PDFs vs. terabytes of data)?
    • Do you prefer a fully automated Python code framework (like LlamaIndex) or a standalone tool/database (like Neo4j)?
  • Google AI ModeSep 25, 2026

    1. 1Neo4j
    2. 2LangChain
    3. 3LlamaIndex
    4. 4FalkorDB
    5. 5OpenAI
    6. 6Anthropic

    For building and querying a knowledge graph (KG) from unstructured text using an LLM, the gold-standard combination in the industry is Neo4j as the graph database, paired with LangChain or LlamaIndex as the LLM orchestration/integration frameworks.

    1. The Best Graph Database: Neo4j

    • Why it wins: Neo4j is the most mature, widely adopted graph database and has heavily invested in the GenAI/LLM ecosystem. It supports native vector indexing alongside property graphs, meaning you can do hybrid searches (combining vector similarity with traditional graph traversals—often called GraphRAG).
    • Key features for LLMs:
      • Cypher Query Language: Highly expressive language for pattern matching that LLMs can easily learn to generate from natural language.
      • Neo4j Aura: Fully managed cloud tier that removes infrastructure overhead for prototyping.
    • Alternative worth mentioning: FalkorDB (built on GraphBLAS/Redis) is exceptionally fast for in-memory traversal workloads if ultra-low latency is your primary constraint.

    2. The Best LLM Integration Frameworks: LlamaIndex or LangChain

    You don’t write raw API calls to parse text into a graph anymore; orchestration frameworks handle the text-splitting, entity extraction, and graph injection pipeline for you.

    • LlamaIndex (Best for Knowledge Graph Construction & Retrieval):
      • Why choose it: LlamaIndex has built-in KnowledgeGraphIndex abstractions specifically designed to ingest unstructured text, use an LLM to extract entities and relationships, and automatically structure them directly into Neo4j. It excels at data-centric operations and advanced GraphRAG indexing.
    • LangChain (Best for Agentic Workflows & Cypher Generation):
      • Why choose it: LangChain provides robust GraphCypherQAChain tools that allow an LLM to dynamically translate a user's natural language question into a Cypher query, execute it against Neo4j, and synthesize an answer. It shines if you want to build conversational agents over your graph.

    Recommended Architecture Stack

    1. Ingestion & Extraction: Use LlamaIndex with your choice of LLM (e.g., OpenAI, Anthropic, or a strong local model via Ollama) to parse and extract triplets (Entity) -> [RELATIONSHIP] -> (Entity) from your raw documents.
    2. Storage: Persist those nodes and edges into Neo4j Aura.
    3. Querying (GraphRAG): Use LlamaIndex for semantic/hybrid retrieval or LangChain to power a text-to-Cypher QA interface.

    If you'd like, tell me more about your project:

    • Is your text data large scale (millions of documents) or small/medium?
    • Do you prefer a fully managed cloud service or a local/open-source setup?
    • Are you leaning toward Python or JavaScript/TypeScript for development?

    I can share a starter code snippet or recommend the exact pipeline configuration for your use case.

    ChatGPTSep 25, 2026

    1. 1Neo4j
    2. 2OpenAI
    3. 3Anthropic
    4. 4Gemini

    My default choice: Neo4j + Neo4j GraphRAG + an LLM with structured output. It currently has a first-party Python GraphRAG package covering KG extraction, embeddings, vector/hybrid retrieval, and natural-language-to-Cypher querying.

    A solid architecture is:

    Documents → chunking → LLM entity/relation extraction → Neo4j → hybrid graph+vector retrieval → LLM

    For querying, combine:

    • Vector/Cypher retrieval for semantic + relationship-aware search.
    • Text2Cypher for questions requiring explicit graph traversal.
    • Structured output during extraction to make entities/relationships conform to your schema.

    Neo4j officially supports OpenAI, Anthropic, Gemini, Mistral, Cohere, and Ollama integrations.

    neo4j.com