Giter Site home page Giter Site logo

kg-chat's Introduction

kg-chat

LLM-based chatbot that queries and visualizes KGX nodes and edges TSV files loaded into either DuckDB (default) or neo4j database backend.

NOTE:
Ensure OPENAI_API_KEY is set as an environmental variable.

Setup

For Neo4j Backend (Optional)

  1. Install Neo4j desktop from here.
  2. Create a new project and database, then start it.
  3. Install the APOC plugin in Neo4j Desktop.
  4. Update settings to match neo4j_db_settings.conf.

General Setup

  1. Clone this repository.
  2. Create a virtual environment and install dependencies:
    cd kg-chat
    pip install poetry
    poetry install
  3. Replace data/nodes.tsv and data/edges.tsv with desired KGX files if needed.

Supported Backends

  • DuckDB [default]
  • Neo4j

Commands

  1. Import KG: Load nodes and edges into a database (default: duckdb).

    poetry run kg import
  2. Test Query: Run a test query.

    poetry run kg test-query
  3. QnA: Ask questions about the data.

    poetry run kg qna "how many nodes do we have here?"
  4. Chat: Start an interactive chat session.

    poetry run kg chat
  5. App: Deploy a local web application.

    poetry run kg app

Visualization

Use show me in prompts for KG visualization.


Acknowledgements

This cookiecutter project was developed from the monarch-project-template template and will be kept up-to-date using cruft.

kg-chat's People

Contributors

hrshdhgd avatar

Stargazers

Sierra Moxon avatar Tim Alamenciak avatar Harry Caufield avatar

Watchers

Lucian avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.