parent
949bfc4228
commit
ccdd3c2786
1 changed files with 13 additions and 8 deletions
|
|
@ -282,7 +282,9 @@ class RAGEvaluator:
|
||||||
- ragas_score: Overall RAGAS score (0-1)
|
- ragas_score: Overall RAGAS score (0-1)
|
||||||
- timestamp: When evaluation was run
|
- timestamp: When evaluation was run
|
||||||
"""
|
"""
|
||||||
csv_path = self.results_dir / f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv"
|
csv_path = (
|
||||||
|
self.results_dir / f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv"
|
||||||
|
)
|
||||||
|
|
||||||
with open(csv_path, "w", newline="", encoding="utf-8") as f:
|
with open(csv_path, "w", newline="", encoding="utf-8") as f:
|
||||||
fieldnames = [
|
fieldnames = [
|
||||||
|
|
@ -339,7 +341,10 @@ class RAGEvaluator:
|
||||||
}
|
}
|
||||||
|
|
||||||
# Save JSON results
|
# Save JSON results
|
||||||
json_path = self.results_dir / f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json"
|
json_path = (
|
||||||
|
self.results_dir
|
||||||
|
/ f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json"
|
||||||
|
)
|
||||||
with open(json_path, "w") as f:
|
with open(json_path, "w") as f:
|
||||||
json.dump(summary, f, indent=2)
|
json.dump(summary, f, indent=2)
|
||||||
print(f"✅ JSON results saved to: {json_path}")
|
print(f"✅ JSON results saved to: {json_path}")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue