@absolutejs/absolute 0.19.0-beta.533 → 0.19.0-beta.534

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.
@@ -1,7 +1,7 @@
1
1
  export { aiChat } from '../plugins/aiChat';
2
2
  export { streamAI } from './streamAI';
3
3
  export { ragChat } from './rag';
4
- export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGContext, buildRAGEvaluationLeaderboard, buildRAGEvaluationResponse, buildRAGEvaluationRunDiff, compareRAGRetrievalStrategies, compareRAGRerankers, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGBunS3SyncClient, createRAGFileEvaluationHistoryStore, createRAGEvaluationSuite, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGGmailEmailSyncClient, createRAGFileSyncStateStore, createRAGGraphEmailSyncClient, createRAGIMAPEmailSyncClient, createRAGStaticEmailSyncClient, createRAGStorageSyncSource, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGLexicalHaystack, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, createBuiltinArchiveExpander, createEmailExtractor, createEPUBExtractor, createLegacyDocumentExtractor, createRAGPDFOCRExtractor, createRAGArchiveExpander, createRAGArchiveFileExtractor, createOfficeDocumentExtractor, createPDFFileExtractor, createRAGCollection, createRAGEmbeddingProvider, createRAGFileExtractor, createRAGImageOCRExtractor, createHeuristicRAGReranker, createHeuristicRAGQueryTransform, createRAGHTMXConfig, createRAGMediaFileExtractor, createRAGMediaTranscriber, createRAGSyncManager, createRAGSyncScheduler, createRAGOCRProvider, createRAGUrlSyncSource, createRAGQueryTransform, createRAGReranker, fuseRAGQueryResults, createTextFileExtractor, createRAGHTMXWorkflowRenderConfig, alibabaEmbeddings, anthropicOCR, deepseekEmbeddings, geminiEmbeddings, geminiOCR, getLatestAssistantMessage, getLatestRAGSources, buildRAGStreamProgress, googleEmbeddings, ingestDocuments, ingestRAGDocuments, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentFromURL, loadRAGDocumentsFromURLs, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, ollamaOCR, ollamaTranscriber, openaiCompatibleEmbeddings, openaiCompatibleOCR, openaiCompatibleTranscriber, openaiEmbeddings, openaiOCR, openaiTranscriber, prepareRAGDirectoryDocuments, buildRAGUpsertInputFromUploads, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments, ragPlugin, resolveRAGQueryTransform, resolveRAGEmbeddingProvider, resolveRAGHybridSearchOptions, resolveRAGReranker, resolveRAGStreamStage, searchDocuments, scoreRAGLexicalMatch, applyRAGReranking, applyRAGQueryTransform, validateRAGEmbeddingDimensions, xaiEmbeddings } from './rag';
4
+ export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGContext, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGEvaluationLeaderboard, buildRAGEvaluationHistoryRows, buildRAGEvaluationResponse, buildRAGEvaluationRunDiff, compareRAGRetrievalStrategies, compareRAGRerankers, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGBunS3SyncClient, createRAGFileEvaluationHistoryStore, createRAGEvaluationSuite, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGGmailEmailSyncClient, createRAGFileSyncStateStore, createRAGGraphEmailSyncClient, createRAGIMAPEmailSyncClient, createRAGStaticEmailSyncClient, createRAGStorageSyncSource, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGLexicalHaystack, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, createBuiltinArchiveExpander, createEmailExtractor, createEPUBExtractor, createLegacyDocumentExtractor, createRAGPDFOCRExtractor, createRAGArchiveExpander, createRAGArchiveFileExtractor, createOfficeDocumentExtractor, createPDFFileExtractor, createRAGCollection, createRAGEmbeddingProvider, createRAGFileExtractor, createRAGImageOCRExtractor, createHeuristicRAGReranker, createHeuristicRAGQueryTransform, createRAGHTMXConfig, createRAGMediaFileExtractor, createRAGMediaTranscriber, createRAGSyncManager, createRAGSyncScheduler, createRAGOCRProvider, createRAGUrlSyncSource, createRAGQueryTransform, createRAGReranker, fuseRAGQueryResults, createTextFileExtractor, createRAGHTMXWorkflowRenderConfig, alibabaEmbeddings, anthropicOCR, deepseekEmbeddings, geminiEmbeddings, geminiOCR, getLatestAssistantMessage, getLatestRAGSources, buildRAGStreamProgress, googleEmbeddings, ingestDocuments, ingestRAGDocuments, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentFromURL, loadRAGDocumentsFromURLs, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, ollamaOCR, ollamaTranscriber, openaiCompatibleEmbeddings, openaiCompatibleOCR, openaiCompatibleTranscriber, openaiEmbeddings, openaiOCR, openaiTranscriber, prepareRAGDirectoryDocuments, buildRAGUpsertInputFromUploads, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments, ragPlugin, resolveRAGQueryTransform, resolveRAGEmbeddingProvider, resolveRAGHybridSearchOptions, resolveRAGReranker, resolveRAGStreamStage, searchDocuments, scoreRAGLexicalMatch, applyRAGReranking, applyRAGQueryTransform, validateRAGEmbeddingDimensions, xaiEmbeddings } from './rag';
5
5
  export { createInMemoryRAGStore } from './rag/adapters/inMemory';
