@absolutejs/absolute 0.19.0-beta.537 → 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 +64 -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 +64 -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 +2 -1
- package/dist/svelte/ai/index.js +64 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +7 -0
- package/dist/vue/ai/index.js +64 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +7 -7
package/dist/types/ai.d.ts
CHANGED
|
@@ -1133,6 +1133,13 @@ export type RAGAnswerGroundingEvaluationHistory = {
|
|
|
1133
1133
|
caseSnapshots: RAGAnswerGroundingEvaluationCaseSnapshot[];
|
|
1134
1134
|
diff?: RAGAnswerGroundingEvaluationRunDiff;
|
|
1135
1135
|
};
|
|
1136
|
+
export type RAGAnswerGroundingCaseSnapshotPresentation = {
|
|
1137
|
+
caseId: string;
|
|
1138
|
+
label: string;
|
|
1139
|
+
summary: string;
|
|
1140
|
+
answerChange: RAGAnswerGroundingEvaluationCaseSnapshot['answerChange'];
|
|
1141
|
+
rows: RAGLabelValueRow[];
|
|
1142
|
+
};
|
|
1136
1143
|
export type RAGEvaluationInput = {
|
|
1137
1144
|
cases: RAGEvaluationCase[];
|
|
1138
1145
|
topK?: number;
|
package/dist/vue/ai/index.js
CHANGED
|
@@ -2603,6 +2603,69 @@ var buildRAGAnswerGroundingEvaluationRunDiff = ({
|
|
|
2603
2603
|
unchangedCases
|
|
2604
2604
|
};
|
|
2605
2605
|
};
|
|
2606
|
+
var buildRAGAnswerGroundingCaseSnapshotPresentations = (history) => {
|
|
2607
|
+
if (!history?.caseSnapshots.length) {
|
|
2608
|
+
return [];
|
|
2609
|
+
}
|
|
2610
|
+
return history.caseSnapshots.map((entry) => {
|
|
2611
|
+
const label = entry.label ?? entry.caseId;
|
|
2612
|
+
return {
|
|
2613
|
+
answerChange: entry.answerChange,
|
|
2614
|
+
caseId: entry.caseId,
|
|
2615
|
+
label,
|
|
2616
|
+
rows: [
|
|
2617
|
+
{
|
|
2618
|
+
label: "Query",
|
|
2619
|
+
value: entry.query?.trim().length ? entry.query : "n/a"
|
|
2620
|
+
},
|
|
2621
|
+
{ label: "Answer change", value: entry.answerChange },
|
|
2622
|
+
{ label: "Coverage", value: entry.coverage },
|
|
2623
|
+
{
|
|
2624
|
+
label: "Resolved citations",
|
|
2625
|
+
value: `${entry.resolvedCitationCount}/${entry.citationCount}`
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
label: "Resolved citation rate",
|
|
2629
|
+
value: entry.resolvedCitationRate.toFixed(3)
|
|
2630
|
+
},
|
|
2631
|
+
{ label: "Citation F1", value: entry.citationF1.toFixed(3) },
|
|
2632
|
+
{
|
|
2633
|
+
label: "Reference count",
|
|
2634
|
+
value: String(entry.referenceCount)
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
label: "Cited IDs",
|
|
2638
|
+
value: entry.citedIds.length > 0 ? entry.citedIds.join(", ") : "none"
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
label: "Matched IDs",
|
|
2642
|
+
value: entry.matchedIds.length > 0 ? entry.matchedIds.join(", ") : "none"
|
|
2643
|
+
},
|
|
2644
|
+
{
|
|
2645
|
+
label: "Missing IDs",
|
|
2646
|
+
value: entry.missingIds.length > 0 ? entry.missingIds.join(", ") : "none"
|
|
2647
|
+
},
|
|
2648
|
+
{
|
|
2649
|
+
label: "Extra IDs",
|
|
2650
|
+
value: entry.extraIds.length > 0 ? entry.extraIds.join(", ") : "none"
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
label: "Unresolved refs",
|
|
2654
|
+
value: entry.ungroundedReferenceNumbers.length > 0 ? entry.ungroundedReferenceNumbers.join(", ") : "none"
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
label: "Answer",
|
|
2658
|
+
value: entry.answer.trim().length > 0 ? entry.answer : "n/a"
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
label: "Previous answer",
|
|
2662
|
+
value: entry.previousAnswer && entry.previousAnswer.trim().length > 0 ? entry.previousAnswer : "n/a"
|
|
2663
|
+
}
|
|
2664
|
+
],
|
|
2665
|
+
summary: `${entry.answerChange} \xB7 ${entry.coverage} \xB7 resolved ${entry.resolvedCitationCount}/${entry.citationCount} \xB7 refs ${entry.referenceCount}`
|
|
2666
|
+
};
|
|
2667
|
+
});
|
|
2668
|
+
};
|
|
2606
2669
|
var createRAGFileEvaluationHistoryStore = (path) => ({
|
|
2607
2670
|
listRuns: async ({ limit, suiteId } = {}) => {
|
|
2608
2671
|
let parsed = [];
|
|
@@ -3826,5 +3889,5 @@ export {
|
|
|
3826
3889
|
AIStreamKey
|
|
3827
3890
|
};
|
|
3828
3891
|
|
|
3829
|
-
//# debugId=
|
|
3892
|
+
//# debugId=69A98548515264F064756E2164756E21
|
|
3830
3893
|
//# sourceMappingURL=index.js.map
|