@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/index.js
CHANGED
|
@@ -6000,6 +6000,64 @@ var buildRAGEvaluationHistoryRows = (history) => {
|
|
|
6000
6000
|
}
|
|
6001
6001
|
return rows;
|
|
6002
6002
|
};
|
|
6003
|
+
var buildRAGEvaluationCaseTracePresentations = (history) => {
|
|
6004
|
+
if (!history?.caseTraceSnapshots.length) {
|
|
6005
|
+
return [];
|
|
6006
|
+
}
|
|
6007
|
+
return history.caseTraceSnapshots.map((entry) => {
|
|
6008
|
+
const label = entry.label ?? entry.caseId;
|
|
6009
|
+
const currentMode = entry.traceMode ?? "no-trace";
|
|
6010
|
+
const previousMode = entry.previousTraceMode ?? "n/a";
|
|
6011
|
+
const currentVariants = entry.variantQueries.length > 0 ? entry.variantQueries.join(", ") : "none";
|
|
6012
|
+
const previousVariants = entry.previousVariantQueries.length > 0 ? entry.previousVariantQueries.join(", ") : "none";
|
|
6013
|
+
const currentStages = Object.keys(entry.stageCounts).length > 0 ? Object.entries(entry.stageCounts).map(([stage, count]) => `${stage} ${count}`).join(", ") : "none";
|
|
6014
|
+
const previousStages = Object.keys(entry.previousStageCounts).length > 0 ? Object.entries(entry.previousStageCounts).map(([stage, count]) => `${stage} ${count}`).join(", ") : "none";
|
|
6015
|
+
return {
|
|
6016
|
+
caseId: entry.caseId,
|
|
6017
|
+
label,
|
|
6018
|
+
summary: `${entry.traceChange} \xB7 ${previousMode}\u2192${currentMode} \xB7 final ${entry.previousFinalCount ?? 0}\u2192${entry.finalCount}`,
|
|
6019
|
+
traceChange: entry.traceChange,
|
|
6020
|
+
rows: [
|
|
6021
|
+
{ label: "Query", value: entry.query },
|
|
6022
|
+
{ label: "Trace change", value: entry.traceChange },
|
|
6023
|
+
{ label: "Mode", value: `${previousMode}\u2192${currentMode}` },
|
|
6024
|
+
{
|
|
6025
|
+
label: "Transformed query",
|
|
6026
|
+
value: `${entry.previousTransformedQuery?.trim() || "n/a"}\u2192${entry.transformedQuery?.trim() || "n/a"}`
|
|
6027
|
+
},
|
|
6028
|
+
{
|
|
6029
|
+
label: "Final",
|
|
6030
|
+
value: `${entry.previousFinalCount ?? 0}\u2192${entry.finalCount}`
|
|
6031
|
+
},
|
|
6032
|
+
{
|
|
6033
|
+
label: "Vector",
|
|
6034
|
+
value: `${entry.previousVectorCount ?? 0}\u2192${entry.vectorCount}`
|
|
6035
|
+
},
|
|
6036
|
+
{
|
|
6037
|
+
label: "Lexical",
|
|
6038
|
+
value: `${entry.previousLexicalCount ?? 0}\u2192${entry.lexicalCount}`
|
|
6039
|
+
},
|
|
6040
|
+
{
|
|
6041
|
+
label: "Candidate topK",
|
|
6042
|
+
value: `${entry.previousCandidateTopK ?? 0}\u2192${entry.candidateTopK}`
|
|
6043
|
+
},
|
|
6044
|
+
{
|
|
6045
|
+
label: "Lexical topK",
|
|
6046
|
+
value: `${entry.previousLexicalTopK ?? 0}\u2192${entry.lexicalTopK}`
|
|
6047
|
+
},
|
|
6048
|
+
{
|
|
6049
|
+
label: "Variants",
|
|
6050
|
+
value: `${previousVariants}\u2192${currentVariants}`
|
|
6051
|
+
},
|
|
6052
|
+
{
|
|
6053
|
+
label: "Stages",
|
|
6054
|
+
value: `${previousStages}\u2192${currentStages}`
|
|
6055
|
+
},
|
|
6056
|
+
{ label: "Status", value: entry.status }
|
|
6057
|
+
]
|
|
6058
|
+
};
|
|
6059
|
+
});
|
|
6060
|
+
};
|
|
6003
6061
|
var buildRAGEvaluationRunDiff = ({
|
|
6004
6062
|
current,
|
|
6005
6063
|
previous
|
|
@@ -6068,6 +6126,69 @@ var buildRAGAnswerGroundingEvaluationRunDiff = ({
|
|
|
6068
6126
|
unchangedCases
|
|
6069
6127
|
};
|
|
6070
6128
|
};
|
|
6129
|
+
var buildRAGAnswerGroundingCaseSnapshotPresentations = (history) => {
|
|
6130
|
+
if (!history?.caseSnapshots.length) {
|
|
6131
|
+
return [];
|
|
6132
|
+
}
|
|
6133
|
+
return history.caseSnapshots.map((entry) => {
|
|
6134
|
+
const label = entry.label ?? entry.caseId;
|
|
6135
|
+
return {
|
|
6136
|
+
answerChange: entry.answerChange,
|
|
6137
|
+
caseId: entry.caseId,
|
|
6138
|
+
label,
|
|
6139
|
+
rows: [
|
|
6140
|
+
{
|
|
6141
|
+
label: "Query",
|
|
6142
|
+
value: entry.query?.trim().length ? entry.query : "n/a"
|
|
6143
|
+
},
|
|
6144
|
+
{ label: "Answer change", value: entry.answerChange },
|
|
6145
|
+
{ label: "Coverage", value: entry.coverage },
|
|
6146
|
+
{
|
|
6147
|
+
label: "Resolved citations",
|
|
6148
|
+
value: `${entry.resolvedCitationCount}/${entry.citationCount}`
|
|
6149
|
+
},
|
|
6150
|
+
{
|
|
6151
|
+
label: "Resolved citation rate",
|
|
6152
|
+
value: entry.resolvedCitationRate.toFixed(3)
|
|
6153
|
+
},
|
|
6154
|
+
{ label: "Citation F1", value: entry.citationF1.toFixed(3) },
|
|
6155
|
+
{
|
|
6156
|
+
label: "Reference count",
|
|
6157
|
+
value: String(entry.referenceCount)
|
|
6158
|
+
},
|
|
6159
|
+
{
|
|
6160
|
+
label: "Cited IDs",
|
|
6161
|
+
value: entry.citedIds.length > 0 ? entry.citedIds.join(", ") : "none"
|
|
6162
|
+
},
|
|
6163
|
+
{
|
|
6164
|
+
label: "Matched IDs",
|
|
6165
|
+
value: entry.matchedIds.length > 0 ? entry.matchedIds.join(", ") : "none"
|
|
6166
|
+
},
|
|
6167
|
+
{
|
|
6168
|
+
label: "Missing IDs",
|
|
6169
|
+
value: entry.missingIds.length > 0 ? entry.missingIds.join(", ") : "none"
|
|
6170
|
+
},
|
|
6171
|
+
{
|
|
6172
|
+
label: "Extra IDs",
|
|
6173
|
+
value: entry.extraIds.length > 0 ? entry.extraIds.join(", ") : "none"
|
|
6174
|
+
},
|
|
6175
|
+
{
|
|
6176
|
+
label: "Unresolved refs",
|
|
6177
|
+
value: entry.ungroundedReferenceNumbers.length > 0 ? entry.ungroundedReferenceNumbers.join(", ") : "none"
|
|
6178
|
+
},
|
|
6179
|
+
{
|
|
6180
|
+
label: "Answer",
|
|
6181
|
+
value: entry.answer.trim().length > 0 ? entry.answer : "n/a"
|
|
6182
|
+
},
|
|
6183
|
+
{
|
|
6184
|
+
label: "Previous answer",
|
|
6185
|
+
value: entry.previousAnswer && entry.previousAnswer.trim().length > 0 ? entry.previousAnswer : "n/a"
|
|
6186
|
+
}
|
|
6187
|
+
],
|
|
6188
|
+
summary: `${entry.answerChange} \xB7 ${entry.coverage} \xB7 resolved ${entry.resolvedCitationCount}/${entry.citationCount} \xB7 refs ${entry.referenceCount}`
|
|
6189
|
+
};
|
|
6190
|
+
});
|
|
6191
|
+
};
|
|
6071
6192
|
var createRAGFileEvaluationHistoryStore = (path) => ({
|
|
6072
6193
|
listRuns: async ({ limit, suiteId } = {}) => {
|
|
6073
6194
|
let parsed = [];
|
|
@@ -11756,6 +11877,7 @@ export {
|
|
|
11756
11877
|
buildRAGEvaluationResponse,
|
|
11757
11878
|
buildRAGEvaluationLeaderboard,
|
|
11758
11879
|
buildRAGEvaluationHistoryRows,
|
|
11880
|
+
buildRAGEvaluationCaseTracePresentations,
|
|
11759
11881
|
buildRAGContext,
|
|
11760
11882
|
buildRAGComparisonTraceSummaryRows,
|
|
11761
11883
|
buildRAGComparisonTraceDiffRows,
|
|
@@ -11764,6 +11886,7 @@ export {
|
|
|
11764
11886
|
buildRAGAnswerGroundingEvaluationRunDiff,
|
|
11765
11887
|
buildRAGAnswerGroundingEvaluationResponse,
|
|
11766
11888
|
buildRAGAnswerGroundingEvaluationLeaderboard,
|
|
11889
|
+
buildRAGAnswerGroundingCaseSnapshotPresentations,
|
|
11767
11890
|
buildRAGAnswerGroundingCaseDifficultyRunDiff,
|
|
11768
11891
|
buildRAGAnswerGroundingCaseDifficultyLeaderboard,
|
|
11769
11892
|
applyRAGReranking,
|
|
@@ -11774,5 +11897,5 @@ export {
|
|
|
11774
11897
|
aiChat
|
|
11775
11898
|
};
|
|
11776
11899
|
|
|
11777
|
-
//# debugId=
|
|
11900
|
+
//# debugId=3C741D658CB700B164756E2164756E21
|
|
11778
11901
|
//# sourceMappingURL=index.js.map
|