Skip to content

PoC of RAG chatbot which can answer question about eMush game

License

Notifications You must be signed in to change notification settings

cmnemoi/emush_rag_chatbot_poc

Repository files navigation

eMush RAG Chatbot

Continuous Integration Continuous Delivery codecov

A Retrieval-Augmented Generation (RAG) chatbot that can answer questions about the eMush game using wikis, tutorials and QA Mush forums.

Features

  • Semantic search across eMush documentation
  • Context-aware responses using GPT-4
  • FastAPI-powered REST API
  • Source attribution for transparency

Installation

You need to have curl and uv installed on your system.

Then run the following command:

curl -sSL https://raw.githubusercontent.com/cmnemoi/emush_rag_chatbot_poc/main/clone-and-install | bash

Usage

A tiny indexed Chroma vector database with some data is included in the repository to get started.

REST API

Start the API server:

make run-chatbot

The API will be available at http://localhost:8000 with Swagger documentation at /docs.

Web Interface

Start the Streamlit web interface:

make run-streamlit

The web interface will be available at http://localhost:8501.

Note: Make sure the API server is running before starting the web interface.

Example API Request

curl -X POST "http://localhost:8000/chat" \
     -H "Content-Type: application/json" \
     -d '{
           "query": "What is the goal of the game?",
         }'

Development

Better RAG performance

To get more accurate answers, you need more indexed data.

For this, use Mush Wikis Scraper to download all knowledge base of the commmunity : uvx --from mush-wikis-scraper mush-wikis-scrap --format text > emush_rag_chatbot/data/data.json

Then index the data in vector store with: make index-documents

Evaluation

Run evaluation with:

make evaluate-rag

Testing

Run tests with:

make test

License

The source code of this repository is licensed under the AGPL-3.0-or-later License.

About

PoC of RAG chatbot which can answer question about eMush game

Resources

License

Stars

Watchers

Forks

Packages

No packages published