LLM-based chatbot that queries and visualizes KGX
nodes and edges TSV files loaded into either DuckDB
(default) or neo4j
database backend.
NOTE:
EnsureOPENAI_API_KEY
is set as an environmental variable.
- Install Neo4j desktop from here.
- Create a new project and database, then start it.
- Install the APOC plugin in Neo4j Desktop.
- Update settings to match
neo4j_db_settings.conf
.
- Clone this repository.
- Create a virtual environment and install dependencies:
cd kg-chat pip install poetry poetry install
- Replace
data/nodes.tsv
anddata/edges.tsv
with desired KGX files if needed.
- DuckDB [default]
- Neo4j
-
Import KG: Load nodes and edges into a database (default: duckdb).
poetry run kg import
-
Test Query: Run a test query.
poetry run kg test-query
-
QnA: Ask questions about the data.
poetry run kg qna "how many nodes do we have here?"
-
Chat: Start an interactive chat session.
poetry run kg chat
-
App: Deploy a local web application.
poetry run kg app
Use show me
in prompts for KG visualization.
This cookiecutter project was developed from the monarch-project-template template and will be kept up-to-date using cruft.