Skip to content

About

A RAG chatbot that answers questions about any custom text document using Google's Generative AI and ChromaDB.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

RAG Q&A Chatbot

A RAG chatbot that answers questions about any document using Google's Generative AI and ChromaDB.

Requirements

Python 3.10+

Setup

  1. Install dependencies

    pip install -r requirements.txt
  2. Configure API key

    cp .env.example .env

    Edit .env and add your Google API key.

  3. Create the database (first time only)

    python embed.py

Usage

python query.py

Use With Your Own Text

Supported formats: .txt, .md, .pdf, .docx

python embed.py --text-file my_book.pdf --db-path my_db
python query.py --db-path my_db

Or edit config.py for permanent changes. See CUSTOMIZATION.md for details.

Project Structure

embed.py        - Creates embeddings from text
query.py        - Interactive Q&A chatbot
config.py       - All settings
verify_db.py    - Database verification
rag_db/         - Vector database (generated)

How It Works

  1. embed.py splits text into chunks, embeds them with Google's API, stores in ChromaDB
  2. query.py embeds your question, finds similar chunks, generates an answer with Gemini

About

A RAG chatbot that answers questions about any custom text document using Google's Generative AI and ChromaDB.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages