File size: 1,872 Bytes
b22c324 2f0a5db 3905c35 2f0a5db | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ## Project Overview
This respository was created as part for an internship report, containing the source codes and respurces in developing the Retrieval-Augmented Generation(RAG) banking chatbot.
RAG allows the chatbot to answer questions based on the knowledge base instead of only using the Large Language Model (LLM).
## Objectives
- Develop a chatbot capable of answering questions based on public dataset(s)
- Implement a Retrieval-Augmented Generation (RAG) pipeline
- Generate embeddings for efficient document retrieval
- Build a vector database
- Improve response accuracy by providing relevant context to the language model
- Implement advanced requirements
- Evaluate the chatbot's performance
## Installation
Virtual environment:
python -m venv venv
venv\Scripts\activate
Libraries:
pip install -r requirements.txt
Run the chatbot:
streamlit run app.py
## How it works
The chatbot follows a Retrieval-Augmented Generation (RAG) workflow:
1. Documents are collected and preprocessed.
2. The documents are split into smaller text chunks.
3. Each chunk is converted into vector embeddings.
4. The embeddings are stored in a vector database.
5. When a user submits a query:
- The query is embedded into a vector.
- The vector database retrieves the most relevant document chunks.
- The retrieved context is combined with the user's query.
- The LLM generates an appropriate response using the retrieved information.
## Requirements
- Python 3.10 or above
- LangChain
- Ollama
- Vector database (ChromaDB)
- Sentence Transformer / Embedding model
- python-dotenv
- Other dependencies listed in `requirements.txt`
---
license: mit
Datasets: [Bank Faqs](https://www.kaggle.com/datasets/somanathkshirasagar/bankfaqs), [customer support conversations](https://www.kaggle.com/datasets/syncoraai/customer-support-conversations)
---
|