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

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,17 @@ export type RAGComparisonCardPresentation = {
1329
1329
  diffLabel: string;
1330
1330
  diffRows: RAGLabelValueRow[];
1331
1331
  };
1332
+ export type RAGGroundingProviderCardPresentation = {
1333
+ id: string;
1334
+ label: string;
1335
+ headline: string;
1336
+ };
1337
+ export type RAGGroundingProviderCaseComparisonPresentation = {
1338
+ caseId: string;
1339
+ label: string;
1340
+ summary: string;
1341
+ rows: RAGLabelValueRow[];
1342
+ };
1332
1343
  export type RAGEvaluationLeaderboardEntry = {
1333
1344
  runId: string;
1334
1345
  suiteId: string;
@@ -2433,6 +2433,56 @@ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
2433
2433
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
2434
2434
  }));
2435
2435
  };
2436
+ var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry) => ({
2437
+ headline: [
2438
+ entry.label,
2439
+ `passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
2440
+ `citation f1 ${entry.response.summary.averageCitationF1.toFixed(3)}`,
2441
+ `resolved ${formatEvaluationPassingRate(entry.response.summary.averageResolvedCitationRate)}`,
2442
+ `latency ${entry.elapsedMs.toFixed(1)}ms`
2443
+ ].join(" \xB7 "),
2444
+ id: entry.providerKey,
2445
+ label: entry.label
2446
+ }));
2447
+ var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
2448
+ const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
2449
+ return {
2450
+ caseId: comparison.caseId,
2451
+ label: comparison.label,
2452
+ rows: [
2453
+ {
2454
+ label: "Best grounded",
2455
+ value: resolveLabel(comparison.summary.bestByStatus)
2456
+ },
2457
+ {
2458
+ label: "Best citation F1",
2459
+ value: resolveLabel(comparison.summary.bestByCitationF1)
2460
+ },
2461
+ {
2462
+ label: "Best resolved citations",
2463
+ value: resolveLabel(comparison.summary.bestByResolvedCitationRate)
2464
+ },
2465
+ ...comparison.entries.map((entry) => ({
2466
+ label: entry.label,
2467
+ value: [
2468
+ entry.status.toUpperCase(),
2469
+ `coverage ${entry.coverage}`,
2470
+ `f1 ${entry.citationF1.toFixed(3)}`,
2471
+ `resolved ${formatEvaluationPassingRate(entry.resolvedCitationRate)}`,
2472
+ `matched ${entry.matchedIds.join(", ") || "none"}`,
2473
+ `missing ${entry.missingIds.join(", ") || "none"}`,
2474
+ `extra ${entry.extraIds.join(", ") || "none"}`,
2475
+ `answer ${entry.answerExcerpt || "n/a"}`
2476
+ ].join(" \xB7 ")
2477
+ }))
2478
+ ],
2479
+ summary: [
2480
+ `Best grounded: ${resolveLabel(comparison.summary.bestByStatus)}`,
2481
+ `Best citation F1: ${resolveLabel(comparison.summary.bestByCitationF1)}`,
2482
+ `Best resolved citations: ${resolveLabel(comparison.summary.bestByResolvedCitationRate)}`
2483
+ ].join(" \xB7 ")
2484
+ };
2485
+ });
2436
2486
  var buildRAGEvaluationHistoryRows = (history) => {
2437
2487
  if (!history?.latestRun) {
2438
2488
  return [
@@ -3992,5 +4042,5 @@ export {
3992
4042
  AIStreamKey
3993
4043
  };
3994
4044
 
3995
- //# debugId=0079F53A8062FF3364756E2164756E21
4045
+ //# debugId=DF602C4E06ACEC7464756E2164756E21
3996
4046
  //# sourceMappingURL=index.js.map