@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.
@@ -1761,18 +1761,50 @@ var buildCaseDiff = (currentCase, previousCase) => ({
1761
1761
  query: currentCase.query
1762
1762
  });
1763
1763
  var buildGroundingCaseDiff = (currentCase, previousCase) => ({
1764
+ answerChanged: typeof previousCase?.answer === "string" ? previousCase.answer !== currentCase.answer : true,
1764
1765
  caseId: currentCase.caseId,
1765
1766
  currentCitationF1: currentCase.citationF1,
1767
+ currentCoverage: currentCase.coverage,
1766
1768
  currentMatchedIds: currentCase.matchedIds,
1767
1769
  currentMissingIds: currentCase.missingIds,
1770
+ currentAnswer: currentCase.answer,
1768
1771
  currentStatus: currentCase.status,
1769
1772
  label: currentCase.label,
1773
+ previousAnswer: previousCase?.answer,
1770
1774
  previousCitationF1: previousCase?.citationF1,
1775
+ previousCoverage: previousCase?.coverage,
1771
1776
  previousMatchedIds: previousCase?.matchedIds ?? [],
1772
1777
  previousMissingIds: previousCase?.missingIds ?? [],
1773
1778
  previousStatus: previousCase?.status,
1774
1779
  query: currentCase.query
1775
1780
  });
1781
+ var buildGroundingCaseSnapshots = ({
1782
+ current,
1783
+ previous
1784
+ }) => {
1785
+ if (!current) {
1786
+ return [];
1787
+ }
1788
+ const previousCases = new Map((previous?.response.cases ?? []).map((entry) => [entry.caseId, entry]));
1789
+ return current.response.cases.map((entry) => {
1790
+ const previousCase = previousCases.get(entry.caseId);
1791
+ return {
1792
+ answer: entry.answer,
1793
+ answerChange: typeof previousCase?.answer === "string" ? previousCase.answer === entry.answer ? "unchanged" : "changed" : "new",
1794
+ caseId: entry.caseId,
1795
+ citationF1: entry.citationF1,
1796
+ coverage: entry.coverage,
1797
+ extraIds: entry.extraIds,
1798
+ label: entry.label,
1799
+ matchedIds: entry.matchedIds,
1800
+ missingIds: entry.missingIds,
1801
+ previousAnswer: previousCase?.answer,
1802
+ query: entry.query,
1803
+ resolvedCitationRate: entry.resolvedCitationRate,
1804
+ status: entry.status
1805
+ };
1806
+ });
1807
+ };
1776
1808
  var getStatusRank = (status) => status === "pass" ? 2 : status === "partial" ? 1 : 0;
1777
1809
  var buildRAGEvaluationRunDiff = ({
1778
1810
  current,
@@ -1933,6 +1965,10 @@ var loadRAGAnswerGroundingEvaluationHistory = async ({
1933
1965
  const latestRun = runs[0];
1934
1966
  const previousRun = runs[1];
1935
1967
  return {
1968
+ caseSnapshots: buildGroundingCaseSnapshots({
1969
+ current: latestRun,
1970
+ previous: previousRun
1971
+ }),
1936
1972
  diff: latestRun && previousRun ? buildRAGAnswerGroundingEvaluationRunDiff({
1937
1973
  current: latestRun,
1938
1974
  previous: previousRun
@@ -2989,5 +3025,5 @@ export {
2989
3025
  createAIStream
2990
3026
  };
2991
3027
 
2992
- //# debugId=55FB65346CDBEA3D64756E2164756E21
3028
+ //# debugId=AD2F134AA387AD8E64756E2164756E21
2993
3029
  //# sourceMappingURL=index.js.map