A Python-based Retrieval-Augmented Generation (RAG) project that enables question answering and summarization over user-provided documents using ChromaDB and Hugging Face embeddings, In simple term its a RAG based chat bot.
This project loads text documents, converts them into vector embeddings, stores them in ChromaDB, and uses a Large Language Model (LLM) to answer user queries or generate summaries based on the retrieved contextual data.
The document loading behavior is configurable through a YAML-based configuration system.
RAG-chat-with-docs-chromadb/ β βββ main.py β # Entry point of the application. β # Loads documents into ChromaDB (based on config) β # and invokes the LLM for summarization or Q&A. β βββ src/ β βββ vector_db.py β # Handles vector database creation, embedding, β # and interaction with ChromaDB. β βββ raw_data/ β # Contains sample input documents for embedding. β # Currently supports .txt files only. β βββ properties/ β βββ vector-config.yaml β # Configuration file for vector database behavior. β # β # Example: β # load_into_vector: true β β βββ vector_config_loader.py β # Utility to load and parse vector-config.yaml. β βββ README.md
All vector database behavior is controlled via: properties/vector-config.yaml
true β Loads documents from raw_data/ into ChromaDBfalse β Skips document loading and uses existing vectorsThis allows flexible control over when embeddings are regenerated.
The project uses the following Hugging Face embedding model: sentence-transformers/all-MiniLM-L6-v2
This model provides fast and efficient sentence-level embeddings suitable for semantic search and RAG pipelines.
.txt filesvector-config.yamlload_into_vector is enabled:
raw_data/ are embeddedThe project supports multiple LLM providers. At least one API configuration must be provided in the .env file.
Based on the available configuration, the application will automatically initialize the corresponding LLM client.
An example configuration is provided in .env-example.
# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4o-mini
# Groq API Configuration (alternative to OpenAI)
GROQ_API_KEY=your_groq_api_key_here
GROQ_MODEL=llama-3.1-8b-instant
# Google Gemini API Configuration (alternative to OpenAI/Groq)
GOOGLE_API_KEY=your_google_api_key_here
GOOGLE_MODEL=gemini-pro
If multiple providers are configured, the application will select the appropriate LLM based on the internal configuration logic.
https://github.com/Raghul-S-Coder/RAG-chat-with-docs-chromadb.git