Run the HyperGraphRAG evaluation pipeline
mainThe evaluation process consists of five distinct steps. You can run these sequentially to construct the hypergraph, retrieve knowledge, generate responses, and score them.
Step 1: Knowledge HyperGraph Construction
Construct the hypergraph for a specific class using script_insert.py. Use nohup to run this in the background.
Step 2: Retrieve Knowledge
Retrieve knowledge using the HyperGraphRAG method via script_hypergraphrag.py.
Step 3: Generate Responses
Generate answers based on the retrieved knowledge using get_generation.py.
Step 4: Evaluate Generation
Score the generated responses using get_score.py. This step requires a GPU.
Step 5: View Results
View the final evaluation scores using see_score.py.
# Example pipeline for 'hypertension' data source
# 1. Construction
nohup python script_insert.py --cls hypertension > result_hypertension_insert.log 2>&1 &
# 2. Retrieval
python script_hypergraphrag.py --data_source hypertension
# 3. Generation
python get_generation.py --data_sources hypertension --methods HyperGraphRAG
# 4. Evaluation
CUDA_VISIBLE_DEVICES=0 python get_score.py --data_source hypertension --method HyperGraphRAG
# 5. View Results
python see_score.py --data_source hypertension --method HyperGraphRAG