@absolutejs/absolute 0.19.0-beta.540 → 0.19.0-beta.542

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, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGContext, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGRetrievalComparisonCardPresentations, buildRAGRerankerComparisonCardPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, 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';
4
+ export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGGroundingProviderCardPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGContext, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGRetrievalComparisonCardPresentations, buildRAGRerankerComparisonCardPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, 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';
@@ -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, buildRAGRetrievalTracePresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, formatRAGTraceValue, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
12
12
  export { buildRAGContext } from './types';
13
- export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGRetrievalComparisonCardPresentations, buildRAGRerankerComparisonCardPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, 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, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGGroundingProviderCardPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGRetrievalComparisonCardPresentations, buildRAGRerankerComparisonCardPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, 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, RAGAnswerGroundingCaseSnapshotPresentation, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingHistoryPresentation, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseTracePresentation, RAGEvaluationCaseTraceSnapshot, RAGEvaluationCaseResult, RAGEvaluationHistoryPresentation, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow, RAGComparisonCardPresentation, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalTraceComparisonSummary, RAGRetrievalComparisonSummary, RAGRerankerCandidate, RAGRerankerComparison, RAGRerankerComparisonEntry, RAGRerankerComparisonSummary, RAGRerankerProviderLike } from '../../../types/ai';
1
+ import type { RAGAnswerGroundingCaseDifficultyHistory, RAGAnswerGroundingCaseDifficultyHistoryStore, RAGAnswerGroundingCaseDifficultyRun, RAGAnswerGroundingCaseDifficultyRunDiff, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseDifficultyEntry, RAGAnswerGroundingCaseSnapshotPresentation, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingHistoryPresentation, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseTracePresentation, RAGEvaluationCaseTraceSnapshot, RAGEvaluationCaseResult, RAGEvaluationHistoryPresentation, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow, RAGComparisonCardPresentation, RAGGroundingProviderCardPresentation, RAGGroundingProviderOverviewPresentation, RAGGroundingProviderCaseComparisonPresentation, 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<{
@@ -13,6 +13,47 @@ export declare const buildRAGComparisonTraceSummaryRows: (entry: RAGRerankerComp
13
13
  export declare const buildRAGComparisonTraceDiffRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry, leader?: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
14
14
  export declare const buildRAGRetrievalComparisonCardPresentations: (comparison: RAGRetrievalComparison) => RAGComparisonCardPresentation[];
15
15
  export declare const buildRAGRerankerComparisonCardPresentations: (comparison: RAGRerankerComparison) => RAGComparisonCardPresentation[];
16
+ export declare const buildRAGGroundingProviderCardPresentations: (entries: Array<{
17
+ providerKey: string;
18
+ label: string;
19
+ elapsedMs: number;
20
+ response: RAGAnswerGroundingEvaluationResponse;
21
+ }>) => RAGGroundingProviderCardPresentation[];
22
+ export declare const buildRAGGroundingProviderOverviewPresentation: (input: {
23
+ entries: Array<{
24
+ providerKey: string;
25
+ label: string;
26
+ elapsedMs: number;
27
+ response: RAGAnswerGroundingEvaluationResponse;
28
+ }>;
29
+ summary: {
30
+ bestByPassingRate?: string;
31
+ bestByAverageCitationF1?: string;
32
+ bestByResolvedCitationRate?: string;
33
+ fastest?: string;
34
+ };
35
+ }) => RAGGroundingProviderOverviewPresentation;
36
+ export declare const buildRAGGroundingProviderCaseComparisonPresentations: (comparisons: Array<{
37
+ caseId: string;
38
+ label: string;
39
+ entries: Array<{
40
+ providerKey: string;
41
+ label: string;
42
+ status: string;
43
+ coverage: string;
44
+ citationF1: number;
45
+ resolvedCitationRate: number;
46
+ matchedIds: string[];
47
+ missingIds: string[];
48
+ extraIds: string[];
49
+ answerExcerpt: string;
50
+ }>;
51
+ summary: {
52
+ bestByStatus?: string;
53
+ bestByCitationF1?: string;
54
+ bestByResolvedCitationRate?: string;
55
+ };
56
+ }>) => RAGGroundingProviderCaseComparisonPresentation[];
16
57
  export declare const buildRAGEvaluationHistoryRows: (history?: RAGEvaluationHistory) => RAGLabelValueRow[];
17
58
  export declare const buildRAGEvaluationCaseTracePresentations: (history?: RAGEvaluationHistory) => RAGEvaluationCaseTracePresentation[];
18
59
  export declare const buildRAGEvaluationHistoryPresentation: (history?: RAGEvaluationHistory) => RAGEvaluationHistoryPresentation;
@@ -2436,6 +2436,83 @@ var buildRAGRerankerComparisonCardPresentations = (comparison) => {
2436
2436
  traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
2437
2437
  }));
2438
2438
  };
