Skip to main content
View all authors

Build Real-Time Knowledge Graph For Documents with LLM

· 7 min read

CocoIndex makes it easy to build and maintain knowledge graphs with continuous source updates. In this blog, we will process a list of documents (using CocoIndex documentation as an example). We will use LLM to extract relationships between the concepts in each document. We will generate two kinds of relationships:

  1. Relationships between subjects and objects. E.g., "CocoIndex supports Incremental Processing"
  2. Mentions of entities in a document. E.g., "core/basics.mdx" mentions CocoIndex and Incremental Processing.

The source code is available at CocoIndex Examples - docs_to_knowledge_graph.

Example knowledge graph showing relationships between concepts in CocoIndex documentation