6
6
  export { createSQLiteRAGStore } from './rag/adapters/sqlite';
7
7
  export { resolveAbsoluteSQLiteVec, resolveAbsoluteSQLiteVecExtensionPath } from './rag/resolveAbsoluteSQLiteVec';
@@ -10,7 +10,7 @@ export { createRAGGmailEmailSyncClient, createRAGGraphEmailSyncClient, createRAG
10
10
  export { buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, buildRAGUpsertInputFromUploads, createBuiltinArchiveExpander, createEmailExtractor, createEPUBExtractor, createLegacyDocumentExtractor, createRAGPDFOCRExtractor, createRAGArchiveExpander, createRAGArchiveFileExtractor, createOfficeDocumentExtractor, createPDFFileExtractor, createRAGFileExtractor, createRAGImageOCRExtractor, createRAGMediaFileExtractor, createRAGMediaTranscriber, createRAGOCRProvider, createTextFileExtractor, loadRAGDocumentFromURL, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentsFromURLs, prepareRAGDirectoryDocuments, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments } from './ingestion';
11
11
  export { buildRAGAnswerWorkflowState, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
12
12
  export { buildRAGContext } from './types';
13
- export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGEvaluationLeaderboard, buildRAGEvaluationResponse, buildRAGEvaluationRunDiff, compareRAGRetrievalStrategies, compareRAGRerankers, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGFileEvaluationHistoryStore, createRAGEvaluationSuite, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison } from './quality';
13
+ export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGEvaluationLeaderboard, buildRAGEvaluationHistoryRows, buildRAGEvaluationResponse, buildRAGEvaluationRunDiff, compareRAGRetrievalStrategies, compareRAGRerankers, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGFileEvaluationHistoryStore, createRAGEvaluationSuite, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison } from './quality';
14
14
  export { createRAGBunS3SyncClient, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGFileSyncStateStore, createRAGStaticEmailSyncClient, createRAGStorageSyncSource, createRAGSyncManager, createRAGSyncScheduler, createRAGUrlSyncSource } from './sync';
15
15
  export type { RAGStreamProgress, RAGStreamProgressState } from './presentation';
16
16
  export { createRAGCollection, ingestDocuments, ingestRAGDocuments, searchDocuments } from './collection';
