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

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.
@@ -2409,6 +2409,83 @@ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
2409
2409
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
2410
2410
  }));
2411
2411
  };
2412
+ var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry) => ({
2413
+ headline: [
2414
+ entry.label,
2415
+ `passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
2416
+ `citation f1 ${entry.response.summary.averageCitationF1.toFixed(3)}`,
2417
+ `resolved ${formatEvaluationPassingRate(entry.response.summary.averageResolvedCitationRate)}`,
2418
+ `latency ${entry.elapsedMs.toFixed(1)}ms`
2419
+ ].join(" \xB7 "),
2420
+ id: entry.providerKey,
2421
+ label: entry.label
2422
+ }));
2423
+ var buildRAGGroundingProviderOverviewPresentation = (input) => {
2424
+ const resolveLabel = (key) => input.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
2425
+ const winnerLabel = resolveLabel(input.summary.bestByPassingRate);
2426
+ const winnerEntry = input.entries.find((entry) => entry.providerKey === input.summary.bestByPassingRate);
2427
+ return {
2428
+ rows: [
2429
+ {
2430
+ label: "Best passing rate",
2431
+ value: resolveLabel(input.summary.bestByPassingRate)
2432
+ },
2433
+ {
2434
+ label: "Best citation F1",
2435
+ value: resolveLabel(input.summary.bestByAverageCitationF1)
2436
+ },
2437
+ {
2438
+ label: "Best resolved citations",
2439
+ value: resolveLabel(input.summary.bestByResolvedCitationRate)
2440
+ },
2441
+ {
2442
+ label: "Fastest",
2443
+ value: resolveLabel(input.summary.fastest)
2444
+ }
2445
+ ],
2446
+ winnerLabel,
2447
+ 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"
2448
+ };
2449
+ };
2450
+ var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
2451
+ const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
2452
+ return {
2453
+ caseId: comparison.caseId,
2454
+ label: comparison.label,
2455
+ rows: [
2456
+ {
2457
+ label: "Best grounded",
2458
+ value: resolveLabel(comparison.summary.bestByStatus)
2459
+ },
2460
+ {
2461
+ label: "Best citation F1",
2462
+ value: resolveLabel(comparison.summary.bestByCitationF1)
2463
+ },
2464
+ {
2465
+ label: "Best resolved citations",
2466
+ value: resolveLabel(comparison.summary.bestByResolvedCitationRate)
2467
+ },
2468
+ ...comparison.entries.map((entry) => ({
2469
+ label: entry.label,
2470
+ value: [
2471
+ entry.status.toUpperCase(),
2472
+ `coverage ${entry.coverage}`,
2473
+ `f1 ${entry.citationF1.toFixed(3)}`,
2474
+ `resolved ${formatEvaluationPassingRate(entry.resolvedCitationRate)}`,
2475
+ `matched ${entry.matchedIds.join(", ") || "none"}`,
2476
+ `missing ${entry.missingIds.join(", ") || "none"}`,
2477
+ `extra ${entry.extraIds.join(", ") || "none"}`,
2478
+ `answer ${entry.answerExcerpt || "n/a"}`
2479
+ ].join(" \xB7 ")
2480
+ }))
2481
+ ],
2482
+ summary: [
2483
+ `Best grounded: ${resolveLabel(comparison.summary.bestByStatus)}`,
2484
+ `Best citation F1: ${resolveLabel(comparison.summary.bestByCitationF1)}`,
2485
+ `Best resolved citations: ${resolveLabel(comparison.summary.bestByResolvedCitationRate)}`
2486
+ ].join(" \xB7 ")
2487
+ };
2488
+ });
2412
2489
  var buildRAGEvaluationHistoryRows = (history) => {
2413
2490
  if (!history?.latestRun) {
2414
2491
  return [
@@ -4216,5 +4293,5 @@ export {
4216
4293
  AIStreamProvider
4217
4294
  };
4218
4295
 
4219
- //# debugId=B901B6DA5FD7FB1D64756E2164756E21
4296
+ //# debugId=8C839BB2F157263B64756E2164756E21
4220
4297
  //# sourceMappingURL=index.js.map