2439
+ var buildRAGGroundingProviderCardPresentations = (entries) => entries.map((entry) => ({
2440
+ headline: [
2441
+ entry.label,
2442
+ `passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
2443
+ `citation f1 ${entry.response.summary.averageCitationF1.toFixed(3)}`,
2444
+ `resolved ${formatEvaluationPassingRate(entry.response.summary.averageResolvedCitationRate)}`,
2445
+ `latency ${entry.elapsedMs.toFixed(1)}ms`
2446
+ ].join(" \xB7 "),
2447
+ id: entry.providerKey,
2448
+ label: entry.label
2449
+ }));
2450
+ var buildRAGGroundingProviderOverviewPresentation = (input) => {
2451
+ const resolveLabel = (key) => input.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
2452
+ const winnerLabel = resolveLabel(input.summary.bestByPassingRate);
2453
+ const winnerEntry = input.entries.find((entry) => entry.providerKey === input.summary.bestByPassingRate);
2454
+ return {
2455
+ rows: [
2456
+ {
2457
+ label: "Best passing rate",
2458
+ value: resolveLabel(input.summary.bestByPassingRate)
2459
+ },
2460
+ {
2461
+ label: "Best citation F1",
2462
+ value: resolveLabel(input.summary.bestByAverageCitationF1)
2463
+ },
2464
+ {
2465
+ label: "Best resolved citations",
2466
+ value: resolveLabel(input.summary.bestByResolvedCitationRate)
2467
+ },
2468
+ {
2469
+ label: "Fastest",
2470
+ value: resolveLabel(input.summary.fastest)
2471
+ }
2472
+ ],
2473
+ winnerLabel,
2474
+ winnerSummary: winnerEntry ? `passing ${formatEvaluationPassingRate(winnerEntry.response.passingRate)} \xB7 citation f1 ${winnerEntry.response.summary.averageCitationF1.toFixed(3)} \xB7 resolved ${formatEvaluationPassingRate(winnerEntry.response.summary.averageResolvedCitationRate)}` : "Stored workflow evaluation"
2475
+ };
2476
+ };
2477
+ var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
2478
+ const resolveLabel = (key) => comparison.entries.find((entry) => entry.providerKey === key)?.label ?? key ?? "n/a";
2479
+ return {
2480
+ caseId: comparison.caseId,
2481
+ label: comparison.label,
2482
+ rows: [
2483
+ {
2484
+ label: "Best grounded",
2485
+ value: resolveLabel(comparison.summary.bestByStatus)
2486
+ },
2487
+ {
2488
+ label: "Best citation F1",
2489
+ value: resolveLabel(comparison.summary.bestByCitationF1)
2490
+ },
2491
+ {
2492
+ label: "Best resolved citations",
2493
+ value: resolveLabel(comparison.summary.bestByResolvedCitationRate)
2494
+ },
2495
+ ...comparison.entries.map((entry) => ({
2496
+ label: entry.label,
2497
+ value: [
2498
+ entry.status.toUpperCase(),
2499
+ `coverage ${entry.coverage}`,
2500
+ `f1 ${entry.citationF1.toFixed(3)}`,
2501
+ `resolved ${formatEvaluationPassingRate(entry.resolvedCitationRate)}`,
2502
+ `matched ${entry.matchedIds.join(", ") || "none"}`,
2503
+ `missing ${entry.missingIds.join(", ") || "none"}`,
2504
+ `extra ${entry.extraIds.join(", ") || "none"}`,
2505
+ `answer ${entry.answerExcerpt || "n/a"}`
2506
+ ].join(" \xB7 ")
2507
+ }))
2508
+ ],
2509
+ summary: [
2510
+ `Best grounded: ${resolveLabel(comparison.summary.bestByStatus)}`,
2511
+ `Best citation F1: ${resolveLabel(comparison.summary.bestByCitationF1)}`,
2512
+ `Best resolved citations: ${resolveLabel(comparison.summary.bestByResolvedCitationRate)}`
2513
+ ].join(" \xB7 ")
2514
+ };
2515
+ });
2439
2516
  var buildRAGEvaluationHistoryRows = (history) => {
2440
2517
  if (!history?.latestRun) {
2441
2518
  return [
@@ -4009,5 +4086,5 @@ export {
4009
4086
  createAIStream
4010
4087
  };
4011
4088
 
4012
- //# debugId=55CF4F031FD61F8E64756E2164756E21
4089
+ //# debugId=A9C93F13169CAC9B64756E2164756E21
4013
4090
  //# sourceMappingURL=index.js.map