piizei / cosmosdb-llm-knowledge-graph

Example how to construct knowledge graph from document with LLM (Langchain), and use it with CosmosDB/Neo4j

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

llm-knowledge-graph

Example how to construct knowledge graph from a document with LLM and use it with Langchain as part of your RAG

3 Notebooks:

  1. Construct knowledge graph with LLM
  2. Use Graph with Neo4j
  3. Use Graph with Azure CosmosDB

Instructions

You need to copy .env.example file to .env and fill the variables with your own values.

After that, run notebook 1 to create the knowledge graph (stored in file) and then run notebook 2 or 3 to use it with either Neo4j or CosmosDB.

Neo4j

If you run the neo4j database with docker compose, edit the docker-compose.yml file for a volume mount before starting it.

About

Example how to construct knowledge graph from document with LLM (Langchain), and use it with CosmosDB/Neo4j

License:MIT License


Languages

Language:Jupyter Notebook 92.0%Language:Python 8.0%