This project is a Retrieval-Augmented Generation (RAG) based customer support system built with Python and Streamlit.
The system allows users to ask questions about provided documents and receive answers grounded in those documents.
If the answer cannot be found, the system suggests creating a support ticket.
Features
Web-based chat interface (Streamlit)
Document-based question answering (RAG)
Semantic search using vector embeddings (ChromaDB)
Answers are grounded in documents with source file name and page number
Conversation history is preserved during the session
Support ticket creation via external issue tracking system (Trello API)
LLM-based decision making (function calling) for ticket creation
System is aware of the company context (customer support scenario)
Data Sources
At least 3 documents are used as knowledge sources
At least 2 documents are PDF files
At least 1 PDF document contains more than 400 pages
Documents are ingested and split into chunks with page-level metadata
Example document:
light_and_heavy_vehicle_technology.pdf
Supported Queries (Examples)
The system successfully answers document-grounded questions, for example:
"What's oil is better?"
This query works correctly and returns:
Relevant information from the document
Source file name
Page number (e.g. light_and_heavy_vehicle_technology.pdf, page 116)
The answer is strictly based on the content of the documents (no hallucinations).
When No Answer Is Found
If the system cannot find relevant information in the documents:
The user is informed that no document-based answer is available
The system suggests creating a support ticket
The user can manually create a ticket via the UI
This behavior is intentional to avoid hallucinations and ensure reliable answers.
Architecture Overview
User question is submitted via Streamlit UI
Question is embedded using sentence-transformers/all-MiniLM-L6-v2
Relevant document chunks are retrieved from ChromaDB
If relevant chunks are found:
The system displays the answer with source and page citation
If no chunks are found:
The system suggests creating a support ticket
LLM function calling decides whether a ticket should be created
Ticket is created in an external system (Trello)
Tech Stack
Python 3.x
Streamlit
ChromaDB (vector storage)
Sentence Transformers
PyMuPDF (PDF processing)
OpenRouter API (LLM)
Trello API (issue tracking)
dotenv (environment configuration)
How to Run Locally
bash
1pip install -r requirements.txt
2streamlit run app.py