GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rahulbansalcs/rag-document-chatbot: RAG Document Chatbot using LangChain, FAISS, Hugging Face Embeddings and Ollama.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
data
data
 
 
sample_document
sample_document
 
 
static
static
 
 
templates
templates
 
 
utils
utils
 
 
.DS_Store
.DS_Store
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
app.py
app.py
 
 
check_vectorstore.py
check_vectorstore.py
 
 
config.py
config.py
 
 
ingest.py
ingest.py
 
 
rag.py
rag.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

RAG Document Chatbot

A Retrieval-Augmented Generation (RAG) chatbot that allows users to upload PDF, DOCX, and TXT documents and ask natural language questions about their content.

The application uses semantic search with FAISS and Hugging Face embeddings to retrieve relevant document chunks, while Ollama (Llama 3.2) generates context-aware answers.


Features

  • Upload PDF, DOCX, and TXT files
  • Automatic document indexing
  • Semantic search using FAISS
  • Local LLM using Ollama (No API key required)
  • Source document citation
  • Chat history stored in SQLite
  • Flask web interface
  • Responsive UI

Tech Stack

Backend

  • Python
  • Flask
  • LangChain
  • Ollama
  • FAISS
  • Hugging Face Sentence Transformers

Frontend

  • HTML
  • CSS
  • JavaScript

Database

  • SQLite

Project Structure

rag-document-chatbot/
│
├── app.py
├── ingest.py
├── rag.py
├── config.py
├── requirements.txt
│
├── data/
├── database/
├── vectorstore/
│
├── static/
│   ├── style.css
│   └── app.js
│
├── templates/
│   └── index.html
│
├── utils/
│   ├── loader.py
│   ├── splitter.py
│   └── database.py
│
└── README.md

Installation

Clone the repository

git clone https://github.com/rahulbansalcs/rag-document-chatbot.git

cd rag-document-chatbot

Create a virtual environment

Mac/Linux

python3 -m venv .venv

source .venv/bin/activate

Windows

python -m venv .venv

.venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Install Ollama

Download and install Ollama.

Then pull the model:

ollama pull llama3.2

Start Ollama:

ollama serve

Run the application

python app.py

Open your browser:

http://127.0.0.1:5000

Upload Documents

Supported formats

  • PDF
  • DOCX
  • TXT

Upload a document using the web interface.


Ask Questions


Technologies Used

  • LangChain
  • Ollama
  • Hugging Face Embeddings
  • FAISS
  • SQLite
  • Flask
  • JavaScript

Future Improvements

  • Conversation memory
  • Streaming responses
  • ChromaDB support
  • Authentication
  • Docker support
  • GitHub Actions CI/CD
  • Multi-user support

Author

Rahul Bansal

LinkedIn

https://www.linkedin.com/in/rahul-bansal-039344312

About

RAG Document Chatbot using LangChain, FAISS, Hugging Face Embeddings and Ollama.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.