flowchart TD
A[File Upload] --> B[Identify File Type]
B --> C[Create Documents]
C --> D[Extract Entity from Document]
D --> E[Get Entity Relationships]
E --> F[Create Vector Index]
First, install the dependenices
pip install -r requirements.txt
Next, install Neo4j. I recommend doing this Dozerb as it offers enterprise features in the community edition. You can use this script to get a docker container running.
You can use Azure OpenAI, Ollama or your custom provider. You just need to define your LLM and Embeddings model in llm_core.py
Once complete you can set your FILE_PATH
in knowledge_graph_creator.py and run the python script. It should you populate you Neo4J database.
The Builder supports different modes of operation when creating the nodes. This can be toggled by changing prompt_version
in Neo4JKnowledgeGraph. Defaults to 2
.
graph TD
A[Query] --> B[Construct Cypher from Schema]
B --> C[Retrieve related Nodes]
C --> D{Can Answer Question}
D -->|Yes| E[Response]
D -->|No| F[Process result]
F --> E
You can perform QA on your knowledge graph using the streamlit application at graph_qa_chatbot.py
streamlit run graph_qa_chatbot.py