AI Knowledge Base & Customer Support Copilot (RAG-based)
Pluang Knowledge Copilot is an AI-powered assistant that answers user queries strictly based on internal Pluang documents using a Retrieval Augmented Generation (RAG) architecture.
The goal of this project is to demonstrate how AI systems can be:
- grounded in trusted data
- resistant to hallucinations
- production-aware (quota, cost, reliability)
- easy to reason about and extend
This project was built as part of the Pluang Tech Intern Assignment.
-
📚 Document-grounded answers only
The assistant answers strictly from indexed internal documents and refuses to guess when information is missing. -
🔍 Retrieval Augmented Generation (RAG)
Combines semantic search (FAISS + embeddings) with LLM-based reasoning. -
🧾 Explicit source citations
Every grounded answer includes clear source references. -
🛑 Hallucination avoidance
If the answer is not present in the knowledge base, the assistant clearly states so. -
⚙️ Quota-aware LLM usage
Automatically falls back across multiple Gemini models when quota limits are hit. -
🧩 Modular, clean architecture
Clear separation between configuration, retrieval, prompting, and LLM logic.
High-level flow:
- Internal documents are loaded and embedded using a local embedding model.
- Embeddings are stored in a FAISS vector database.
- User queries are converted into semantic search queries.
- Relevant document chunks are retrieved.
- Gemini LLM generates an answer only from retrieved context.
- Sources are shown only when an answer is grounded.
Frontend
- Streamlit (chat-style UI)
Backend / AI
- Python
- LangChain (RAG orchestration)
- FAISS (vector store)
- Gemini Flash models (generation)
- HuggingFace sentence-transformers (local embeddings)
├── app.py # Streamlit entry point
├── core/
│ ├── config.py # API keys & model list
│ ├── llm.py # Gemini model fallback logic
│ ├── vectorstore.py # FAISS + embeddings
│ └── prompt.py # Prompt template
├── data/
│ └── mock_data.json # Internal knowledge documents
├── decision_document.md
├── requirements.txt
└── README.md
Grounded queries
- What is the minimum amount for Pluang Gold savings?
- Is there a cooling-off period for crypto withdrawals?
- What are the fees for physical gold redemption?
Unanswerable queries (hallucination test)
- Who is the CEO of Pluang in 2026?
- Is Pluang regulated by SEBI?
- What is Pluang’s stock price today?
Shows a grounded response with explicit source citation.
Shows a grounded response with explicit source citation.
Shows a grounded response with explicit source citation.
Demonstrates safe refusal when information is not present.
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\Activate
pip install -r requirements.txt
streamlit run app.py