help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
rag-chatbot
RSK World
rag-chatbot
RAG Chatbot - Python + LangChain + ChromaDB + OpenAI API + Vector Search + Knowledge Base
rag-chatbot
  • __pycache__
  • analytics
  • conversations
  • knowledge_base
  • static
  • templates
  • vector_db
  • .env.example502 B
  • .gitignore519 B
  • ADVANCED_FEATURES.md5.2 KB
  • GITHUB_PUSH_SUMMARY.md3.6 KB
  • ISSUES_FIXED.md3.3 KB
  • LICENSE1.2 KB
  • PROJECT_INFO.md3 KB
  • QUICKSTART.md1.5 KB
  • README.md3.9 KB
  • RELEASE_NOTES.md3.7 KB
  • analytics.py6.9 KB
  • app.py8.3 KB
  • chatbot.py10.8 KB
  • config.py1.8 KB
  • conversation_manager.py5.8 KB
  • embeddings.py1.9 KB
  • hybrid_search.py4 KB
  • prepare_knowledge_base.py6.8 KB
  • requirements.txt377 B
  • setup.py2.8 KB
  • vector_store.py6.7 KB
README.mdhello-world-variations.zipPROJECT_INFO.md
README.md
Raw Download

README.md

# RAG Chatbot

<!--
Project: RAG Chatbot
Developer: RSK World
Website: https://rskworld.in
Email: help@rskworld.in
Phone: +91 93305 39277
Year: 2026
Description: Retrieval-Augmented Generation chatbot with knowledge base integration
-->

Retrieval-Augmented Generation chatbot with knowledge base integration. This chatbot uses RAG (Retrieval-Augmented Generation) architecture to provide accurate answers from a knowledge base. Perfect for building chatbots with domain-specific knowledge.

## Features

### Core Features
- Knowledge base integration with ChromaDB
- Vector similarity search
- Context retrieval from knowledge base
- Accurate responses using RAG architecture
- Domain-specific knowledge support

### Advanced Features
- **Conversation History**: Maintains context across multiple messages
- **Streaming Responses**: Real-time streaming of LLM responses
- **Hybrid Search**: Combines vector similarity with keyword matching
- **File Upload**: Upload documents directly through the web interface
- **Analytics Dashboard**: Track queries, sessions, response times, and feedback
- **Feedback System**: Thumbs up/down for responses
- **Chat Export**: Export conversations as JSON
- **Session Management**: Multiple concurrent sessions
- **Response Time Tracking**: Monitor performance metrics

## Technologies

- LangChain
- Vector DB (ChromaDB)
- Python
- OpenAI API
- Embeddings

## Installation

1. Clone the repository
2. Install dependencies:
```bash
pip install -r requirements.txt
```

3. Set up environment variables:
```bash
cp .env.example .env
# Edit .env and add your OpenAI API key
```

4. Prepare your knowledge base:
```bash
python prepare_knowledge_base.py
```

5. Run the application:
```bash
python app.py
```

## Usage

1. Start the Flask server
2. Open your browser and navigate to `http://localhost:5000`
3. Enter your questions in the chat interface
4. The chatbot will retrieve relevant context from the knowledge base and generate accurate responses

### Advanced Features Usage

- **Streaming Mode**: Toggle streaming on/off in the chat header
- **Hybrid Search**: Enable hybrid search for better results combining semantic and keyword search
- **Upload Documents**: Click the upload button to add new documents to the knowledge base
- **View Analytics**: Click the analytics button to see statistics and insights
- **Export Chat**: Click export to download your conversation as JSON
- **Feedback**: Use thumbs up/down buttons on responses to provide feedback

## Project Structure

```
rag-chatbot/
├── app.py # Flask application with advanced endpoints
├── chatbot.py # RAG chatbot implementation
├── vector_store.py # Vector database operations
├── embeddings.py # Embedding utilities
├── conversation_manager.py # Conversation history management
├── analytics.py # Analytics and statistics tracking
├── hybrid_search.py # Hybrid search implementation
├── prepare_knowledge_base.py # Knowledge base preparation
├── config.py # Configuration settings
├── setup.py # Setup script
├── templates/
│ └── index.html # Web interface with advanced UI
├── static/
│ ├── css/
│ │ └── style.css # Styles with modal and advanced UI
│ └── js/
│ └── app.js # Frontend JavaScript with all features
├── knowledge_base/ # Knowledge base documents
├── vector_db/ # Vector database storage
├── conversations/ # Conversation history storage
├── analytics/ # Analytics data storage
└── requirements.txt # Python dependencies
```

## License

© 2026 RSK World - https://rskworld.in

PROJECT_INFO.md
Raw Download

PROJECT_INFO.md

# RAG Chatbot - Project Information

<!--
Project: RAG Chatbot
Developer: RSK World
Website: https://rskworld.in
Email: help@rskworld.in
Phone: +91 93305 39277
Year: 2026
-->

## Project Overview

This is a complete RAG (Retrieval-Augmented Generation) chatbot implementation with knowledge base integration. The chatbot uses vector search to retrieve relevant context from a knowledge base and generates accurate, context-aware responses.

## Project Structure

```
rag-chatbot/
├── app.py # Flask web application
├── chatbot.py # RAG chatbot implementation
├── vector_store.py # Vector database operations
├── embeddings.py # Embedding utilities
├── config.py # Configuration settings
├── prepare_knowledge_base.py # Knowledge base preparation script
├── setup.py # Setup/installation script
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── README.md # Main documentation
├── QUICKSTART.md # Quick start guide
├── LICENSE # MIT License
├── templates/
│ └── index.html # Web interface template
├── static/
│ ├── css/
│ │ └── style.css # Stylesheet
│ └── js/
│ └── app.js # Frontend JavaScript
└── knowledge_base/
└── sample_knowledge.txt # Sample knowledge document
```

## Features Implemented

✅ Knowledge base integration with ChromaDB
✅ Vector search and similarity matching
✅ Context retrieval from knowledge base
✅ Accurate responses using RAG architecture
✅ Domain-specific knowledge support
✅ Modern web interface
✅ Real-time chat functionality
✅ Source citation in responses
✅ Responsive design
✅ Error handling and validation

## Technologies Used

- **LangChain**: Framework for LLM applications
- **ChromaDB**: Vector database for embeddings
- **OpenAI API**: For embeddings and LLM
- **Flask**: Web framework
- **Python**: Backend language
- **HTML/CSS/JavaScript**: Frontend

## Developer Information

All files in this project include developer information in comments:
- **Developer**: RSK World
- **Website**: https://rskworld.in
- **Email**: help@rskworld.in
- **Phone**: +91 93305 39277
- **Year**: 2026

## Getting Started

1. Install dependencies: `pip install -r requirements.txt`
2. Configure environment: Copy `.env.example` to `.env` and add your OpenAI API key
3. Prepare knowledge base: `python prepare_knowledge_base.py`
4. Run application: `python app.py`
5. Open browser: Navigate to `http://localhost:5000`

For detailed instructions, see `QUICKSTART.md` or `README.md`.

## License

MIT License - See LICENSE file for details.

© 2026 RSK World - https://rskworld.in

🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer