@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/types/ai.d.ts
CHANGED
|
@@ -1003,6 +1003,17 @@ export type RAGAnswerGroundingCaseDifficultyHistory = {
|
|
|
1003
1003
|
latestRun?: RAGAnswerGroundingCaseDifficultyRun;
|
|
1004
1004
|
previousRun?: RAGAnswerGroundingCaseDifficultyRun;
|
|
1005
1005
|
diff?: RAGAnswerGroundingCaseDifficultyRunDiff;
|
|
1006
|
+
trends: {
|
|
1007
|
+
hardestCaseIds: string[];
|
|
1008
|
+
easiestCaseIds: string[];
|
|
1009
|
+
mostOftenHarderCaseIds: string[];
|
|
1010
|
+
mostOftenEasierCaseIds: string[];
|
|
1011
|
+
movementCounts: Record<string, {
|
|
1012
|
+
harder: number;
|
|
1013
|
+
easier: number;
|
|
1014
|
+
unchanged: number;
|
|
1015
|
+
}>;
|
|
1016
|
+
};
|
|
1006
1017
|
};
|
|
1007
1018
|
export type RAGAnswerGroundingEvaluationCaseDiff = {
|
|
1008
1019
|
caseId: string;
|
package/dist/vue/ai/index.js
CHANGED
|
@@ -1819,6 +1819,82 @@ var buildGroundingDifficultyDiffEntry = (current, previous) => ({
|
|
|
1819
1819
|
previousRank: previous?.rank,
|
|
1820
1820
|
query: current.query
|
|
1821
1821
|
});
|
|
1822
|
+
var buildRAGAnswerGroundingCaseDifficultyTrends = ({
|
|
1823
|
+
runs
|
|
1824
|
+
}) => {
|
|
1825
|
+
const movementCounts = new Map;
|
|
1826
|
+
for (let index = 0;index < runs.length - 1; index += 1) {
|
|
1827
|
+
const current = runs[index];
|
|
1828
|
+
const previous = runs[index + 1];
|
|
1829
|
+
if (!current || !previous) {
|
|
1830
|
+
continue;
|
|
1831
|
+
}
|
|
1832
|
+
const diff = buildRAGAnswerGroundingCaseDifficultyRunDiff({
|
|
1833
|
+
current,
|
|
1834
|
+
previous
|
|
1835
|
+
});
|
|
1836
|
+
for (const entry of diff.harderCases) {
|
|
1837
|
+
const currentCounts = movementCounts.get(entry.caseId) ?? {
|
|
1838
|
+
easier: 0,
|
|
1839
|
+
harder: 0,
|
|
1840
|
+
label: entry.label,
|
|
1841
|
+
unchanged: 0
|
|
1842
|
+
};
|
|
1843
|
+
currentCounts.harder += 1;
|
|
1844
|
+
currentCounts.label ??= entry.label;
|
|
1845
|
+
movementCounts.set(entry.caseId, currentCounts);
|
|
1846
|
+
}
|
|
1847
|
+
for (const entry of diff.easierCases) {
|
|
1848
|
+
const currentCounts = movementCounts.get(entry.caseId) ?? {
|
|
1849
|
+
easier: 0,
|
|
1850
|
+
harder: 0,
|
|
1851
|
+
label: entry.label,
|
|
1852
|
+
unchanged: 0
|
|
1853
|
+
};
|
|
1854
|
+
currentCounts.easier += 1;
|
|
1855
|
+
currentCounts.label ??= entry.label;
|
|
1856
|
+
movementCounts.set(entry.caseId, currentCounts);
|
|
1857
|
+
}
|
|
1858
|
+
for (const entry of diff.unchangedCases) {
|
|
1859
|
+
const currentCounts = movementCounts.get(entry.caseId) ?? {
|
|
1860
|
+
easier: 0,
|
|
1861
|
+
harder: 0,
|
|
1862
|
+
label: entry.label,
|
|
1863
|
+
unchanged: 0
|
|
1864
|
+
};
|
|
1865
|
+
currentCounts.unchanged += 1;
|
|
1866
|
+
currentCounts.label ??= entry.label;
|
|
1867
|
+
movementCounts.set(entry.caseId, currentCounts);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
const movementEntries = [...movementCounts.entries()];
|
|
1871
|
+
const mostOftenHarderCaseIds = movementEntries.filter(([, counts]) => counts.harder > 0).sort((left, right) => {
|
|
1872
|
+
if (right[1].harder !== left[1].harder) {
|
|
1873
|
+
return right[1].harder - left[1].harder;
|
|
1874
|
+
}
|
|
1875
|
+
return left[0].localeCompare(right[0]);
|
|
1876
|
+
}).map(([caseId]) => caseId);
|
|
1877
|
+
const mostOftenEasierCaseIds = movementEntries.filter(([, counts]) => counts.easier > 0).sort((left, right) => {
|
|
1878
|
+
if (right[1].easier !== left[1].easier) {
|
|
1879
|
+
return right[1].easier - left[1].easier;
|
|
1880
|
+
}
|
|
1881
|
+
return left[0].localeCompare(right[0]);
|
|
1882
|
+
}).map(([caseId]) => caseId);
|
|
1883
|
+
return {
|
|
1884
|
+
easiestCaseIds: runs[runs.length - 1]?.entries.map((entry) => entry.caseId).reverse() ?? [],
|
|
1885
|
+
hardestCaseIds: runs[0]?.entries.map((entry) => entry.caseId) ?? [],
|
|
1886
|
+
mostOftenEasierCaseIds,
|
|
1887
|
+
mostOftenHarderCaseIds,
|
|
1888
|
+
movementCounts: Object.fromEntries(movementEntries.map(([caseId, counts]) => [
|
|
1889
|
+
caseId,
|
|
1890
|
+
{
|
|
1891
|
+
easier: counts.easier,
|
|
1892
|
+
harder: counts.harder,
|
|
1893
|
+
unchanged: counts.unchanged
|
|
1894
|
+
}
|
|
1895
|
+
]))
|
|
1896
|
+
};
|
|
1897
|
+
};
|
|
1822
1898
|
var buildRAGAnswerGroundingCaseDifficultyRunDiff = ({
|
|
1823
1899
|
current,
|
|
1824
1900
|
previous
|
|
@@ -2157,7 +2233,8 @@ var loadRAGAnswerGroundingCaseDifficultyHistory = async ({
|
|
|
2157
2233
|
previousRun,
|
|
2158
2234
|
runs,
|
|
2159
2235
|
suiteId: suite.id,
|
|
2160
|
-
suiteLabel: suite.label ?? suite.id
|
|
2236
|
+
suiteLabel: suite.label ?? suite.id,
|
|
2237
|
+
trends: buildRAGAnswerGroundingCaseDifficultyTrends({ runs })
|
|
2161
2238
|
};
|
|
2162
2239
|
};
|
|
2163
2240
|
var persistRAGEvaluationSuiteRun = async ({
|
|
@@ -3197,5 +3274,5 @@ export {
|
|
|
3197
3274
|
AIStreamKey
|
|
3198
3275
|
};
|
|
3199
3276
|
|
|
3200
|
-
//# debugId=
|
|
3277
|
+
//# debugId=FCF3EE50E141C64C64756E2164756E21
|
|
3201
3278
|
//# sourceMappingURL=index.js.map
|