@@ -1,4 +1,4 @@
1
- import type { RAGAnswerGroundingCaseDifficultyHistory, RAGAnswerGroundingCaseDifficultyHistoryStore, RAGAnswerGroundingCaseDifficultyRun, RAGAnswerGroundingCaseDifficultyRunDiff, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseDifficultyEntry, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalComparisonSummary, RAGRerankerCandidate, RAGRerankerComparison, RAGRerankerComparisonEntry, RAGRerankerComparisonSummary, RAGRerankerProviderLike } from '../../../types/ai';
1
+ import type { RAGAnswerGroundingCaseDifficultyHistory, RAGAnswerGroundingCaseDifficultyHistoryStore, RAGAnswerGroundingCaseDifficultyRun, RAGAnswerGroundingCaseDifficultyRunDiff, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseDifficultyEntry, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalComparisonSummary, RAGRerankerCandidate, RAGRerankerComparison, RAGRerankerComparisonEntry, RAGRerankerComparisonSummary, RAGRerankerProviderLike } from '../../../types/ai';
2
2
  export declare const buildRAGEvaluationLeaderboard: (runs: RAGEvaluationSuiteRun[]) => RAGEvaluationLeaderboardEntry[];
3
3
  export declare const buildRAGAnswerGroundingEvaluationLeaderboard: (runs: RAGAnswerGroundingEvaluationRun[]) => RAGAnswerGroundingEvaluationLeaderboardEntry[];
