@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/client/index.js +62 -1
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +65 -1
- package/dist/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +62 -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 +17 -1
- package/dist/svelte/ai/index.js +62 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +10 -0
- package/dist/vue/ai/index.js +62 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +1 -1
package/dist/types/ai.d.ts
CHANGED
|
@@ -1329,11 +1329,21 @@ 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;
|
|
1335
1340
|
headline: string;
|
|
1336
1341
|
};
|
|
1342
|
+
export type RAGGroundingProviderOverviewPresentation = {
|
|
1343
|
+
winnerLabel: string;
|
|
1344
|
+
winnerSummary: string;
|
|
1345
|
+
rows: RAGLabelValueRow[];
|
|
1346
|
+
};
|
|
1337
1347
|
export type RAGGroundingProviderCaseComparisonPresentation = {
|
|
1338
1348
|
caseId: string;
|
|
1339
1349
|
label: string;
|
package/dist/vue/ai/index.js
CHANGED
|
@@ -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,
|
|
@@ -2444,6 +2478,33 @@ var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry
|
|
|
2444
2478
|
id: entry.providerKey,
|
|
2445
2479
|
label: entry.label
|
|
2446
2480
|
}));
|
|
2481
|
+
var buildRAGGroundingProviderOverviewPresentation = (input) => {
|
|
2482
|
+
const resolveLabel = (key) => input.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
|
|
2483
|
+
const winnerLabel = resolveLabel(input.summary.bestByPassingRate);
|
|
2484
|
+
const winnerEntry = input.entries.find((entry) => entry.providerKey === input.summary.bestByPassingRate);
|
|
2485
|
+
return {
|
|
2486
|
+
rows: [
|
|
2487
|
+
{
|
|
2488
|
+
label: "Best passing rate",
|
|
2489
|
+
value: resolveLabel(input.summary.bestByPassingRate)
|
|
2490
|
+
},
|
|
2491
|
+
{
|
|
2492
|
+
label: "Best citation F1",
|
|
2493
|
+
value: resolveLabel(input.summary.bestByAverageCitationF1)
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
label: "Best resolved citations",
|
|
2497
|
+
value: resolveLabel(input.summary.bestByResolvedCitationRate)
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
label: "Fastest",
|
|
2501
|
+
value: resolveLabel(input.summary.fastest)
|
|
2502
|
+
}
|
|
2503
|
+
],
|
|
2504
|
+
winnerLabel,
|
|
2505
|
+
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"
|
|
2506
|
+
};
|
|
2507
|
+
};
|
|
2447
2508
|
var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
|
|
2448
2509
|
const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
|
|
2449
2510
|
return {
|
|
@@ -4042,5 +4103,5 @@ export {
|
|
|
4042
4103
|
AIStreamKey
|
|
4043
4104
|
};
|
|
4044
4105
|
|
|
4045
|
-
//# debugId=
|
|
4106
|
+
//# debugId=32EAE95382EB7CBC64756E2164756E21
|
|
4046
4107
|
//# sourceMappingURL=index.js.map
|