An experimental project for building and querying knowledge graphs from markdown files using LlamaIndex.
- Build knowledge graphs from markdown files
- Interactive visualization using Streamlit and Pyvis
- Query the knowledge graph using natural language
- Highlight relevant nodes and relationships in the visualization
- Temporal weighting of nodes based on document age
For detailed information about the system architecture and implementation, see architecture.md.
- Create a Python environment (3.9 or later)
curl -LsSf https://astral.sh/uv/install.sh | shuv venv
source .venv/bin/activate # On Unix/macOS
# or
# .venv\Scripts\activate # On Windows- Install dependencies using uv:
uv pip install -e . - Create a
.envfile with your OpenAI API key:OPENAI_API_KEY=your_key_here
Run the web interface:
./run_webapp.shThis will start a Streamlit app where you can:
- Upload markdown files
- View the knowledge graph visualization
- Query the graph using natural language
- See highlighted nodes and relationships based on your query
Run the CLI tool:
graphrag process path/to/markdown/filesThe project uses:
- LlamaIndex for knowledge graph creation and querying
- Streamlit for the web interface
- Pyvis for graph visualization
- NetworkX for graph operations
MIT License