4
4
  export declare const buildRAGAnswerGroundingCaseDifficultyLeaderboard: (entries: Array<{
@@ -9,6 +9,9 @@ export declare const buildRAGAnswerGroundingCaseDifficultyRunDiff: ({ current, p
9
9
  current: RAGAnswerGroundingCaseDifficultyRun;
10
10
  previous?: RAGAnswerGroundingCaseDifficultyRun;
11
11
  }) => RAGAnswerGroundingCaseDifficultyRunDiff;
12
+ export declare const buildRAGComparisonTraceSummaryRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
13
+ export declare const buildRAGComparisonTraceDiffRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry, leader?: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
14
+ export declare const buildRAGEvaluationHistoryRows: (history?: RAGEvaluationHistory) => RAGLabelValueRow[];
12
15
  export declare const buildRAGEvaluationRunDiff: ({ current, previous }: {
13
16
  current: RAGEvaluationSuiteRun;
14
17
  previous?: RAGEvaluationSuiteRun;
@@ -2158,6 +2158,166 @@ var buildGroundingCaseSnapshots = ({
2158
2158
  });
2159
2159
  };
2160
2160
  var getStatusRank = (status) => status === "pass" ? 2 : status === "partial" ? 1 : 0;
2161
+ var formatSignedDelta = (value, decimals = 0, suffix = "") => `${value >= 0 ? "+" : ""}${value.toFixed(decimals)}${suffix}`;
2162
+ var formatEvaluationSummary = (response) => `${response.summary.passedCases}/${response.totalCases} pass \xB7 f1 ${response.summary.averageF1.toFixed(3)} \xB7 latency ${response.summary.averageLatencyMs.toFixed(1)}ms`;
2163
+ var formatHistoryCaseLabels = (cases) => cases.length > 0 ? cases.map((entry) => entry.label ?? entry.caseId).join(", ") : "none";
2164
+ var formatTraceModes = (modes) => modes.length > 0 ? modes.join(" / ") : "n/a";
2165
+ var formatTraceStageSummary = (stageCounts) => {
2166
+ const topStages = Object.entries(stageCounts).sort((left, right) => right[1] - left[1]).slice(0, 3);
2167
+ return topStages.length > 0 ? topStages.map(([stage, count]) => `${stage} ${count}`).join(" \xB7 ") : "n/a";
2168
+ };
2169
+ var formatTraceRatio = (count, total) => `${count}/${total}`;
2170
+ var formatTraceCountDelta = (value) => `${value >= 0 ? "+" : ""}${value}`;
2171
+ var buildRAGComparisonTraceSummaryRows = (entry) => {
2172
+ const trace = entry.traceSummary;
2173
+ if (!trace) {
2174
+ return [{ label: "Trace", value: "Unavailable" }];
2175
+ }
2176
+ return [
2177
+ { label: "Modes", value: formatTraceModes(trace.modes) },
2178
+ { label: "Avg final", value: trace.averageFinalCount.toFixed(1) },
2179
+ { label: "Avg vector", value: trace.averageVectorCount.toFixed(1) },
2180
+ { label: "Avg lexical", value: trace.averageLexicalCount.toFixed(1) },
2181
+ {
2182
+ label: "Transforms",
2183
+ value: formatTraceRatio(trace.transformedCases, trace.totalCases)
2184
+ },
2185
+ {
2186
+ label: "Variants",
2187
+ value: formatTraceRatio(trace.variantCases, trace.totalCases)
2188
+ },
2189
+ {
2190
+ label: "TopK",
2191
+ value: `${trace.averageCandidateTopK.toFixed(1)} / ${trace.averageLexicalTopK.toFixed(1)}`
2192
+ },
2193
+ {
2194
+ label: "Stages",
2195
+ value: formatTraceStageSummary(trace.stageCounts)
2196
+ }
2197
+ ];
2198
+ };
2199
+ var buildRAGComparisonTraceDiffRows = (entry, leader) => {
2200
+ const trace = entry.traceSummary;
2201
+ if (!trace) {
2202
+ return [{ label: "Trace", value: "Unavailable for comparison" }];
2203
+ }
2204
+ const leaderTrace = leader?.traceSummary;
2205
+ if (!leaderTrace) {
2206
+ return [{ label: "Baseline", value: "Leader trace unavailable" }];
2207
+ }
2208
+ if (entry === leader) {
2209
+ return [{ label: "Baseline", value: "Leader strategy" }];
2210
+ }
2211
+ const stageDelta = Object.keys({
2212
+ ...leaderTrace.stageCounts,
2213
+ ...trace.stageCounts
2214
+ }).map((stage) => {
2215
+ const typedStage = stage;
2216
+ const delta = (trace.stageCounts[typedStage] ?? 0) - (leaderTrace.stageCounts[typedStage] ?? 0);
2217
+ return delta === 0 ? null : `${typedStage} ${formatTraceCountDelta(delta)}`;
2218
+ }).filter((value) => Boolean(value)).slice(0, 3).join(" \xB7 ");
2219
+ const rows = [
2220
+ { label: "Baseline", value: leader.label }
2221
+ ];
2222
+ if (formatTraceModes(trace.modes) !== formatTraceModes(leaderTrace.modes)) {
2223
+ rows.push({
2224
+ label: "Modes vs leader",
2225
+ value: `${formatTraceModes(trace.modes)} vs ${formatTraceModes(leaderTrace.modes)}`
2226
+ });
2227
+ }
2228
+ rows.push({
2229
+ label: "Final delta",
2230
+ value: formatSignedDelta(trace.averageFinalCount - leaderTrace.averageFinalCount, 1)
2231
+ }, {
2232
+ label: "Vector delta",
2233
+ value: formatSignedDelta(trace.averageVectorCount - leaderTrace.averageVectorCount, 1)
2234
+ }, {
2235
+ label: "Lexical delta",
2236
+ value: formatSignedDelta(trace.averageLexicalCount - leaderTrace.averageLexicalCount, 1)
2237
+ }, {
2238
+ label: "Transform delta",
2239
+ value: formatTraceCountDelta(trace.transformedCases - leaderTrace.transformedCases)
2240
+ });
2241
+ if (stageDelta) {
2242
+ rows.push({ label: "Stage delta", value: stageDelta });
2243
+ }
2244
+ return rows;
2245
+ };
2246
+ var buildRAGEvaluationHistoryRows = (history) => {
2247
+ if (!history?.latestRun) {
2248
+ return [
2249
+ { label: "History", value: "No persisted benchmark runs yet." }
2250
+ ];
2251
+ }
2252
+ const rows = [
2253
+ { label: "Runs recorded", value: String(history.runs.length) },
2254
+ {
2255
+ label: "Latest",
2256
+ value: `${history.latestRun.label} \xB7 ${formatEvaluationSummary(history.latestRun.response)}`
2257
+ }
2258
+ ];
2259
+ if (history.latestRun.traceSummary) {
2260
+ rows.push({
2261
+ label: "Latest trace",
2262
+ value: `${formatTraceModes(history.latestRun.traceSummary.modes)} \xB7 final ${history.latestRun.traceSummary.averageFinalCount.toFixed(1)} \xB7 vector ${history.latestRun.traceSummary.averageVectorCount.toFixed(1)} \xB7 lexical ${history.latestRun.traceSummary.averageLexicalCount.toFixed(1)}`
2263
+ });
2264
+ }
2265
+ if (history.previousRun) {
2266
+ rows.push({
2267
+ label: "Previous",
2268
+ value: `${history.previousRun.label} \xB7 ${formatEvaluationSummary(history.previousRun.response)}`
2269
+ });
2270
+ }
2271
+ if (!history.diff) {
2272
+ rows.push({
2273
+ label: "History diff",
2274
+ value: "Run the benchmark again to diff regressions over time."
2275
+ });
2276
+ return rows;
2277
+ }
2278
+ rows.push({
2279
+ label: "Passing delta",
2280
+ value: formatSignedDelta(history.diff.summaryDelta.passingRate, 1, "%")
2281
+ }, {
2282
+ label: "Average F1 delta",
2283
+ value: formatSignedDelta(history.diff.summaryDelta.averageF1, 3)
2284
+ }, {
2285
+ label: "Latency delta",
2286
+ value: formatSignedDelta(history.diff.summaryDelta.averageLatencyMs, 1, "ms")
2287
+ }, {
2288
+ label: "Improved",
2289
+ value: formatHistoryCaseLabels(history.diff.improvedCases)
2290
+ }, {
2291
+ label: "Regressed",
2292
+ value: formatHistoryCaseLabels(history.diff.regressedCases)
2293
+ });
2294
+ if (history.diff.traceSummaryDelta) {
2295
+ rows.push({
2296
+ label: "Trace mode shift",
2297
+ value: history.diff.traceSummaryDelta.modesChanged ? "changed" : "stable"
2298
+ }, {
2299
+ label: "Trace final delta",
2300
+ value: formatSignedDelta(history.diff.traceSummaryDelta.averageFinalCount, 1)
2301
+ }, {
2302
+ label: "Trace vector delta",
2303
+ value: formatSignedDelta(history.diff.traceSummaryDelta.averageVectorCount, 1)
2304
+ }, {
2305
+ label: "Trace lexical delta",
2306
+ value: formatSignedDelta(history.diff.traceSummaryDelta.averageLexicalCount, 1)
2307
+ }, {
2308
+ label: "Trace transform delta",
2309
+ value: formatTraceCountDelta(history.diff.traceSummaryDelta.transformedCases)
2310
+ }, {
2311
+ label: "Trace variant delta",
2312
+ value: formatTraceCountDelta(history.diff.traceSummaryDelta.variantCases)
2313
+ });
2314
+ const stageDelta = Object.entries(history.diff.traceSummaryDelta.stageCounts ?? {}).map(([stage, count]) => `${stage} ${formatTraceCountDelta(count)}`).join(", ");
2315
+ if (stageDelta) {
2316
+ rows.push({ label: "Trace stage delta", value: stageDelta });
2317
+ }
2318
+ }
2319
+ return rows;
2320
+ };
2161
2321
  var buildRAGEvaluationRunDiff = ({
2162
2322
  current,
2163
2323
  previous
@@ -3454,5 +3614,5 @@ export {
3454
3614
  createAIStream
3455
3615
  };
3456
3616
 
3457
- //# debugId=4CDEE3E3E09A9FC864756E2164756E21
3617
+ //# debugId=E92A24FDA13560A364756E2164756E21
3458
3618
  //# sourceMappingURL=index.js.map