Skip to content

sk48880/basic-rag-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic RAG Chatbot (PDF upload)

This project is a simple Streamlit-based RAG (Retrieval-Augmented Generation) chatbot. You upload PDF files, it embeds text using OpenAI embeddings, stores vectors in FAISS, and answers questions with OpenAI responses.

Requirements

  • Python 3.11 (strongly recommended for binary wheel compatibility on Windows)
  • OpenAI API key

Setup

  1. Create and activate virtualenv:
cd "C:\Users\sande\Desktop\VSCode Projects\RAG Chatbot"
py -3.11 -m venv .venv
Set-ExecutionPolicy Bypass -Scope Process -Force
. .\.venv\Scripts\Activate.ps1
  1. Install dependencies:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
  1. Run app:
python -m streamlit run app.py --server.port 8501 --server.headless true
  1. In the browser:
  • Enter OPENAI_API_KEY in sidebar
  • Upload PDF(s)
  • Ask questions

Notes

  • Works best with searchable text PDFs (not pure scanned images). For OCR PDFs, pre-process with OCR first.
  • For production, add persistent storage and error handling.

About

This project is a simple Streamlit-based RAG (Retrieval-Augmented Generation) chatbot. You upload PDF files, it embeds text using OpenAI embeddings, stores vectors in FAISS, and answers questions with OpenAI responses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages