@absolutejs/absolute 0.19.0-beta.542 → 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.
@@ -1329,6 +1329,11 @@ export type RAGComparisonCardPresentation = {
1329
1329
  diffLabel: string;
1330
1330
  diffRows: RAGLabelValueRow[];
1331
1331
  };
1332
+ export type RAGComparisonOverviewPresentation = {
1333
+ winnerLabel: string;
1334
+ winnerSummary: string;
1335
+ rows: RAGLabelValueRow[];
1336
+ };
1332
1337
  export type RAGGroundingProviderCardPresentation = {
1333
1338
  id: string;
1334
1339
  label: string;
@@ -2336,6 +2336,28 @@ var formatTraceStageSummary = (stageCounts) => {
2336
2336
  };
2337
2337
  var formatTraceRatio = (count, total) => `${count}/${total}`;
2338
2338
  var formatTraceCountDelta = (value) => `${value >= 0 ? "+" : ""}${value}`;
2339
+ var buildComparisonOverviewPresentation = (input) => {
2340
+ const winnerLabel = input.resolveLabel(input.summary.bestByPassingRate);
2341
+ const winnerEntry = input.resolveEntry(input.summary.bestByPassingRate);
2342
+ return {
2343
+ rows: [
2344
+ {
2345
+ label: "Best passing rate",
2346
+ value: input.resolveLabel(input.summary.bestByPassingRate)
2347
+ },
2348
+ {
2349
+ label: "Best average F1",
2350
+ value: input.resolveLabel(input.summary.bestByAverageF1)
2351
+ },
2352
+ {
2353
+ label: "Fastest",
2354
+ value: input.resolveLabel(input.summary.fastest)
2355
+ }
2356
+ ],
2357
+ winnerLabel,
2358
+ 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"
2359
+ };
2360
+ };
2339
2361
  var buildRAGComparisonTraceSummaryRows = (entry) => {
2340
2362
  const trace = entry.traceSummary;
2341
2363
  if (!trace) {
@@ -2422,6 +2444,12 @@ var buildRAGRetrievalComparisonCardPresentations = (comparison) => {
2422
2444
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
2423
2445
  }));
2424
2446
  };
2447
+ var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildComparisonOverviewPresentation({
2448
+ entries: comparison.entries,
2449
+ resolveEntry: (id) => comparison.entries.find((entry) => entry.retrievalId === id),
2450
+ resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
2451
+ summary: comparison.summary
2452
+ });
2425
2453
  var buildRAGRerankerComparisonCardPresentations = (comparison) => {
2426
2454
  const leader = comparison.entries[0];
2427
2455
  return comparison.entries.map((entry) => ({
@@ -2433,6 +2461,12 @@ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
2433
2461
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
2434
2462
  }));
2435
2463
  };
2464
+ var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildComparisonOverviewPresentation({
2465
+ entries: comparison.entries,
2466
+ resolveEntry: (id) => comparison.entries.find((entry) => entry.rerankerId === id),
2467
+ resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
2468
+ summary: comparison.summary
2469
+ });
2436
2470
  var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry) => ({
2437
2471
  headline: [
2438
2472
  entry.label,
@@ -4069,5 +4103,5 @@ export {
4069
4103
  AIStreamKey
4070
4104
  };
4071
4105
 
4072
- //# debugId=171201D8916FD28364756E2164756E21
4106
+ //# debugId=32EAE95382EB7CBC64756E2164756E21
4073
4107
  //# sourceMappingURL=index.js.map