@absolutejs/absolute 0.19.0-beta.536 → 0.19.0-beta.538
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 +122 -1
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +124 -1
- package/dist/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +122 -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 +3 -1
- package/dist/svelte/ai/index.js +122 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +14 -0
- package/dist/vue/ai/index.js +122 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +7 -7
package/dist/ai/client/index.js
CHANGED
|
@@ -2453,6 +2453,64 @@ var buildRAGEvaluationHistoryRows = (history) => {
|
|
|
2453
2453
|
}
|
|
2454
2454
|
return rows;
|
|
2455
2455
|
};
|
|
2456
|
+
var buildRAGEvaluationCaseTracePresentations = (history) => {
|
|
2457
|
+
if (!history?.caseTraceSnapshots.length) {
|
|
2458
|
+
return [];
|
|
2459
|
+
}
|
|
2460
|
+
return history.caseTraceSnapshots.map((entry) => {
|
|
2461
|
+
const label = entry.label ?? entry.caseId;
|
|
2462
|
+
const currentMode = entry.traceMode ?? "no-trace";
|
|
2463
|
+
const previousMode = entry.previousTraceMode ?? "n/a";
|
|
2464
|
+
const currentVariants = entry.variantQueries.length > 0 ? entry.variantQueries.join(", ") : "none";
|
|
2465
|
+
const previousVariants = entry.previousVariantQueries.length > 0 ? entry.previousVariantQueries.join(", ") : "none";
|
|
2466
|
+
const currentStages = Object.keys(entry.stageCounts).length > 0 ? Object.entries(entry.stageCounts).map(([stage, count]) => `${stage} ${count}`).join(", ") : "none";
|
|
2467
|
+
const previousStages = Object.keys(entry.previousStageCounts).length > 0 ? Object.entries(entry.previousStageCounts).map(([stage, count]) => `${stage} ${count}`).join(", ") : "none";
|
|
2468
|
+
return {
|
|
2469
|
+
caseId: entry.caseId,
|
|
2470
|
+
label,
|
|
2471
|
+
summary: `${entry.traceChange} \xB7 ${previousMode}\u2192${currentMode} \xB7 final ${entry.previousFinalCount ?? 0}\u2192${entry.finalCount}`,
|
|
2472
|
+
traceChange: entry.traceChange,
|
|
2473
|
+
rows: [
|
|
2474
|
+
{ label: "Query", value: entry.query },
|
|
2475
|
+
{ label: "Trace change", value: entry.traceChange },
|
|
2476
|
+
{ label: "Mode", value: `${previousMode}\u2192${currentMode}` },
|
|
2477
|
+
{
|
|
2478
|
+
label: "Transformed query",
|
|
2479
|
+
value: `${entry.previousTransformedQuery?.trim() || "n/a"}\u2192${entry.transformedQuery?.trim() || "n/a"}`
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
label: "Final",
|
|
2483
|
+
value: `${entry.previousFinalCount ?? 0}\u2192${entry.finalCount}`
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
label: "Vector",
|
|
2487
|
+
value: `${entry.previousVectorCount ?? 0}\u2192${entry.vectorCount}`
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
label: "Lexical",
|
|
2491
|
+
value: `${entry.previousLexicalCount ?? 0}\u2192${entry.lexicalCount}`
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
label: "Candidate topK",
|
|
2495
|
+
value: `${entry.previousCandidateTopK ?? 0}\u2192${entry.candidateTopK}`
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
label: "Lexical topK",
|
|
2499
|
+
value: `${entry.previousLexicalTopK ?? 0}\u2192${entry.lexicalTopK}`
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
label: "Variants",
|
|
2503
|
+
value: `${previousVariants}\u2192${currentVariants}`
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
label: "Stages",
|
|
2507
|
+
value: `${previousStages}\u2192${currentStages}`
|
|
2508
|
+
},
|
|
2509
|
+
{ label: "Status", value: entry.status }
|
|
2510
|
+
]
|
|
2511
|
+
};
|
|
2512
|
+
});
|
|
2513
|
+
};
|
|
2456
2514
|
var buildRAGEvaluationRunDiff = ({
|
|
2457
2515
|
current,
|
|
2458
2516
|
previous
|
|
@@ -2521,6 +2579,69 @@ var buildRAGAnswerGroundingEvaluationRunDiff = ({
|
|
|
2521
2579
|
unchangedCases
|
|
2522
2580
|
};
|
|
2523
2581
|
};
|
|
2582
|
+
var buildRAGAnswerGroundingCaseSnapshotPresentations = (history) => {
|
|
2583
|
+
if (!history?.caseSnapshots.length) {
|
|
2584
|
+
return [];
|
|
2585
|
+
}
|
|
2586
|
+
return history.caseSnapshots.map((entry) => {
|
|
2587
|
+
const label = entry.label ?? entry.caseId;
|
|
2588
|
+
return {
|
|
2589
|
+
answerChange: entry.answerChange,
|
|
2590
|
+
caseId: entry.caseId,
|
|
2591
|
+
label,
|
|
2592
|
+
rows: [
|
|
2593
|
+
{
|
|
2594
|
+
label: "Query",
|
|
2595
|
+
value: entry.query?.trim().length ? entry.query : "n/a"
|
|
2596
|
+
},
|
|
2597
|
+
{ label: "Answer change", value: entry.answerChange },
|
|
2598
|
+
{ label: "Coverage", value: entry.coverage },
|
|
2599
|
+
{
|
|
2600
|
+
label: "Resolved citations",
|
|
2601
|
+
value: `${entry.resolvedCitationCount}/${entry.citationCount}`
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
label: "Resolved citation rate",
|
|
2605
|
+
value: entry.resolvedCitationRate.toFixed(3)
|
|
2606
|
+
},
|
|
2607
|
+
{ label: "Citation F1", value: entry.citationF1.toFixed(3) },
|
|
2608
|
+
{
|
|
2609
|
+
label: "Reference count",
|
|
2610
|
+
value: String(entry.referenceCount)
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
label: "Cited IDs",
|
|
2614
|
+
value: entry.citedIds.length > 0 ? entry.citedIds.join(", ") : "none"
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
label: "Matched IDs",
|
|
2618
|
+
value: entry.matchedIds.length > 0 ? entry.matchedIds.join(", ") : "none"
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
label: "Missing IDs",
|
|
2622
|
+
value: entry.missingIds.length > 0 ? entry.missingIds.join(", ") : "none"
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
label: "Extra IDs",
|
|
2626
|
+
value: entry.extraIds.length > 0 ? entry.extraIds.join(", ") : "none"
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
label: "Unresolved refs",
|
|
2630
|
+
value: entry.ungroundedReferenceNumbers.length > 0 ? entry.ungroundedReferenceNumbers.join(", ") : "none"
|
|
2631
|
+
},
|
|
2632
|
+
{
|
|
2633
|
+
label: "Answer",
|
|
2634
|
+
value: entry.answer.trim().length > 0 ? entry.answer : "n/a"
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
label: "Previous answer",
|
|
2638
|
+
value: entry.previousAnswer && entry.previousAnswer.trim().length > 0 ? entry.previousAnswer : "n/a"
|
|
2639
|
+
}
|
|
2640
|
+
],
|
|
2641
|
+
summary: `${entry.answerChange} \xB7 ${entry.coverage} \xB7 resolved ${entry.resolvedCitationCount}/${entry.citationCount} \xB7 refs ${entry.referenceCount}`
|
|
2642
|
+
};
|
|
2643
|
+
});
|
|
2644
|
+
};
|
|
2524
2645
|
var createRAGFileEvaluationHistoryStore = (path) => ({
|
|
2525
2646
|
listRuns: async ({ limit, suiteId } = {}) => {
|
|
2526
2647
|
let parsed = [];
|
|
@@ -3105,5 +3226,5 @@ export {
|
|
|
3105
3226
|
buildRAGAnswerWorkflowState
|
|
3106
3227
|
};
|
|
3107
3228
|
|
|
3108
|
-
//# debugId=
|
|
3229
|
+
//# debugId=EC76E6CA4D2A505A64756E2164756E21
|
|
3109
3230
|
//# sourceMappingURL=index.js.map
|