https://github.com/anvesham/convfinqa_chatbot
https://github.com/anvesham/convfinqa_chatbot
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anvesham/convfinqa_chatbot
- Owner: AnveshaM
- Created: 2024-04-29T22:42:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-14T11:22:50.000Z (12 months ago)
- Last Synced: 2025-01-16T02:25:33.926Z (5 months ago)
- Language: Python
- Size: 83.4 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# convfinqa_chatbot
This project contains scripts for working with a vector database and utilizing a language model to generate responses based on queries.
## Folder Structure

## Description
- `data/`: This folder contains the `train_subset.json` file, which includes 50 entries of data.
- `get_embeddings.py`: This script is responsible for extracting embeddings from text data.
- `store_in_db.py`: This script loads individual entries from the JSON file into a vector database.
- `query_data.py`: This script queries the database and utilizes a language model to generate responses using a prompt template.
- `test.py`: This file contains unit tests to evaluate the performance of the language model.
- `requirements.txt`: This file lists all the package dependencies required for the code to run.- `output/`: Folder for storing output files.
- `pytest_output.txt`: Results of unit testing.
- `model_output.txt`: Results of chatbot output## Usage
1. Ensure you have all the necessary packages installed by running:
```bash
pip install -r requirements.txt
```2. Ensure ollama is downloaded, installed and running in your local machine. Use the command `ollama serve` if you want to run it in the desktop without starting the application.
3. Run the `store_in_db.py` script to load entries into the vector database.
4. Pull the LLM from the ollama server.
```bash
ollama pull mistral
```5. Use the `query_data.py` script to query the database and generate responses using the language model.
4. Optionally, run the unit tests in `test.py` to evaluate the performance of the language model.