Update rag_bm.py

This commit is contained in:
YangQianli92 2024-04-17 13:37:40 +08:00 committed by GitHub
parent 4bf9cfa51b
commit d0b00e3bfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,7 +81,7 @@ class RAGExample:
logger.info(f"=====The {dataset.name} Benchmark dataset assessment is complete!=====")
self._print_bm_result(results)
write_json_file(os.path.join(EXAMPLE_BENCHMARK_PATH, dataset.name, "bm_result.json"), results, "utf-8")
write_json_file((EXAMPLE_BENCHMARK_PATH \ dataset.name \ "bm_result.json").as_posix()), results, "utf-8")
async def rag_evaluate_single(self, question, reference, ground_truth, print_title=True):
"""This example run rag pipeline, use faiss&bm25 retriever and llm ranker, will print something like: