-
install LlamaIndex
pip install llama-index-core llama-index-embeddings-huggingface llama-index-llms-huggingface llama-index-readers-file
-
install other necessary libraries if not already installed
pip install torch transformers
-
add documents that will be the context for RAG
- these documents can be in one or in multiple directories
-
run
setup_rag_index.py
to create the index from your desired documents.- change the list of
directories
as needed - run
python setup_rag_index.py
- change the list of
-
run
python run_rag.py --problem_name PROBLEM_NAME --language LANG
- For instance, for the problem
problem_opt0
indefault_prompts.py
in Dafny, we can runpython run_rag.py --problem_name problem_opt0 --language Dafny
- For instance, for the problem