Skip to content

vernontoh/mediRAG

Repository files navigation

mediRAG

Install required packages

pip install -r requirements.txt

Retrieval Evaluations

Experiment 1 (Chunk Configuration)

python retrieval_experiments.py --task chunk

Experiment 2 (Dense Embedding)

python retrieval_experiments.py --task single

Experiment 3 (Dense Ensemble)

python retrieval_experiments.py --task multi_dense

Experiment 4 (Hybrid Ensemble)

python retrieval_experiments.py --task hybrid

Experiment 5 (Reranking)

python retrieval_experiments.py --task rerank 

Experiment 6 (Query Expansion)

python retrieval_experiments.py --task query_expand --hf_token <HF Token>

LLM Evaluations

Experiment with no retrieval

python llm_experiments.py \
--approach vanilla \
--prompt_type base \

NOTE: You can run the experiments with other configurations.

--approach: ["vanilla", "citations"]  
--prompt_type: [ "base", "cot", "one-shot"]  

Experiment with retrieval

python llm_experiments.py \
--retrieval_type base \
--approach retrieval \
--prompt_type base \
--hf_token <HF Token> \

NOTE: You can run the experiments with other configurations.

--retrieval_type: ["base", "best"]
--approach: ["retrieval", "stepback"]  
--prompt_type: ["base", "cot", "one-shot"]  

Running the UI Demo

Setting up Hugging Face Token

### config.py
HF_TOKEN = None # replace with your <HF Token>

Running Demo

python app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •