A minimal, production-ready Retrieval-Augmented Generation (RAG) chatbot written in Python. It embeds your FAQ/docs, stores vectors in FAISS, retrieves relevant chunks for each query, and generates answers with an LLM (OpenAI-compatible by default).
✅ Great for prototypes, local demos, and as a base to evolve into ElasticSearch/Milvus/Pinecone or Agentic AI.
Place your content as plain text in: data/docs/
Sample files included:
- faq_getting_started.txt
- faq_account.txt
- faq_billing.txt
Generate the vector database for retrieval: python build_index.py
This will produce:
- data/vector.index
- data/chunks.npy
Start the chatbot: python chatbot.py
Example dialogue: User: How do I reset my password? Bot: You can reset your password from the Account → Security → Change Password page.
To exit, type: exit
- Load documents
- Chunk content
- Generate embeddings
- Build FAISS index
- Embed user query
- Retrieve top-K chunks
- Inject retrieved context
- LLM generates the answer
MIT — free for personal and commercial use