@absolutejs/absolute 0.19.0-beta.524 → 0.19.0-beta.525
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 +79 -2
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +79 -2
- package/dist/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +79 -2
- package/dist/react/ai/index.js.map +3 -3
- package/dist/svelte/ai/index.js +79 -2
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +11 -0
- package/dist/vue/ai/index.js +79 -2
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +1 -1
package/dist/ai/index.js
CHANGED
|
@@ -5208,6 +5208,82 @@ var buildGroundingDifficultyDiffEntry = (current, previous) => ({
|
|
|
5208
5208
|
previousRank: previous?.rank,
|
|
5209
5209
|
query: current.query
|
|
5210
5210
|
});
|
|
5211
|
+
var buildRAGAnswerGroundingCaseDifficultyTrends = ({
|
|
5212
|
+
runs
|
|
5213
|
+
}) => {
|
|
5214
|
+
const movementCounts = new Map;
|
|
5215
|
+
for (let index = 0;index < runs.length - 1; index += 1) {
|
|
5216
|
+
const current = runs[index];
|
|
5217
|
+
const previous = runs[index + 1];
|
|
5218
|
+
if (!current || !previous) {
|
|
5219
|
+
continue;
|
|
5220
|
+
}
|
|
5221
|
+
const diff = buildRAGAnswerGroundingCaseDifficultyRunDiff({
|
|
5222
|
+
current,
|
|
5223
|
+
previous
|
|
5224
|
+
});
|
|
5225
|
+
for (const entry of diff.harderCases) {
|
|
5226
|
+
const currentCounts = movementCounts.get(entry.caseId) ?? {
|
|
5227
|
+
easier: 0,
|
|
5228
|
+
harder: 0,
|
|
5229
|
+
label: entry.label,
|
|
5230
|
+
unchanged: 0
|
|
5231
|
+
};
|
|
5232
|
+
currentCounts.harder += 1;
|
|
5233
|
+
currentCounts.label ??= entry.label;
|
|
5234
|
+
movementCounts.set(entry.caseId, currentCounts);
|
|
5235
|
+
}
|
|
5236
|
+
for (const entry of diff.easierCases) {
|
|
5237
|
+
const currentCounts = movementCounts.get(entry.caseId) ?? {
|
|
5238
|
+
easier: 0,
|
|
5239
|
+
harder: 0,
|
|
5240
|
+
label: entry.label,
|
|
5241
|
+
unchanged: 0
|
|
5242
|
+
};
|
|
5243
|
+
currentCounts.easier += 1;
|
|
5244
|
+
currentCounts.label ??= entry.label;
|
|
5245
|
+
movementCounts.set(entry.caseId, currentCounts);
|
|
5246
|
+
}
|
|
5247
|
+
for (const entry of diff.unchangedCases) {
|
|
5248
|
+
const currentCounts = movementCounts.get(entry.caseId) ?? {
|
|
5249
|
+
easier: 0,
|
|
5250
|
+
harder: 0,
|
|
5251
|
+
label: entry.label,
|
|
5252
|
+
unchanged: 0
|
|
5253
|
+
};
|
|
5254
|
+
currentCounts.unchanged += 1;
|
|
5255
|
+
currentCounts.label ??= entry.label;
|
|
5256
|
+
movementCounts.set(entry.caseId, currentCounts);
|
|
5257
|
+
}
|
|
5258
|
+
}
|
|
5259
|
+
const movementEntries = [...movementCounts.entries()];
|
|
5260
|
+
const mostOftenHarderCaseIds = movementEntries.filter(([, counts]) => counts.harder > 0).sort((left, right) => {
|
|
5261
|
+
if (right[1].harder !== left[1].harder) {
|
|
5262
|
+
return right[1].harder - left[1].harder;
|
|
5263
|
+
}
|
|
5264
|
+
return left[0].localeCompare(right[0]);
|
|
5265
|
+
}).map(([caseId]) => caseId);
|
|
5266
|
+
const mostOftenEasierCaseIds = movementEntries.filter(([, counts]) => counts.easier > 0).sort((left, right) => {
|
|
5267
|
+
if (right[1].easier !== left[1].easier) {
|
|
5268
|
+
return right[1].easier - left[1].easier;
|
|
5269
|
+
}
|
|
5270
|
+
return left[0].localeCompare(right[0]);
|
|
5271
|
+
}).map(([caseId]) => caseId);
|
|
5272
|
+
return {
|
|
5273
|
+
easiestCaseIds: runs[runs.length - 1]?.entries.map((entry) => entry.caseId).reverse() ?? [],
|
|
5274
|
+
hardestCaseIds: runs[0]?.entries.map((entry) => entry.caseId) ?? [],
|
|
5275
|
+
mostOftenEasierCaseIds,
|
|
5276
|
+
mostOftenHarderCaseIds,
|
|
5277
|
+
movementCounts: Object.fromEntries(movementEntries.map(([caseId, counts]) => [
|
|
5278
|
+
caseId,
|
|
5279
|
+
{
|
|
5280
|
+
easier: counts.easier,
|
|
5281
|
+
harder: counts.harder,
|
|
5282
|
+
unchanged: counts.unchanged
|
|
5283
|
+
}
|
|
5284
|
+
]))
|
|
5285
|
+
};
|
|
5286
|
+
};
|
|
5211
5287
|
var buildRAGAnswerGroundingCaseDifficultyRunDiff = ({
|
|
5212
5288
|
current,
|
|
5213
5289
|
previous
|
|
@@ -5546,7 +5622,8 @@ var loadRAGAnswerGroundingCaseDifficultyHistory = async ({
|
|
|
5546
5622
|
previousRun,
|
|
5547
5623
|
runs,
|
|
5548
5624
|
suiteId: suite.id,
|
|
5549
|
-
suiteLabel: suite.label ?? suite.id
|
|
5625
|
+
suiteLabel: suite.label ?? suite.id,
|
|
5626
|
+
trends: buildRAGAnswerGroundingCaseDifficultyTrends({ runs })
|
|
5550
5627
|
};
|
|
5551
5628
|
};
|
|
5552
5629
|
var persistRAGEvaluationSuiteRun = async ({
|
|
@@ -11030,5 +11107,5 @@ export {
|
|
|
11030
11107
|
aiChat
|
|
11031
11108
|
};
|
|
11032
11109
|
|
|
11033
|
-
//# debugId=
|
|
11110
|
+
//# debugId=601251A55B5F4DCE64756E2164756E21
|
|
11034
11111
|
//# sourceMappingURL=index.js.map
|