This project is a chatbot to interact with a given document i.e. a knowledge source and answer questions based on it.
- Answer user questions from document - via LangChain and vectorDBs
- Prevent hallucination - via prompt engineering and answer evaluation
- Evaluation of the answers - via RAGAS
- Multi-lingual support - via OpenAI/Llama, speech and prompt support
- Speech Compatibility (TtS and StT) - via OpenAI Whisper (offline) and gTTS
- Basic GUI - Barebones HTML (only for testing)
Will be replaced with DOCKERFILE and requirements.txt
pip -r requirements.txt
python app.py
- Store Documents
- Split documents into chunks
- Process chunks as embeddings
- Save embeddings in vector DB
- Initialize Chat history
- Take input via SpeechRecognition (Whisper API/Offline)
- Convert input to embeddings
- Use similarity search to get relevant chunks
- Add relevant chunks to context in prompt
- Send prompt and history to LLM
- Get result
- Get metrics via RAGAS
- Show output to user (via TTS)
- Append output to chat history
- Repeat 6-14