@absolutejs/absolute 0.19.0-beta.519 → 0.19.0-beta.520

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.
@@ -1734,18 +1734,50 @@ var buildCaseDiff = (currentCase, previousCase) => ({
1734
1734
  query: currentCase.query
1735
1735
  });
1736
1736
  var buildGroundingCaseDiff = (currentCase, previousCase) => ({
1737
+ answerChanged: typeof previousCase?.answer === "string" ? previousCase.answer !== currentCase.answer : true,
1737
1738
  caseId: currentCase.caseId,
1738
1739
  currentCitationF1: currentCase.citationF1,
1740
+ currentCoverage: currentCase.coverage,
1739
1741
  currentMatchedIds: currentCase.matchedIds,
1740
1742
  currentMissingIds: currentCase.missingIds,
1743
+ currentAnswer: currentCase.answer,
1741
1744
  currentStatus: currentCase.status,
1742
1745
  label: currentCase.label,
1746
+ previousAnswer: previousCase?.answer,
1743
1747
  previousCitationF1: previousCase?.citationF1,
1748
+ previousCoverage: previousCase?.coverage,
1744
1749
  previousMatchedIds: previousCase?.matchedIds ?? [],
1745
1750
  previousMissingIds: previousCase?.missingIds ?? [],
1746
1751
  previousStatus: previousCase?.status,
1747
1752
  query: currentCase.query
1748
1753
  });
1754
+ var buildGroundingCaseSnapshots = ({
1755
+ current,
1756
+ previous
1757
+ }) => {
1758
+ if (!current) {
1759
+ return [];
1760
+ }
1761
+ const previousCases = new Map((previous?.response.cases ?? []).map((entry) => [entry.caseId, entry]));
1762
+ return current.response.cases.map((entry) => {
1763
+ const previousCase = previousCases.get(entry.caseId);
1764
+ return {
1765
+ answer: entry.answer,
1766
+ answerChange: typeof previousCase?.answer === "string" ? previousCase.answer === entry.answer ? "unchanged" : "changed" : "new",
1767
+ caseId: entry.caseId,
1768
+ citationF1: entry.citationF1,
1769
+ coverage: entry.coverage,
1770
+ extraIds: entry.extraIds,
1771
+ label: entry.label,
1772
+ matchedIds: entry.matchedIds,
1773
+ missingIds: entry.missingIds,
1774
+ previousAnswer: previousCase?.answer,
1775
+ query: entry.query,
1776
+ resolvedCitationRate: entry.resolvedCitationRate,
1777
+ status: entry.status
1778
+ };
1779
+ });
1780
+ };
1749
1781
  var getStatusRank = (status) => status === "pass" ? 2 : status === "partial" ? 1 : 0;
1750
1782
  var buildRAGEvaluationRunDiff = ({
1751
1783
  current,
@@ -1906,6 +1938,10 @@ var loadRAGAnswerGroundingEvaluationHistory = async ({
1906
1938
  const latestRun = runs[0];
1907
1939
  const previousRun = runs[1];
1908
1940
  return {
1941
+ caseSnapshots: buildGroundingCaseSnapshots({
1942
+ current: latestRun,
1943
+ previous: previousRun
1944
+ }),
1909
1945
  diff: latestRun && previousRun ? buildRAGAnswerGroundingEvaluationRunDiff({
1910
1946
  current: latestRun,
1911
1947
  previous: previousRun
@@ -3196,5 +3232,5 @@ export {
3196
3232
  AIStreamProvider
3197
3233
  };
3198
3234
 
3199
- //# debugId=1BF1C7B518695E4F64756E2164756E21
3235
+ //# debugId=69D08C09A2653ED664756E2164756E21
3200
3236
  //# sourceMappingURL=index.js.map