More on how I personally think about the algorithms here
- clone repo
git clone https://github.com/matsjfunke/rag-from-scratch.git
- install dependences
python3 -m venv env source env/bin/activate pip install -r requirements.txt
- run scripts
- will take some time on the first run because embeddings aren’t cached (have a look at the handle_embeddings() function to understand)
python dot-product-rag.py
- tinkering optiions
- each script contains a main() function this function gives you inside on tweaks you can make
- different data: upload other .txt files in the root dir of the repo and specify thier name in file_name variable of main()
- different prompt: change prompt vairable in main()