@absolutejs/absolute 0.19.0-beta.539 → 0.19.0-beta.540

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.
package/dist/ai/index.js CHANGED
@@ -5839,6 +5839,19 @@ var formatEvaluationSummary = (response) => `${response.summary.passedCases}/${r
5839
5839
  var formatGroundingHistorySummaryValue = (response) => `${response.summary.passedCases}/${response.summary.totalCases} pass \xB7 grounded ${response.summary.groundedCases} \xB7 partial ${response.summary.partialCases} \xB7 ungrounded ${response.summary.ungroundedCases} \xB7 resolved citations ${(response.summary.averageResolvedCitationRate * 100).toFixed(1)}% \xB7 citation f1 ${response.summary.averageCitationF1.toFixed(3)}`;
5840
5840
  var formatHistoryCaseLabels = (cases) => cases.length > 0 ? cases.map((entry) => entry.label ?? entry.caseId).join(", ") : "none";
5841
5841
  var formatGroundingHistoryCaseLabels = (cases) => cases.length > 0 ? cases.map((entry) => entry.label ?? entry.caseId).join(", ") : "none";
5842
+ var formatRerankerComparisonHeadline = (entry) => [
5843
+ entry.label,
5844
+ `passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
5845
+ `f1 ${entry.response.summary.averageF1.toFixed(3)}`,
5846
+ `latency ${entry.response.summary.averageLatencyMs.toFixed(1)}ms`
5847
+ ].join(" \xB7 ");
5848
+ var formatRetrievalComparisonHeadline = (entry) => [
5849
+ entry.label,
5850
+ `mode ${entry.retrievalMode}`,
5851
+ `passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
5852
+ `f1 ${entry.response.summary.averageF1.toFixed(3)}`,
5853
+ `latency ${entry.response.summary.averageLatencyMs.toFixed(1)}ms`
5854
+ ].join(" \xB7 ");
5842
5855
  var formatTraceModes = (modes) => modes.length > 0 ? modes.join(" / ") : "n/a";
5843
5856
  var formatTraceStageSummary = (stageCounts) => {
5844
5857
  const topStages = Object.entries(stageCounts).sort((left, right) => right[1] - left[1]).slice(0, 3);
@@ -5921,6 +5934,28 @@ var buildRAGComparisonTraceDiffRows = (entry, leader) => {
5921
5934
  }
5922
5935
  return rows;
5923
5936
  };
5937
+ var buildRAGRetrievalComparisonCardPresentations = (comparison) => {
5938
+ const leader = comparison.entries[0];
5939
+ return comparison.entries.map((entry) => ({
5940
+ diffLabel: leader?.label ?? "Leader",
5941
+ diffRows: buildRAGComparisonTraceDiffRows(entry, leader),
5942
+ headline: formatRetrievalComparisonHeadline(entry),
5943
+ id: entry.retrievalId,
5944
+ label: entry.label,
5945
+ traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
5946
+ }));
5947
+ };
5948
+ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
5949
+ const leader = comparison.entries[0];
5950
+ return comparison.entries.map((entry) => ({
5951
+ diffLabel: leader?.label ?? "Leader",
5952
+ diffRows: buildRAGComparisonTraceDiffRows(entry, leader),
5953
+ headline: formatRerankerComparisonHeadline(entry),
5954
+ id: entry.rerankerId,
5955
+ label: entry.label,
5956
+ traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
5957
+ }));
5958
+ };
5924
5959
  var buildRAGEvaluationHistoryRows = (history) => {
5925
5960
  if (!history?.latestRun) {
5926
5961
  return [
@@ -11938,6 +11973,8 @@ export {
11938
11973
  buildRAGSourceSummaries,
11939
11974
  buildRAGSourceGroups,
11940
11975
  buildRAGRetrievalTracePresentation,
11976
+ buildRAGRetrievalComparisonCardPresentations,
11977
+ buildRAGRerankerComparisonCardPresentations,
11941
11978
  buildRAGLexicalHaystack,
11942
11979
  buildRAGGroundingReferences,
11943
11980
  buildRAGGroundedAnswer,
@@ -11968,5 +12005,5 @@ export {
11968
12005
  aiChat
11969
12006
  };
11970
12007
 
11971
- //# debugId=188A5A929B4F9DCA64756E2164756E21
12008
+ //# debugId=2339030EC0DDC6EA64756E2164756E21
11972
12009
  //# sourceMappingURL=index.js.map