66
77load_dotenv ()
88
9- MOCK_EVALUATOR_CONFIG = './examples/rag/evaluation/rag_eval_example_config.yaml'
10- MOCK_INDEXER_CONFIG = './examples/rag/evaluation/indexer_eval_example_config.yaml'
11- MOCK_RAG_CONFIG = './examples/rag/evaluation/rag_evaluated_example_config.yaml'
9+ MOCK_EVALUATOR_CONFIG = "./examples/rag/evaluation/rag_eval_example_config.yaml"
10+ MOCK_INDEXER_CONFIG = "./examples/rag/evaluation/indexer_eval_example_config.yaml"
11+ MOCK_RAG_CONFIG = "./examples/rag/evaluation/rag_evaluated_example_config.yaml"
12+
1213
1314def get_args ():
14- parser = argparse .ArgumentParser (description = 'Run RAG Evaluation pipeline with specified parameters or use default mock data' )
15- parser .add_argument ('--eval-config' , type = str , default = MOCK_EVALUATOR_CONFIG , help = 'Path to a rag evaluator config file.' )
16- parser .add_argument ('--indexer-config' , type = str , default = MOCK_INDEXER_CONFIG , help = 'Path to an Indexer config file.' )
17- parser .add_argument ('--rag-config' , type = str , default = MOCK_RAG_CONFIG , help = 'Path to a rag config file.' )
15+ parser = argparse .ArgumentParser (
16+ description = "Run RAG Evaluation pipeline with specified parameters or use default mock data"
17+ )
18+ parser .add_argument (
19+ "--eval-config" ,
20+ type = str ,
21+ default = MOCK_EVALUATOR_CONFIG ,
22+ help = "Path to a rag evaluator config file." ,
23+ )
24+ parser .add_argument (
25+ "--indexer-config" ,
26+ type = str ,
27+ default = MOCK_INDEXER_CONFIG ,
28+ help = "Path to an Indexer config file." ,
29+ )
30+ parser .add_argument (
31+ "--rag-config" ,
32+ type = str ,
33+ default = MOCK_RAG_CONFIG ,
34+ help = "Path to a rag config file." ,
35+ )
1836
1937 return parser .parse_args ()
2038
39+
2140if __name__ == "__main__" :
2241 args = get_args ()
2342
2443 # Instantiate RAGEvaluator
2544 evaluator = RAGEvaluator .from_config (args .eval_config )
2645
2746 # Run the evaluation
28- result = evaluator (
29- indexer_config = args .indexer_config ,
30- rag_config = args .rag_config
31- )
47+ result = evaluator (indexer_config = args .indexer_config , rag_config = args .rag_config )
3248
33- print (result )
49+ print (result )
0 commit comments