Neo4j LLM 知识图谱构建器 - 从非结构化文本中提取节点和关系

build kg genai e1718732751482

The Neo4j LLM Knowledge Graph Builder is an 在线应用 for turning unstructured text into a knowledge graph, it provides a magical text to graph experience.

It uses ML models (LLM - OpenAI, Gemini, Llama3, Diffbot, Claude, Qwen) to transform PDFs, documents, images, web pages, and YouTube video transcripts. The extraction turns them into a lexical graph of documents and chunks (with embeddings) and an entity graph with nodes and their relationships, which are both stored in your Neo4j database. You can configure the extraction schema and apply clean-up operations after the extraction.

Afterwards you can use different RAG approaches (GraphRAG, Vector, Text2Cypher) to ask questions of your data and see how the extracted data is used to construct the answers.

  • best results for files with long-form text in English

  • less well suited for tabular data like Excel or CSV or images/diagrams/slides

  • higher quality data extraction if you configure the graph schema for nodes and relationship types

The front-end is a React Application and the back-end a Python FastAPI application running on Google Cloud Run, but you can deploy it locally using docker compose. It uses the llm-graph-transformer module that Neo4j contributed to LangChain and other langchain integrations (e.g. for GraphRAG search).

All Features are documented in detail here: Features documentation

Here is a quick demo

分步说明

  1. Open the LLM 知识图谱构建器

  2. Connect to a Neo4j(Aura) instance

  3. Provide your PDFs, Documents, URLs or S3/GCS buckets

  4. Construct Graph with the selected LLM

  5. Visualize Knowledge Graph in App

  6. Chat with your data using GraphRAG

  7. Open Neo4j Bloom for further visual exploration

  8. Use the constructed knowledge graph in your applications

llm graph builder viz
  • Login, or create an account at https://console.neo4j.io

  • Under Instances, create a new AuraDB Free Database

  • Downloads the credentials file

  • Wait until the instance is running

  • Drop the credentials file on the connect dialog for the LLM Graph Builder

工作原理

  1. Uploaded Sources are stored as Document nodes in the graph

  2. Each document (type) is loaded with the LangChain Loaders

  3. The content is split into Chunks

  4. Chunks are stored in the graph and connected to the Document and to each other for advanced RAG patterns

  5. Highly similar Chunks are connected with a SIMILAR relationship to form a kNN Graph

  6. Embeddings are computed and stored in the Chunks and Vector index

  7. Using the llm-graph-transformer or diffbot-graph-transformer entities and relationships are extracted from the text

  8. Entities and relationships are stored in the graph and connected to the originating Chunks

retrieval information e1718732797663

Online Application

https://llm-graph-builder.neo4jlabs.com/

作者

Michael Hunger, Tomaz Bratanic, Niels De Jong, Morgan Senechal, Persistent Team

社区支持

Neo4j 在线社区

存储库

GitHub

问题追踪

GitHub Issues

LangChain

LangChain KG Construction Module

安装

The LLM 知识图谱构建器应用 is available online.

You can also run it locally, by cloning the GitHub repository and following the instructions in the README.md file.

It is using Docker for packaging front-end and back-end, and you can run docker-compose up to start the whole application.

Local deployment and configuration details are available in the Documentation for local deployments

视频与教程

llm knowledge graph construction

详细演练

直播 LLM 知识图谱构建器

© . This site is unofficial and not affiliated with Neo4j, Inc.