@absolutejs/absolute 0.19.0-beta.541 → 0.19.0-beta.543

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
@@ -5859,6 +5859,28 @@ var formatTraceStageSummary = (stageCounts) => {
5859
5859
  };
5860
5860
  var formatTraceRatio = (count, total) => `${count}/${total}`;
5861
5861
  var formatTraceCountDelta = (value) => `${value >= 0 ? "+" : ""}${value}`;
5862
+ var buildComparisonOverviewPresentation = (input) => {
5863
+ const winnerLabel = input.resolveLabel(input.summary.bestByPassingRate);
5864
+ const winnerEntry = input.resolveEntry(input.summary.bestByPassingRate);
5865
+ return {
5866
+ rows: [
5867
+ {
5868
+ label: "Best passing rate",
5869
+ value: input.resolveLabel(input.summary.bestByPassingRate)
5870
+ },
5871
+ {
5872
+ label: "Best average F1",
5873
+ value: input.resolveLabel(input.summary.bestByAverageF1)
5874
+ },
5875
+ {
5876
+ label: "Fastest",
5877
+ value: input.resolveLabel(input.summary.fastest)
5878
+ }
5879
+ ],
5880
+ winnerLabel,
5881
+ winnerSummary: winnerEntry ? `passing ${formatEvaluationPassingRate(winnerEntry.response.passingRate)} \xB7 f1 ${winnerEntry.response.summary.averageF1.toFixed(3)} \xB7 latency ${winnerEntry.response.summary.averageLatencyMs.toFixed(1)}ms` : "Stored benchmark comparison"
5882
+ };
5883
+ };
5862
5884
  var buildRAGComparisonTraceSummaryRows = (entry) => {
5863
5885
  const trace = entry.traceSummary;
5864
5886
  if (!trace) {
@@ -5945,6 +5967,12 @@ var buildRAGRetrievalComparisonCardPresentations = (comparison) => {
5945
5967
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
5946
5968
  }));
5947
5969
  };
5970
+ var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildComparisonOverviewPresentation({
5971
+ entries: comparison.entries,
5972
+ resolveEntry: (id) => comparison.entries.find((entry) => entry.retrievalId === id),
5973
+ resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
5974
+ summary: comparison.summary
5975
+ });
5948
5976
  var buildRAGRerankerComparisonCardPresentations = (comparison) => {
5949
5977
  const leader = comparison.entries[0];
5950
5978
  return comparison.entries.map((entry) => ({
@@ -5956,6 +5984,12 @@ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
5956
5984
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
5957
5985
  }));
5958
5986
  };
5987
+ var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildComparisonOverviewPresentation({
5988
+ entries: comparison.entries,
5989
+ resolveEntry: (id) => comparison.entries.find((entry) => entry.rerankerId === id),
5990
+ resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
5991
+ summary: comparison.summary
5992
+ });
5959
5993
  var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry) => ({
5960
5994
  headline: [
5961
5995
  entry.label,
@@ -5967,6 +6001,33 @@ var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry
5967
6001
  id: entry.providerKey,
5968
6002
  label: entry.label
5969
6003
  }));
6004
+ var buildRAGGroundingProviderOverviewPresentation = (input) => {
6005
+ const resolveLabel = (key) => input.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
6006
+ const winnerLabel = resolveLabel(input.summary.bestByPassingRate);
6007
+ const winnerEntry = input.entries.find((entry) => entry.providerKey === input.summary.bestByPassingRate);
6008
+ return {
6009
+ rows: [
6010
+ {
6011
+ label: "Best passing rate",
6012
+ value: resolveLabel(input.summary.bestByPassingRate)
6013
+ },
6014
+ {
6015
+ label: "Best citation F1",
6016
+ value: resolveLabel(input.summary.bestByAverageCitationF1)
6017
+ },
6018
+ {
6019
+ label: "Best resolved citations",
6020
+ value: resolveLabel(input.summary.bestByResolvedCitationRate)
6021
+ },
6022
+ {
6023
+ label: "Fastest",
6024
+ value: resolveLabel(input.summary.fastest)
6025
+ }
6026
+ ],
6027
+ winnerLabel,
6028
+ winnerSummary: winnerEntry ? `passing ${formatEvaluationPassingRate(winnerEntry.response.passingRate)} \xB7 citation f1 ${winnerEntry.response.summary.averageCitationF1.toFixed(3)} \xB7 resolved ${formatEvaluationPassingRate(winnerEntry.response.summary.averageResolvedCitationRate)}` : "Stored workflow evaluation"
6029
+ };
6030
+ };
5970
6031
  var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
5971
6032
  const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
5972
6033
  return {
@@ -12023,10 +12084,13 @@ export {
12023
12084
  buildRAGSourceSummaries,
12024
12085
  buildRAGSourceGroups,
12025
12086
  buildRAGRetrievalTracePresentation,
12087
+ buildRAGRetrievalComparisonOverviewPresentation,
12026
12088
  buildRAGRetrievalComparisonCardPresentations,
12089
+ buildRAGRerankerComparisonOverviewPresentation,
12027
12090
  buildRAGRerankerComparisonCardPresentations,
12028
12091
  buildRAGLexicalHaystack,
12029
12092
  buildRAGGroundingReferences,
12093
+ buildRAGGroundingProviderOverviewPresentation,
12030
12094
  buildRAGGroundingProviderCaseComparisonPresentations,
12031
12095
  buildRAGGroundingProviderCardPresentations,
12032
12096
  buildRAGGroundedAnswer,
@@ -12057,5 +12121,5 @@ export {
12057
12121
  aiChat
12058
12122
  };
12059
12123
 
12060
- //# debugId=1456B2D1F196B2B664756E2164756E21
12124
+ //# debugId=3C2A786B1639044464756E2164756E21
12061
12125
  //# sourceMappingURL=index.js.map