@absolutejs/absolute 0.19.0-beta.538 → 0.19.0-beta.539
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 +69 -1
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +72 -1
- package/dist/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +69 -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 +4 -1
- package/dist/svelte/ai/index.js +69 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +10 -0
- package/dist/vue/ai/index.js +69 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +1 -1
package/dist/ai/index.js
CHANGED
|
@@ -5834,8 +5834,11 @@ var buildEvaluationCaseTraceSnapshots = ({
|
|
|
5834
5834
|
};
|
|
5835
5835
|
var getStatusRank = (status) => status === "pass" ? 2 : status === "partial" ? 1 : 0;
|
|
5836
5836
|
var formatSignedDelta = (value, decimals = 0, suffix = "") => `${value >= 0 ? "+" : ""}${value.toFixed(decimals)}${suffix}`;
|
|
5837
|
+
var formatEvaluationPassingRate = (value) => `${value.toFixed(1)}%`;
|
|
5837
5838
|
var formatEvaluationSummary = (response) => `${response.summary.passedCases}/${response.totalCases} pass \xB7 f1 ${response.summary.averageF1.toFixed(3)} \xB7 latency ${response.summary.averageLatencyMs.toFixed(1)}ms`;
|
|
5839
|
+
var formatGroundingHistorySummaryValue = (response) => `${response.summary.passedCases}/${response.summary.totalCases} pass \xB7 grounded ${response.summary.groundedCases} \xB7 partial ${response.summary.partialCases} \xB7 ungrounded ${response.summary.ungroundedCases} \xB7 resolved citations ${(response.summary.averageResolvedCitationRate * 100).toFixed(1)}% \xB7 citation f1 ${response.summary.averageCitationF1.toFixed(3)}`;
|
|
5838
5840
|
var formatHistoryCaseLabels = (cases) => cases.length > 0 ? cases.map((entry) => entry.label ?? entry.caseId).join(", ") : "none";
|
|
5841
|
+
var formatGroundingHistoryCaseLabels = (cases) => cases.length > 0 ? cases.map((entry) => entry.label ?? entry.caseId).join(", ") : "none";
|
|
5839
5842
|
var formatTraceModes = (modes) => modes.length > 0 ? modes.join(" / ") : "n/a";
|
|
5840
5843
|
var formatTraceStageSummary = (stageCounts) => {
|
|
5841
5844
|
const topStages = Object.entries(stageCounts).sort((left, right) => right[1] - left[1]).slice(0, 3);
|
|
@@ -6058,6 +6061,11 @@ var buildRAGEvaluationCaseTracePresentations = (history) => {
|
|
|
6058
6061
|
};
|
|
6059
6062
|
});
|
|
6060
6063
|
};
|
|
6064
|
+
var buildRAGEvaluationHistoryPresentation = (history) => ({
|
|
6065
|
+
caseTraces: buildRAGEvaluationCaseTracePresentations(history),
|
|
6066
|
+
rows: buildRAGEvaluationHistoryRows(history),
|
|
6067
|
+
summary: history?.latestRun ? history.latestRun.label : "No persisted benchmark runs yet."
|
|
6068
|
+
});
|
|
6061
6069
|
var buildRAGEvaluationRunDiff = ({
|
|
6062
6070
|
current,
|
|
6063
6071
|
previous
|
|
@@ -6189,6 +6197,66 @@ var buildRAGAnswerGroundingCaseSnapshotPresentations = (history) => {
|
|
|
6189
6197
|
};
|
|
6190
6198
|
});
|
|
6191
6199
|
};
|
|
6200
|
+
var buildRAGAnswerGroundingHistoryRows = (history) => {
|
|
6201
|
+
if (!history?.latestRun) {
|
|
6202
|
+
return [{ label: "History", value: "No persisted provider runs yet." }];
|
|
6203
|
+
}
|
|
6204
|
+
const rows = [
|
|
6205
|
+
{ label: "Runs recorded", value: String(history.runs.length) },
|
|
6206
|
+
{
|
|
6207
|
+
label: "Latest",
|
|
6208
|
+
value: `${history.latestRun.label} \xB7 ${formatGroundingHistorySummaryValue(history.latestRun.response)}`
|
|
6209
|
+
}
|
|
6210
|
+
];
|
|
6211
|
+
if (history.previousRun) {
|
|
6212
|
+
rows.push({
|
|
6213
|
+
label: "Previous",
|
|
6214
|
+
value: `${history.previousRun.label} \xB7 ${formatGroundingHistorySummaryValue(history.previousRun.response)}`
|
|
6215
|
+
});
|
|
6216
|
+
}
|
|
6217
|
+
if (history.leaderboard[0]) {
|
|
6218
|
+
rows.push({
|
|
6219
|
+
label: "Best recorded",
|
|
6220
|
+
value: `#${history.leaderboard[0].rank} \xB7 ${history.leaderboard[0].label} \xB7 passing ${formatEvaluationPassingRate(history.leaderboard[0].passingRate)} \xB7 citation f1 ${history.leaderboard[0].averageCitationF1.toFixed(3)} \xB7 resolved ${formatEvaluationPassingRate(history.leaderboard[0].averageResolvedCitationRate)}`
|
|
6221
|
+
});
|
|
6222
|
+
}
|
|
6223
|
+
if (history.caseSnapshots.length > 0) {
|
|
6224
|
+
const changedAnswers = history.caseSnapshots.filter((entry) => entry.answerChange === "changed").length;
|
|
6225
|
+
rows.push({
|
|
6226
|
+
label: "Answer drift",
|
|
6227
|
+
value: `${changedAnswers}/${history.caseSnapshots.length} changed`
|
|
6228
|
+
});
|
|
6229
|
+
}
|
|
6230
|
+
if (!history.diff) {
|
|
6231
|
+
rows.push({
|
|
6232
|
+
label: "History diff",
|
|
6233
|
+
value: "Run the provider comparison again to diff grounding regressions over time."
|
|
6234
|
+
});
|
|
6235
|
+
return rows;
|
|
6236
|
+
}
|
|
6237
|
+
rows.push({
|
|
6238
|
+
label: "Passing delta",
|
|
6239
|
+
value: formatSignedDelta(history.diff.summaryDelta.passingRate, 1, "%")
|
|
6240
|
+
}, {
|
|
6241
|
+
label: "Citation F1 delta",
|
|
6242
|
+
value: formatSignedDelta(history.diff.summaryDelta.averageCitationF1, 3)
|
|
6243
|
+
}, {
|
|
6244
|
+
label: "Resolved citation delta",
|
|
6245
|
+
value: formatSignedDelta(history.diff.summaryDelta.averageResolvedCitationRate * 100, 1, "%")
|
|
6246
|
+
}, {
|
|
6247
|
+
label: "Improved",
|
|
6248
|
+
value: formatGroundingHistoryCaseLabels(history.diff.improvedCases)
|
|
6249
|
+
}, {
|
|
6250
|
+
label: "Regressed",
|
|
6251
|
+
value: formatGroundingHistoryCaseLabels(history.diff.regressedCases)
|
|
6252
|
+
});
|
|
6253
|
+
return rows;
|
|
6254
|
+
};
|
|
6255
|
+
var buildRAGAnswerGroundingHistoryPresentation = (history) => ({
|
|
6256
|
+
caseSnapshots: buildRAGAnswerGroundingCaseSnapshotPresentations(history),
|
|
6257
|
+
rows: buildRAGAnswerGroundingHistoryRows(history),
|
|
6258
|
+
summary: history?.latestRun ? history.latestRun.label : "No persisted provider runs yet."
|
|
6259
|
+
});
|
|
6192
6260
|
var createRAGFileEvaluationHistoryStore = (path) => ({
|
|
6193
6261
|
listRuns: async ({ limit, suiteId } = {}) => {
|
|
6194
6262
|
let parsed = [];
|
|
@@ -11877,12 +11945,15 @@ export {
|
|
|
11877
11945
|
buildRAGEvaluationResponse,
|
|
11878
11946
|
buildRAGEvaluationLeaderboard,
|
|
11879
11947
|
buildRAGEvaluationHistoryRows,
|
|
11948
|
+
buildRAGEvaluationHistoryPresentation,
|
|
11880
11949
|
buildRAGEvaluationCaseTracePresentations,
|
|
11881
11950
|
buildRAGContext,
|
|
11882
11951
|
buildRAGComparisonTraceSummaryRows,
|
|
11883
11952
|
buildRAGComparisonTraceDiffRows,
|
|
11884
11953
|
buildRAGCitations,
|
|
11885
11954
|
buildRAGCitationReferenceMap,
|
|
11955
|
+
buildRAGAnswerGroundingHistoryRows,
|
|
11956
|
+
buildRAGAnswerGroundingHistoryPresentation,
|
|
11886
11957
|
buildRAGAnswerGroundingEvaluationRunDiff,
|
|
11887
11958
|
buildRAGAnswerGroundingEvaluationResponse,
|
|
11888
11959
|
buildRAGAnswerGroundingEvaluationLeaderboard,
|
|
@@ -11897,5 +11968,5 @@ export {
|
|
|
11897
11968
|
aiChat
|
|
11898
11969
|
};
|
|
11899
11970
|
|
|
11900
|
-
//# debugId=
|
|
11971
|
+
//# debugId=188A5A929B4F9DCA64756E2164756E21
|
|
11901
11972
|
//# sourceMappingURL=index.js.map
|