@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/ai/client/index.js
CHANGED
|
@@ -2312,6 +2312,28 @@ var formatTraceStageSummary = (stageCounts) => {
|
|
|
2312
2312
|
};
|
|
2313
2313
|
var formatTraceRatio = (count, total) => `${count}/${total}`;
|
|
2314
2314
|
var formatTraceCountDelta = (value) => `${value >= 0 ? "+" : ""}${value}`;
|
|
2315
|
+
var buildComparisonOverviewPresentation = (input) => {
|
|
2316
|
+
const winnerLabel = input.resolveLabel(input.summary.bestByPassingRate);
|
|
2317
|
+
const winnerEntry = input.resolveEntry(input.summary.bestByPassingRate);
|
|
2318
|
+
return {
|
|
2319
|
+
rows: [
|
|
2320
|
+
{
|
|
2321
|
+
label: "Best passing rate",
|
|
2322
|
+
value: input.resolveLabel(input.summary.bestByPassingRate)
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
label: "Best average F1",
|
|
2326
|
+
value: input.resolveLabel(input.summary.bestByAverageF1)
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
label: "Fastest",
|
|
2330
|
+
value: input.resolveLabel(input.summary.fastest)
|
|
2331
|
+
}
|
|
2332
|
+
],
|
|
2333
|
+
winnerLabel,
|
|
2334
|
+
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"
|
|
2335
|
+
};
|
|
2336
|
+
};
|
|
2315
2337
|
var buildRAGComparisonTraceSummaryRows = (entry) => {
|
|
2316
2338
|
const trace = entry.traceSummary;
|
|
2317
2339
|
if (!trace) {
|
|
@@ -2398,6 +2420,12 @@ var buildRAGRetrievalComparisonCardPresentations = (comparison) => {
|
|
|
2398
2420
|
traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
|
|
2399
2421
|
}));
|
|
2400
2422
|
};
|
|
2423
|
+
var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildComparisonOverviewPresentation({
|
|
2424
|
+
entries: comparison.entries,
|
|
2425
|
+
resolveEntry: (id) => comparison.entries.find((entry) => entry.retrievalId === id),
|
|
2426
|
+
resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
|
|
2427
|
+
summary: comparison.summary
|
|
2428
|
+
});
|
|
2401
2429
|
var buildRAGRerankerComparisonCardPresentations = (comparison) => {
|
|
2402
2430
|
const leader = comparison.entries[0];
|
|
2403
2431
|
return comparison.entries.map((entry) => ({
|
|
@@ -2409,6 +2437,12 @@ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
|
|
|
2409
2437
|
traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
|
|
2410
2438
|
}));
|
|
2411
2439
|
};
|
|
2440
|
+
var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildComparisonOverviewPresentation({
|
|
2441
|
+
entries: comparison.entries,
|
|
2442
|
+
resolveEntry: (id) => comparison.entries.find((entry) => entry.rerankerId === id),
|
|
2443
|
+
resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
|
|
2444
|
+
summary: comparison.summary
|
|
2445
|
+
});
|
|
2412
2446
|
var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry) => ({
|
|
2413
2447
|
headline: [
|
|
2414
2448
|
entry.label,
|
|
@@ -2420,6 +2454,33 @@ var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry
|
|
|
2420
2454
|
id: entry.providerKey,
|
|
2421
2455
|
label: entry.label
|
|
2422
2456
|
}));
|
|
2457
|
+
var buildRAGGroundingProviderOverviewPresentation = (input) => {
|
|
2458
|
+
const resolveLabel = (key) => input.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
|
|
2459
|
+
const winnerLabel = resolveLabel(input.summary.bestByPassingRate);
|
|
2460
|
+
const winnerEntry = input.entries.find((entry) => entry.providerKey === input.summary.bestByPassingRate);
|
|
2461
|
+
return {
|
|
2462
|
+
rows: [
|
|
2463
|
+
{
|
|
2464
|
+
label: "Best passing rate",
|
|
2465
|
+
value: resolveLabel(input.summary.bestByPassingRate)
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
label: "Best citation F1",
|
|
2469
|
+
value: resolveLabel(input.summary.bestByAverageCitationF1)
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
label: "Best resolved citations",
|
|
2473
|
+
value: resolveLabel(input.summary.bestByResolvedCitationRate)
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
label: "Fastest",
|
|
2477
|
+
value: resolveLabel(input.summary.fastest)
|
|
2478
|
+
}
|
|
2479
|
+
],
|
|
2480
|
+
winnerLabel,
|
|
2481
|
+
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"
|
|
2482
|
+
};
|
|
2483
|
+
};
|
|
2423
2484
|
var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
|
|
2424
2485
|
const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
|
|
2425
2486
|
return {
|
|
@@ -3379,5 +3440,5 @@ export {
|
|
|
3379
3440
|
buildRAGAnswerWorkflowState
|
|
3380
3441
|
};
|
|
3381
3442
|
|
|
3382
|
-
//# debugId=
|
|
3443
|
+
//# debugId=F6E5683968DDD65C64756E2164756E21
|
|
3383
3444
|
//# sourceMappingURL=index.js.map
|