- Install poetry: https://python-poetry.org/docs/#installation
- Install dependencies:
poetry install
- Install LLAMA2 Chat weights
wget https://huggingface.co/TheBloke/Llama-2-7b-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_0.gguf
How to Run the summarization script
python3 llm-project/summarization.py --file_path <path_to_pdf> --model_path <path_to_model> --verbose <whether to see complete logs or not>
How to Run the retrieve top 3 papers script
python3 llm-project/retrieve.py --query <query> --model_name <sentence_embedding_model> --verbose <whether to see complete logs or not> --top_k <number of papers to retrieve> --data_path <path to the data>
Testing the summarization and retrieval scripts can be done using Rouge or BERT score to see if the summary or the retrieved papers are relevant to the query.
To evaluate results for both summarization and retrieval, run the following command:
python3 llm-project/evaluate.py --model_result <model's output> --ground_truth <ground truth>