@absolutejs/absolute 0.19.0-beta.537 → 0.19.0-beta.538

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2579,6 +2579,69 @@ var buildRAGAnswerGroundingEvaluationRunDiff = ({
2579
2579
  unchangedCases
2580
2580
  };
2581
2581
  };
2582
+ var buildRAGAnswerGroundingCaseSnapshotPresentations = (history) => {
2583
+ if (!history?.caseSnapshots.length) {
2584
+ return [];
2585
+ }
2586
+ return history.caseSnapshots.map((entry) => {
2587
+ const label = entry.label ?? entry.caseId;
2588
+ return {
2589
+ answerChange: entry.answerChange,
2590
+ caseId: entry.caseId,
2591
+ label,
2592
+ rows: [
2593
+ {
2594
+ label: "Query",
2595
+ value: entry.query?.trim().length ? entry.query : "n/a"
2596
+ },
2597
+ { label: "Answer change", value: entry.answerChange },
2598
+ { label: "Coverage", value: entry.coverage },
2599
+ {
2600
+ label: "Resolved citations",
2601
+ value: `${entry.resolvedCitationCount}/${entry.citationCount}`
2602
+ },
2603
+ {
2604
+ label: "Resolved citation rate",
2605
+ value: entry.resolvedCitationRate.toFixed(3)
2606
+ },
2607
+ { label: "Citation F1", value: entry.citationF1.toFixed(3) },
2608
+ {
2609
+ label: "Reference count",
2610
+ value: String(entry.referenceCount)
2611
+ },
2612
+ {
2613
+ label: "Cited IDs",
2614
+ value: entry.citedIds.length > 0 ? entry.citedIds.join(", ") : "none"
2615
+ },
2616
+ {
2617
+ label: "Matched IDs",
2618
+ value: entry.matchedIds.length > 0 ? entry.matchedIds.join(", ") : "none"
2619
+ },
2620
+ {
2621
+ label: "Missing IDs",
2622
+ value: entry.missingIds.length > 0 ? entry.missingIds.join(", ") : "none"
2623
+ },
2624
+ {
2625
+ label: "Extra IDs",
2626
+ value: entry.extraIds.length > 0 ? entry.extraIds.join(", ") : "none"
2627
+ },
2628
+ {
2629
+ label: "Unresolved refs",
2630
+ value: entry.ungroundedReferenceNumbers.length > 0 ? entry.ungroundedReferenceNumbers.join(", ") : "none"
2631
+ },
2632
+ {
2633
+ label: "Answer",
2634
+ value: entry.answer.trim().length > 0 ? entry.answer : "n/a"
2635
+ },
2636
+ {
2637
+ label: "Previous answer",
2638
+ value: entry.previousAnswer && entry.previousAnswer.trim().length > 0 ? entry.previousAnswer : "n/a"
2639
+ }
2640
+ ],
2641
+ summary: `${entry.answerChange} \xB7 ${entry.coverage} \xB7 resolved ${entry.resolvedCitationCount}/${entry.citationCount} \xB7 refs ${entry.referenceCount}`
2642
+ };
2643
+ });
2644
+ };
2582
2645
  var createRAGFileEvaluationHistoryStore = (path) => ({
2583
2646
  listRuns: async ({ limit, suiteId } = {}) => {
2584
2647
  let parsed = [];
@@ -4050,5 +4113,5 @@ export {
4050
4113
  AIStreamProvider
4051
4114
  };
4052
4115
 
4053
- //# debugId=23034E6004312CB964756E2164756E21
4116
+ //# debugId=0CA1C6598EBB5C6564756E2164756E21
4054
4117
  //# sourceMappingURL=index.js.map