Playing around with automatically creating knowledge graphs using LLaMa3.2 (with LangChain)
This project uses LangChain to build a Neo4j Graph DB and a QA Pipeline. We have attempted multiple approaches, all using the PubMedQA dataset, which can be found here.
Prerequisites:
- Download Ollama here.
a. Make sure to pull the model you plan to use. See here for a list of the available models. - Download Neo4j Desktop here
a. Create a new project with a GraphDBMS and start the DBMS by pressing 'Start'.
b. On the righthand side, 'Reset DBMS password'. This is the password you will enter into the password field. c. Install APOC Plugin - Graph DBs are queried using the language Cypher.
How to use:
- simple_relations_kg.ipynb builds a simple knowledge graph with only three types of relations.
- rag_test_with_fixed_relations.ipynb creates a knowledge graph with a fixed schema of 15 relations
Tutorials Used:
Build a Question Answering application over a Graph Database
Construct a Knowledge Graph with an LLM