@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.
- package/dist/ai/client/index.js +78 -1
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +81 -1
- package/dist/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +78 -1
- package/dist/react/ai/index.js.map +3 -3
- package/dist/src/ai/index.d.ts +1 -1
- package/dist/src/ai/rag/index.d.ts +1 -1
- package/dist/src/ai/rag/quality.d.ts +42 -1
- package/dist/svelte/ai/index.js +78 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +16 -0
- package/dist/vue/ai/index.js +78 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +1 -1
package/dist/types/ai.d.ts
CHANGED
|
@@ -1329,6 +1329,22 @@ 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 RAGGroundingProviderOverviewPresentation = {
|
|
1338
|
+
winnerLabel: string;
|
|
1339
|
+
winnerSummary: string;
|
|
1340
|
+
rows: RAGLabelValueRow[];
|
|
1341
|
+
};
|
|
1342
|
+
export type RAGGroundingProviderCaseComparisonPresentation = {
|
|
1343
|
+
caseId: string;
|
|
1344
|
+
label: string;
|
|
1345
|
+
summary: string;
|
|
1346
|
+
rows: RAGLabelValueRow[];
|
|
1347
|
+
};
|
|
1332
1348
|
export type RAGEvaluationLeaderboardEntry = {
|
|
1333
1349
|
runId: string;
|
|
1334
1350
|
suiteId: string;
|
package/dist/vue/ai/index.js
CHANGED
|
@@ -2433,6 +2433,83 @@ 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 buildRAGGroundingProviderOverviewPresentation = (input) => {
|
|
2448
|
+
const resolveLabel = (key) => input.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
|
|
2449
|
+
const winnerLabel = resolveLabel(input.summary.bestByPassingRate);
|
|
2450
|
+
const winnerEntry = input.entries.find((entry) => entry.providerKey === input.summary.bestByPassingRate);
|
|
2451
|
+
return {
|
|
2452
|
+
rows: [
|
|
2453
|
+
{
|
|
2454
|
+
label: "Best passing rate",
|
|
2455
|
+
value: resolveLabel(input.summary.bestByPassingRate)
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
label: "Best citation F1",
|
|
2459
|
+
value: resolveLabel(input.summary.bestByAverageCitationF1)
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
label: "Best resolved citations",
|
|
2463
|
+
value: resolveLabel(input.summary.bestByResolvedCitationRate)
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
label: "Fastest",
|
|
2467
|
+
value: resolveLabel(input.summary.fastest)
|
|
2468
|
+
}
|
|
2469
|
+
],
|
|
2470
|
+
winnerLabel,
|
|
2471
|
+
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"
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2474
|
+
var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
|
|
2475
|
+
const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
|
|
2476
|
+
return {
|
|
2477
|
+
caseId: comparison.caseId,
|
|
2478
|
+
label: comparison.label,
|
|
2479
|
+
rows: [
|
|
2480
|
+
{
|
|
2481
|
+
label: "Best grounded",
|
|
2482
|
+
value: resolveLabel(comparison.summary.bestByStatus)
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
label: "Best citation F1",
|
|
2486
|
+
value: resolveLabel(comparison.summary.bestByCitationF1)
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
label: "Best resolved citations",
|
|
2490
|
+
value: resolveLabel(comparison.summary.bestByResolvedCitationRate)
|
|
2491
|
+
},
|
|
2492
|
+
...comparison.entries.map((entry) => ({
|
|
2493
|
+
label: entry.label,
|
|
2494
|
+
value: [
|
|
2495
|
+
entry.status.toUpperCase(),
|
|
2496
|
+
`coverage ${entry.coverage}`,
|
|
2497
|
+
`f1 ${entry.citationF1.toFixed(3)}`,
|
|
2498
|
+
`resolved ${formatEvaluationPassingRate(entry.resolvedCitationRate)}`,
|
|
2499
|
+
`matched ${entry.matchedIds.join(", ") || "none"}`,
|
|
2500
|
+
`missing ${entry.missingIds.join(", ") || "none"}`,
|
|
2501
|
+
`extra ${entry.extraIds.join(", ") || "none"}`,
|
|
2502
|
+
`answer ${entry.answerExcerpt || "n/a"}`
|
|
2503
|
+
].join(" \xB7 ")
|
|
2504
|
+
}))
|
|
2505
|
+
],
|
|
2506
|
+
summary: [
|
|
2507
|
+
`Best grounded: ${resolveLabel(comparison.summary.bestByStatus)}`,
|
|
2508
|
+
`Best citation F1: ${resolveLabel(comparison.summary.bestByCitationF1)}`,
|
|
2509
|
+
`Best resolved citations: ${resolveLabel(comparison.summary.bestByResolvedCitationRate)}`
|
|
2510
|
+
].join(" \xB7 ")
|
|
2511
|
+
};
|
|
2512
|
+
});
|
|
2436
2513
|
var buildRAGEvaluationHistoryRows = (history) => {
|
|
2437
2514
|
if (!history?.latestRun) {
|
|
2438
2515
|
return [
|
|
@@ -3992,5 +4069,5 @@ export {
|
|
|
3992
4069
|
AIStreamKey
|
|
3993
4070
|
};
|
|
3994
4071
|
|
|
3995
|
-
//# debugId=
|
|
4072
|
+
//# debugId=171201D8916FD28364756E2164756E21
|
|
3996
4073
|
//# sourceMappingURL=index.js.map
|