@absolutejs/absolute 0.19.0-beta.535 → 0.19.0-beta.537

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, 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';
4
+ export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGContext, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGEvaluationCaseTracePresentations, 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, buildRAGRetrievalTracePresentation, 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, formatRAGTraceValue, 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';
@@ -8,9 +8,9 @@ export { alibabaEmbeddings, deepseekEmbeddings, geminiEmbeddings, googleEmbeddin
8
8
  export { anthropicOCR, geminiOCR, ollamaOCR, ollamaTranscriber, openaiCompatibleOCR, openaiCompatibleTranscriber, openaiOCR, openaiTranscriber } from './extractorProviders';
9
9
  export { createRAGGmailEmailSyncClient, createRAGGraphEmailSyncClient, createRAGIMAPEmailSyncClient } from './emailProviders';
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
- export { buildRAGAnswerWorkflowState, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
11
+ export { buildRAGAnswerWorkflowState, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGRetrievalTracePresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, formatRAGTraceValue, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
12
12
  export { buildRAGContext } from './types';
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';
13
+ export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGEvaluationCaseTracePresentations, 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,6 @@
1
- import type { AIMessage, RAGAnswerWorkflowState, RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundingReference, RAGRetrievalTrace, RAGSourceSummary, RAGStreamStage, RAGSource, RAGSourceGroup } from '../../../types/ai';
1
+ import type { AIMessage, RAGAnswerWorkflowState, RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundingReference, RAGRetrievalTrace, RAGRetrievalTracePresentation, RAGSourceSummary, RAGStreamStage, RAGSource, RAGSourceGroup } from '../../../types/ai';
2
+ export declare const formatRAGTraceValue: (value: unknown) => string;
3
+ export declare const buildRAGRetrievalTracePresentation: (trace?: RAGRetrievalTrace) => RAGRetrievalTracePresentation;
2
4
  export declare const buildRAGCitationReferenceMap: (citations: RAGCitation[]) => RAGCitationReferenceMap;
3
5
  export declare const buildRAGCitations: (sources: RAGSource[]) => RAGCitation[];
4
6
  export declare const buildRAGGroundedAnswer: (content: string, sources: RAGSource[]) => RAGGroundedAnswer;
@@ -1,4 +1,4 @@
1
- import type { RAGAnswerGroundingCaseDifficultyHistory, RAGAnswerGroundingCaseDifficultyHistoryStore, RAGAnswerGroundingCaseDifficultyRun, RAGAnswerGroundingCaseDifficultyRunDiff, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseDifficultyEntry, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseTraceSnapshot, RAGEvaluationCaseResult, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalTraceComparisonSummary, 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, RAGEvaluationCaseTracePresentation, RAGEvaluationCaseTraceSnapshot, RAGEvaluationCaseResult, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalTraceComparisonSummary, 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<{
@@ -12,6 +12,7 @@ export declare const buildRAGAnswerGroundingCaseDifficultyRunDiff: ({ current, p
12
12
  export declare const buildRAGComparisonTraceSummaryRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
13
13
  export declare const buildRAGComparisonTraceDiffRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry, leader?: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
14
14
  export declare const buildRAGEvaluationHistoryRows: (history?: RAGEvaluationHistory) => RAGLabelValueRow[];
15
+ export declare const buildRAGEvaluationCaseTracePresentations: (history?: RAGEvaluationHistory) => RAGEvaluationCaseTracePresentation[];
15
16
  export declare const buildRAGEvaluationRunDiff: ({ current, previous }: {
16
17
  current: RAGEvaluationSuiteRun;
17
18
  previous?: RAGEvaluationSuiteRun;
@@ -1138,6 +1138,69 @@ var formatTimestampLabel = (value) => {
1138
1138
  timeStyle: "short"
1139
1139
  });
1140
1140
  };
1141
+ var formatRAGTraceValue = (value) => {
1142
+ if (typeof value === "string")
1143
+ return value;
1144
+ if (typeof value === "number" || typeof value === "boolean") {
1145
+ return String(value);
1146
+ }
1147
+ if (Array.isArray(value)) {
1148
+ return value.join(", ");
1149
+ }
1150
+ if (value && typeof value === "object") {
1151
+ return JSON.stringify(value);
1152
+ }
1153
+ return "n/a";
1154
+ };
1155
+ var buildRAGRetrievalTracePresentation = (trace) => {
1156
+ if (!trace) {
1157
+ return {
1158
+ details: [],
1159
+ stats: [],
1160
+ steps: []
1161
+ };
1162
+ }
1163
+ const stats = [
1164
+ { label: "Mode", value: trace.mode },
1165
+ { label: "Final Results", value: String(trace.resultCounts.final) },
1166
+ {
1167
+ label: "Vector Candidates",
1168
+ value: String(trace.resultCounts.vector)
1169
+ },
1170
+ {
1171
+ label: "Lexical Candidates",
1172
+ value: String(trace.resultCounts.lexical)
1173
+ }
1174
+ ];
1175
+ const details = [
1176
+ { label: "Transformed query", value: trace.transformedQuery },
1177
+ {
1178
+ label: "Variant queries",
1179
+ value: trace.variantQueries.length > 0 ? trace.variantQueries.join(" \xB7 ") : "none"
1180
+ },
1181
+ { label: "Candidate topK", value: String(trace.candidateTopK) },
1182
+ { label: "Lexical topK", value: String(trace.lexicalTopK) }
1183
+ ];
1184
+ const steps = trace.steps.map((step) => ({
1185
+ count: step.count,
1186
+ label: step.label,
1187
+ rows: [
1188
+ { label: "stage", value: step.stage },
1189
+ ...typeof step.count === "number" ? [{ label: "count", value: String(step.count) }] : [],
1190
+ ...typeof step.durationMs === "number" ? [{ label: "durationMs", value: String(step.durationMs) }] : [],
1191
+ ...Object.entries(step.metadata ?? {}).map(([key, value]) => ({
1192
+ label: key,
1193
+ value: formatRAGTraceValue(value)
1194
+ }))
1195
+ ],
1196
+ stage: step.stage
1197
+ }));
1198
+ return {
1199
+ details,
1200
+ stats,
1201
+ steps
1202
+ };
1203
+ };
1141
1204
  var formatMediaTimestamp = (value) => {
1142
1205
  if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
1143
1206
  return;
@@ -2417,6 +2480,64 @@ var buildRAGEvaluationHistoryRows = (history) => {
2417
2480
  }
2418
2481
  return rows;
2419
2482
  };
2483
+ var buildRAGEvaluationCaseTracePresentations = (history) => {
2484
+ if (!history?.caseTraceSnapshots.length) {
2485
+ return [];
2486
+ }
2487
+ return history.caseTraceSnapshots.map((entry) => {
2488
+ const label = entry.label ?? entry.caseId;
2489
+ const currentMode = entry.traceMode ?? "no-trace";
2490
+ const previousMode = entry.previousTraceMode ?? "n/a";
2491
+ const currentVariants = entry.variantQueries.length > 0 ? entry.variantQueries.join(", ") : "none";
2492
+ const previousVariants = entry.previousVariantQueries.length > 0 ? entry.previousVariantQueries.join(", ") : "none";
2493
+ const currentStages = Object.keys(entry.stageCounts).length > 0 ? Object.entries(entry.stageCounts).map(([stage, count]) => `${stage} ${count}`).join(", ") : "none";
2494
+ const previousStages = Object.keys(entry.previousStageCounts).length > 0 ? Object.entries(entry.previousStageCounts).map(([stage, count]) => `${stage} ${count}`).join(", ") : "none";
2495
+ return {
2496
+ caseId: entry.caseId,
2497
+ label,
2498
+ summary: `${entry.traceChange} \xB7 ${previousMode}\u2192${currentMode} \xB7 final ${entry.previousFinalCount ?? 0}\u2192${entry.finalCount}`,
2499
+ traceChange: entry.traceChange,
2500
+ rows: [
2501
+ { label: "Query", value: entry.query },
2502
+ { label: "Trace change", value: entry.traceChange },
2503
+ { label: "Mode", value: `${previousMode}\u2192${currentMode}` },
2504
+ {
2505
+ label: "Transformed query",
2506
+ value: `${entry.previousTransformedQuery?.trim() || "n/a"}\u2192${entry.transformedQuery?.trim() || "n/a"}`
2507
+ },
2508
+ {
2509
+ label: "Final",
2510
+ value: `${entry.previousFinalCount ?? 0}\u2192${entry.finalCount}`
2511
+ },
2512
+ {
2513
+ label: "Vector",
2514
+ value: `${entry.previousVectorCount ?? 0}\u2192${entry.vectorCount}`
2515
+ },
2516
+ {
2517
+ label: "Lexical",
2518
+ value: `${entry.previousLexicalCount ?? 0}\u2192${entry.lexicalCount}`
2519
+ },
2520
+ {
2521
+ label: "Candidate topK",
2522
+ value: `${entry.previousCandidateTopK ?? 0}\u2192${entry.candidateTopK}`
2523
+ },
2524
+ {
2525
+ label: "Lexical topK",
2526
+ value: `${entry.previousLexicalTopK ?? 0}\u2192${entry.lexicalTopK}`
2527
+ },
2528
+ {
2529
+ label: "Variants",
2530
+ value: `${previousVariants}\u2192${currentVariants}`
2531
+ },
2532
+ {
2533
+ label: "Stages",
2534
+ value: `${previousStages}\u2192${currentStages}`
2535
+ },
2536
+ { label: "Status", value: entry.status }
2537
+ ]
2538
+ };
2539
+ });
2540
+ };
2420
2541
  var buildRAGEvaluationRunDiff = ({
2421
2542
  current,
2422
2543
  previous
@@ -3722,5 +3843,5 @@ export {
3722
3843
  createAIStream
3723
3844
  };
3724
3845
 
3725
- //# debugId=609C67383E3D7B6464756E2164756E21
3846
+ //# debugId=E353AC239A0A967464756E2164756E21
3726
3847
  //# sourceMappingURL=index.js.map