This project guides you through building a basic Retrieval-Augmented Generation (RAG) system. It aims to help you understand RAG’s internal workings and provide the essential skills to create a RAG with minimal dependencies.
git clone https://github.com/IamRavanan/mistral-basic-rag.git
cd mistral-basic-rag
python -m venv .venv
.venv\Scripts\activate.bat\
source .venv/bin/activate
python -m pip install --upgrade pip && pip install -r requirements.txt
python .\invoke.py "What were the two main things the author worked on before college?"
PS D:\GitHub\mistral-rag> python .\invoke.py "What were the two main things the author worked on before college?"
- Creating Mistral Client ...
- Loading data ...
- Transforming data into chunks ...
- Converting chunks to vector embeddings ...
- Loading Vector DB ...
- Converting user prompt to embedding ...
- Loading Vector DB ...
- Converting user prompt to embedding ...
- Converting user prompt to embedding ...
- Retrieving matching chunks from vector DB ...
- Formulating prompt ...
- Augumenting response with Mistral's mistral-medium-latest model...
- Printing response ...
Response : The two main things the author worked on before college were writing and programming. They wrote short stories, which they described as having hardly any plot and mostly focusing on characters with strong feelings. In terms of programming, they tried writing programs on an IBM 1401 in 9th grade using an early version of Fortran. They typed programs on punch cards, which were then loaded into memory and run on the machine. However, they couldn't remember any specific programs they wrote as they didn't have any data stored on punched cards and didn't know enough math to do anything interesting without input. With the advent of microcomputers, they found that programming became much more accessible and interesting.
MIT License