@absolutejs/absolute 0.19.0-beta.623 → 0.19.0-beta.625
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 +8751 -6935
- package/dist/ai/client/index.js.map +5 -5
- package/dist/ai/client/ui.js +6402 -42
- package/dist/ai/client/ui.js.map +7 -4
- package/dist/ai/index.js +12994 -8132
- package/dist/ai/index.js.map +15 -13
- package/dist/ai/rag/quality.js +4194 -37
- package/dist/ai/rag/quality.js.map +6 -5
- package/dist/ai/rag/ui.js +6407 -42
- package/dist/ai/rag/ui.js.map +7 -4
- package/dist/ai-client/angular/ai/index.js +401 -4
- package/dist/ai-client/react/ai/index.js +537 -511
- package/dist/ai-client/vue/ai/index.js +743 -720
- package/dist/angular/ai/index.js +9400 -3140
- package/dist/angular/ai/index.js.map +7 -6
- package/dist/react/ai/index.js +8187 -6372
- package/dist/react/ai/index.js.map +5 -5
- package/dist/src/ai/index.d.ts +2 -2
- package/dist/src/ai/rag/adapters/filtering.d.ts +2 -0
- package/dist/src/ai/rag/adapters/queryPlanning.d.ts +11 -0
- package/dist/src/ai/rag/index.d.ts +4 -4
- package/dist/src/ai/rag/ingestion.d.ts +3 -0
- package/dist/src/ai/rag/presentation.d.ts +6 -1
- package/dist/src/ai/rag/quality.d.ts +95 -2
- package/dist/src/ai/rag/sync.d.ts +20 -1
- package/dist/src/ai/rag/types.d.ts +1 -1
- package/dist/src/ai/rag/ui.d.ts +1 -1
- package/dist/src/react/ai/useRAG.d.ts +1 -1
- package/dist/src/react/ai/useRAGIndexAdmin.d.ts +2 -2
- package/dist/src/vue/ai/useRAG.d.ts +408 -0
- package/dist/src/vue/ai/useRAGEvaluate.d.ts +84 -0
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +222 -0
- package/dist/src/vue/ai/useRAGOps.d.ts +102 -0
- package/dist/src/vue/components/Image.d.ts +74 -0
- package/dist/src/vue/components/index.d.ts +1 -1
- package/dist/src/vue/index.d.ts +1 -1
- package/dist/svelte/ai/index.js +8186 -6371
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +389 -1
- package/dist/vue/ai/index.js +8186 -6371
- package/dist/vue/ai/index.js.map +4 -4
- package/dist/vue/components/Image.js +253 -0
- package/dist/vue/components/Image.js.map +11 -0
- package/dist/vue/components/index.js +181 -16
- package/dist/vue/components/index.js.map +5 -3
- package/dist/vue/index.js +195 -30
- package/dist/vue/index.js.map +6 -4
- package/package.json +11 -11
- package/dist/Image-0pe96k20.vue +0 -186
- package/dist/vue/components/Image.vue +0 -186
- package/dist/vue/components/Image.vue.d.ts +0 -4
package/dist/types/ai.d.ts
CHANGED
|
@@ -88,6 +88,10 @@ export type RAGSectionRetrievalDiagnostic = {
|
|
|
88
88
|
siblingScoreGap?: number;
|
|
89
89
|
topChunkId?: string;
|
|
90
90
|
topSource?: string;
|
|
91
|
+
topContextLabel?: string;
|
|
92
|
+
topLocatorLabel?: string;
|
|
93
|
+
sourceAwareChunkReasonLabel?: string;
|
|
94
|
+
sourceAwareUnitScopeLabel?: string;
|
|
91
95
|
vectorHits: number;
|
|
92
96
|
lexicalHits: number;
|
|
93
97
|
hybridHits: number;
|
|
@@ -289,7 +293,7 @@ export type RAGEmbeddingProvider = {
|
|
|
289
293
|
defaultModel?: string;
|
|
290
294
|
};
|
|
291
295
|
export type RAGEmbeddingProviderLike = RAGEmbeddingFunction | RAGEmbeddingProvider;
|
|
292
|
-
export type RAGContentFormat = 'text' | 'markdown' | 'html';
|
|
296
|
+
export type RAGContentFormat = 'text' | 'markdown' | 'html' | 'jsonl' | 'tsv' | 'csv' | 'xml' | 'yaml';
|
|
293
297
|
export type RAGFileExtractionInput = {
|
|
294
298
|
data: Uint8Array;
|
|
295
299
|
path?: string;
|
|
@@ -753,6 +757,15 @@ export type RAGSQLiteNativeDiagnostics = {
|
|
|
753
757
|
lastLoadError?: string;
|
|
754
758
|
lastQueryError?: string;
|
|
755
759
|
lastUpsertError?: string;
|
|
760
|
+
lastQueryPlan?: {
|
|
761
|
+
pushdownApplied: boolean;
|
|
762
|
+
pushdownClauseCount: number;
|
|
763
|
+
filteredCandidateCount?: number;
|
|
764
|
+
initialSearchK?: number;
|
|
765
|
+
finalSearchK?: number;
|
|
766
|
+
backfillCount?: number;
|
|
767
|
+
queryMode: 'json_fallback' | 'native_vec0';
|
|
768
|
+
};
|
|
756
769
|
};
|
|
757
770
|
export type RAGPostgresNativeDiagnostics = {
|
|
758
771
|
requested: boolean;
|
|
@@ -1062,6 +1075,53 @@ export type CreateRAGAccessControlOptions<TContext = unknown> = {
|
|
|
1062
1075
|
resolveScope?: RAGAccessControlScopeResolver<TContext>;
|
|
1063
1076
|
};
|
|
1064
1077
|
export type RAGSyncSourceStatus = 'idle' | 'running' | 'completed' | 'failed' | 'disabled';
|
|
1078
|
+
export type RAGSyncSourceDiagnosticCode = 'sync_failed' | 'retry_scheduled' | 'storage_resume_pending' | 'email_resume_pending' | 'lineage_conflict_detected' | 'duplicate_sync_key_detected' | 'targeted_refresh_applied' | 'noop_sync' | 'extraction_failures_detected' | 'extractor_missing' | 'ocr_extractor_recommended' | 'canonical_dedupe_applied' | 'robots_blocked' | 'nofollow_skipped' | 'noindex_skipped';
|
|
1079
|
+
export type RAGSyncSourceDiagnosticEntry = {
|
|
1080
|
+
code: RAGSyncSourceDiagnosticCode;
|
|
1081
|
+
severity: 'info' | 'warning' | 'error';
|
|
1082
|
+
summary: string;
|
|
1083
|
+
};
|
|
1084
|
+
export type RAGSyncRetryGuidance = {
|
|
1085
|
+
action: 'wait_for_retry' | 'resume_sync' | 'resolve_conflicts' | 'rerun_sync' | 'inspect_source' | 'configure_extractor';
|
|
1086
|
+
reason: string;
|
|
1087
|
+
nextRetryAt?: number;
|
|
1088
|
+
resumeCursor?: string;
|
|
1089
|
+
syncKeys?: string[];
|
|
1090
|
+
};
|
|
1091
|
+
export type RAGSyncExtractionFailure = {
|
|
1092
|
+
itemLabel: string;
|
|
1093
|
+
itemKind: 'directory_file' | 'url' | 'storage_object' | 'email_attachment';
|
|
1094
|
+
reason: string;
|
|
1095
|
+
remediation: 'configure_extractor' | 'add_ocr_extractor' | 'inspect_file';
|
|
1096
|
+
};
|
|
1097
|
+
export type RAGSyncExtractionRecoveryAction = {
|
|
1098
|
+
remediation: RAGSyncExtractionFailure['remediation'];
|
|
1099
|
+
itemKinds: RAGSyncExtractionFailure['itemKind'][];
|
|
1100
|
+
itemLabels: string[];
|
|
1101
|
+
reasons: string[];
|
|
1102
|
+
count: number;
|
|
1103
|
+
summary: string;
|
|
1104
|
+
};
|
|
1105
|
+
export type RAGSyncExtractionRecoveryPreview = {
|
|
1106
|
+
actions: RAGSyncExtractionRecoveryAction[];
|
|
1107
|
+
recommendedAction?: RAGSyncExtractionRecoveryAction;
|
|
1108
|
+
unresolvedFailures: RAGSyncExtractionFailure[];
|
|
1109
|
+
summary?: string;
|
|
1110
|
+
};
|
|
1111
|
+
export type RAGSyncExtractionRecoveryHandler = (action: RAGSyncExtractionRecoveryAction) => Promise<boolean | void> | boolean | void;
|
|
1112
|
+
export type RAGSyncExtractionRecoveryHandlers = Partial<Record<RAGSyncExtractionFailure['remediation'], RAGSyncExtractionRecoveryHandler>>;
|
|
1113
|
+
export type RAGSyncExtractionRecoveryResult = RAGSyncExtractionRecoveryPreview & {
|
|
1114
|
+
completedActions: RAGSyncExtractionRecoveryAction[];
|
|
1115
|
+
failedActions: RAGSyncExtractionRecoveryAction[];
|
|
1116
|
+
skippedActions: RAGSyncExtractionRecoveryAction[];
|
|
1117
|
+
errorsByRemediation?: Partial<Record<RAGSyncExtractionFailure['remediation'], string>>;
|
|
1118
|
+
};
|
|
1119
|
+
export type RAGSyncSourceDiagnostics = {
|
|
1120
|
+
summary: string;
|
|
1121
|
+
entries: RAGSyncSourceDiagnosticEntry[];
|
|
1122
|
+
extractionFailures?: RAGSyncExtractionFailure[];
|
|
1123
|
+
retryGuidance?: RAGSyncRetryGuidance;
|
|
1124
|
+
};
|
|
1065
1125
|
export type RAGSyncSourceRecord = {
|
|
1066
1126
|
id: string;
|
|
1067
1127
|
label: string;
|
|
@@ -1079,11 +1139,69 @@ export type RAGSyncSourceRecord = {
|
|
|
1079
1139
|
nextRetryAt?: number;
|
|
1080
1140
|
documentCount?: number;
|
|
1081
1141
|
chunkCount?: number;
|
|
1142
|
+
reconciliation?: RAGSyncSourceReconciliationSummary;
|
|
1143
|
+
diagnostics?: RAGSyncSourceDiagnostics;
|
|
1082
1144
|
metadata?: Record<string, unknown>;
|
|
1083
1145
|
};
|
|
1146
|
+
export type RAGSyncSourceReconciliationSummary = {
|
|
1147
|
+
refreshMode: 'noop' | 'targeted';
|
|
1148
|
+
staleDocumentIds: string[];
|
|
1149
|
+
staleSyncKeys: string[];
|
|
1150
|
+
refreshedDocumentIds: string[];
|
|
1151
|
+
refreshedSyncKeys: string[];
|
|
1152
|
+
unchangedDocumentIds: string[];
|
|
1153
|
+
unchangedSyncKeys: string[];
|
|
1154
|
+
targetedRefreshSyncKeys: string[];
|
|
1155
|
+
duplicateSyncKeyGroups: Array<{
|
|
1156
|
+
syncKey: string;
|
|
1157
|
+
count: number;
|
|
1158
|
+
documentIds: string[];
|
|
1159
|
+
}>;
|
|
1160
|
+
lineageConflicts: Array<{
|
|
1161
|
+
syncKey: string;
|
|
1162
|
+
lineageIds: string[];
|
|
1163
|
+
versionIds: string[];
|
|
1164
|
+
latestDocumentIds: string[];
|
|
1165
|
+
documentIds: string[];
|
|
1166
|
+
documents: Array<{
|
|
1167
|
+
documentId: string;
|
|
1168
|
+
lineageId?: string;
|
|
1169
|
+
versionId?: string;
|
|
1170
|
+
versionNumber?: number;
|
|
1171
|
+
isLatestVersion: boolean;
|
|
1172
|
+
}>;
|
|
1173
|
+
reasons: Array<'duplicate_sync_key' | 'multiple_lineages' | 'multiple_versions' | 'multiple_latest_versions'>;
|
|
1174
|
+
}>;
|
|
1175
|
+
};
|
|
1176
|
+
export type RAGSyncConflictResolutionStrategy = 'keep_latest' | 'keep_highest_version';
|
|
1177
|
+
export type RAGSyncConflictResolutionAction = {
|
|
1178
|
+
syncKey: string;
|
|
1179
|
+
keepDocumentId: string;
|
|
1180
|
+
deleteDocumentIds: string[];
|
|
1181
|
+
reasons: RAGSyncSourceReconciliationSummary['lineageConflicts'][number]['reasons'];
|
|
1182
|
+
};
|
|
1183
|
+
export type RAGSyncConflictResolutionAmbiguity = {
|
|
1184
|
+
syncKey: string;
|
|
1185
|
+
reasons: RAGSyncSourceReconciliationSummary['lineageConflicts'][number]['reasons'];
|
|
1186
|
+
candidateDocumentIds: string[];
|
|
1187
|
+
recommendedStrategy?: RAGSyncConflictResolutionStrategy;
|
|
1188
|
+
};
|
|
1189
|
+
export type RAGSyncConflictResolutionPreview = {
|
|
1190
|
+
strategy: RAGSyncConflictResolutionStrategy;
|
|
1191
|
+
actions: RAGSyncConflictResolutionAction[];
|
|
1192
|
+
unresolvedSyncKeys: string[];
|
|
1193
|
+
unresolvedConflicts: RAGSyncConflictResolutionAmbiguity[];
|
|
1194
|
+
};
|
|
1195
|
+
export type RAGSyncConflictResolutionResult = RAGSyncConflictResolutionPreview & {
|
|
1196
|
+
deletedDocumentIds: string[];
|
|
1197
|
+
failedDocumentIds: string[];
|
|
1198
|
+
errorsByDocumentId?: Record<string, string>;
|
|
1199
|
+
};
|
|
1084
1200
|
export type RAGSyncSourceRunResult = {
|
|
1085
1201
|
documentCount?: number;
|
|
1086
1202
|
chunkCount?: number;
|
|
1203
|
+
reconciliation?: RAGSyncSourceReconciliationSummary;
|
|
1204
|
+
diagnostics?: RAGSyncSourceDiagnostics;
|
|
1087
1205
|
metadata?: Record<string, unknown>;
|
|
1088
1206
|
};
|
|
1089
1207
|
export type RAGSyncSourceDefinition = {
|
|
@@ -1101,8 +1219,21 @@ export type RAGSyncSourceContext = {
|
|
|
1101
1219
|
collection: RAGCollection;
|
|
1102
1220
|
listDocuments?: () => Promise<RAGIndexedDocument[]> | RAGIndexedDocument[];
|
|
1103
1221
|
deleteDocument?: (id: string) => Promise<boolean> | boolean;
|
|
1222
|
+
sourceRecord?: RAGSyncSourceRecord;
|
|
1104
1223
|
signal?: AbortSignal;
|
|
1105
1224
|
};
|
|
1225
|
+
export type RAGSQLiteStoreMigrationIssue = {
|
|
1226
|
+
tableName: string;
|
|
1227
|
+
columnName: string;
|
|
1228
|
+
definition: string;
|
|
1229
|
+
};
|
|
1230
|
+
export type RAGSQLiteStoreMigrationInspection = {
|
|
1231
|
+
issues: RAGSQLiteStoreMigrationIssue[];
|
|
1232
|
+
summary?: string;
|
|
1233
|
+
};
|
|
1234
|
+
export type RAGSQLiteStoreMigrationResult = RAGSQLiteStoreMigrationInspection & {
|
|
1235
|
+
applied: RAGSQLiteStoreMigrationIssue[];
|
|
1236
|
+
};
|
|
1106
1237
|
export type RAGStorageSyncObject = {
|
|
1107
1238
|
key: string;
|
|
1108
1239
|
size?: number;
|
|
@@ -1160,6 +1291,79 @@ export type RAGUrlSyncSourceOptions = {
|
|
|
1160
1291
|
retryAttempts?: number;
|
|
1161
1292
|
retryDelayMs?: number;
|
|
1162
1293
|
};
|
|
1294
|
+
export type RAGFeedSyncInput = {
|
|
1295
|
+
url: string;
|
|
1296
|
+
title?: string;
|
|
1297
|
+
metadata?: Record<string, unknown>;
|
|
1298
|
+
};
|
|
1299
|
+
export type RAGFeedSyncSourceOptions = {
|
|
1300
|
+
id: string;
|
|
1301
|
+
label: string;
|
|
1302
|
+
feeds: RAGFeedSyncInput[];
|
|
1303
|
+
description?: string;
|
|
1304
|
+
autoDiscoverFromHTML?: boolean;
|
|
1305
|
+
maxEntriesPerFeed?: number;
|
|
1306
|
+
maxDiscoveredFeeds?: number;
|
|
1307
|
+
baseMetadata?: Record<string, unknown>;
|
|
1308
|
+
defaultChunking?: RAGChunkingOptions;
|
|
1309
|
+
chunkingRegistry?: RAGChunkingRegistryLike;
|
|
1310
|
+
extractors?: RAGFileExtractor[];
|
|
1311
|
+
extractorRegistry?: RAGFileExtractorRegistryLike;
|
|
1312
|
+
metadata?: Record<string, unknown>;
|
|
1313
|
+
retryAttempts?: number;
|
|
1314
|
+
retryDelayMs?: number;
|
|
1315
|
+
};
|
|
1316
|
+
export type RAGSitemapSyncInput = {
|
|
1317
|
+
url: string;
|
|
1318
|
+
title?: string;
|
|
1319
|
+
metadata?: Record<string, unknown>;
|
|
1320
|
+
};
|
|
1321
|
+
export type RAGSitemapSyncSourceOptions = {
|
|
1322
|
+
id: string;
|
|
1323
|
+
label: string;
|
|
1324
|
+
sitemaps: RAGSitemapSyncInput[];
|
|
1325
|
+
description?: string;
|
|
1326
|
+
maxUrlsPerSitemap?: number;
|
|
1327
|
+
autoDiscoverFromRobots?: boolean;
|
|
1328
|
+
maxNestedSitemaps?: number;
|
|
1329
|
+
baseMetadata?: Record<string, unknown>;
|
|
1330
|
+
defaultChunking?: RAGChunkingOptions;
|
|
1331
|
+
chunkingRegistry?: RAGChunkingRegistryLike;
|
|
1332
|
+
extractors?: RAGFileExtractor[];
|
|
1333
|
+
extractorRegistry?: RAGFileExtractorRegistryLike;
|
|
1334
|
+
metadata?: Record<string, unknown>;
|
|
1335
|
+
retryAttempts?: number;
|
|
1336
|
+
retryDelayMs?: number;
|
|
1337
|
+
};
|
|
1338
|
+
export type RAGSiteDiscoveryInput = {
|
|
1339
|
+
url: string;
|
|
1340
|
+
title?: string;
|
|
1341
|
+
metadata?: Record<string, unknown>;
|
|
1342
|
+
};
|
|
1343
|
+
export type RAGSiteDiscoverySyncSourceOptions = {
|
|
1344
|
+
id: string;
|
|
1345
|
+
label: string;
|
|
1346
|
+
sites: RAGSiteDiscoveryInput[];
|
|
1347
|
+
description?: string;
|
|
1348
|
+
autoDiscoverFeeds?: boolean;
|
|
1349
|
+
autoDiscoverSitemaps?: boolean;
|
|
1350
|
+
autoDiscoverLinkedPages?: boolean;
|
|
1351
|
+
maxDiscoveredFeeds?: number;
|
|
1352
|
+
maxEntriesPerFeed?: number;
|
|
1353
|
+
maxUrlsPerSitemap?: number;
|
|
1354
|
+
maxNestedSitemaps?: number;
|
|
1355
|
+
maxLinkedPages?: number;
|
|
1356
|
+
maxLinksPerPage?: number;
|
|
1357
|
+
maxLinkDepth?: number;
|
|
1358
|
+
baseMetadata?: Record<string, unknown>;
|
|
1359
|
+
defaultChunking?: RAGChunkingOptions;
|
|
1360
|
+
chunkingRegistry?: RAGChunkingRegistryLike;
|
|
1361
|
+
extractors?: RAGFileExtractor[];
|
|
1362
|
+
extractorRegistry?: RAGFileExtractorRegistryLike;
|
|
1363
|
+
metadata?: Record<string, unknown>;
|
|
1364
|
+
retryAttempts?: number;
|
|
1365
|
+
retryDelayMs?: number;
|
|
1366
|
+
};
|
|
1163
1367
|
export type RAGStorageSyncSourceOptions = {
|
|
1164
1368
|
id: string;
|
|
1165
1369
|
label: string;
|
|
@@ -1173,7 +1377,9 @@ export type RAGStorageSyncSourceOptions = {
|
|
|
1173
1377
|
chunkingRegistry?: RAGChunkingRegistryLike;
|
|
1174
1378
|
extractors?: RAGFileExtractor[];
|
|
1175
1379
|
extractorRegistry?: RAGFileExtractorRegistryLike;
|
|
1380
|
+
maxPagesPerRun?: number;
|
|
1176
1381
|
metadata?: Record<string, unknown>;
|
|
1382
|
+
resumeFromLastCursor?: boolean;
|
|
1177
1383
|
retryAttempts?: number;
|
|
1178
1384
|
retryDelayMs?: number;
|
|
1179
1385
|
};
|
|
@@ -1225,7 +1431,9 @@ export type RAGEmailSyncSourceOptions = {
|
|
|
1225
1431
|
chunkingRegistry?: RAGChunkingRegistryLike;
|
|
1226
1432
|
extractors?: RAGFileExtractor[];
|
|
1227
1433
|
extractorRegistry?: RAGFileExtractorRegistryLike;
|
|
1434
|
+
maxPagesPerRun?: number;
|
|
1228
1435
|
metadata?: Record<string, unknown>;
|
|
1436
|
+
resumeFromLastCursor?: boolean;
|
|
1229
1437
|
retryAttempts?: number;
|
|
1230
1438
|
retryDelayMs?: number;
|
|
1231
1439
|
};
|
|
@@ -1453,6 +1661,10 @@ export type RAGEvaluationCase = {
|
|
|
1453
1661
|
expectedChunkIds?: string[];
|
|
1454
1662
|
expectedSources?: string[];
|
|
1455
1663
|
expectedDocumentIds?: string[];
|
|
1664
|
+
goldenSet?: boolean;
|
|
1665
|
+
hardNegativeChunkIds?: string[];
|
|
1666
|
+
hardNegativeSources?: string[];
|
|
1667
|
+
hardNegativeDocumentIds?: string[];
|
|
1456
1668
|
label?: string;
|
|
1457
1669
|
metadata?: Record<string, unknown>;
|
|
1458
1670
|
};
|
|
@@ -1494,6 +1706,7 @@ export type RAGAnswerGroundingEvaluationCaseResult = {
|
|
|
1494
1706
|
matchedIds: string[];
|
|
1495
1707
|
missingIds: string[];
|
|
1496
1708
|
extraIds: string[];
|
|
1709
|
+
failureClasses?: Array<'no_expected_targets' | 'no_citations' | 'unresolved_citations' | 'missing_expected_sources' | 'extra_citations' | 'section_source_miss' | 'section_graph_source_miss' | 'section_hierarchy_source_miss' | 'spreadsheet_source_miss' | 'media_source_miss' | 'ocr_source_miss'>;
|
|
1497
1710
|
groundedAnswer: RAGGroundedAnswer;
|
|
1498
1711
|
metadata?: Record<string, unknown>;
|
|
1499
1712
|
};
|
|
@@ -1533,6 +1746,7 @@ export type RAGAnswerGroundingEvaluationHistoryStore = {
|
|
|
1533
1746
|
suiteId?: string;
|
|
1534
1747
|
limit?: number;
|
|
1535
1748
|
}) => Promise<RAGAnswerGroundingEvaluationRun[]> | RAGAnswerGroundingEvaluationRun[];
|
|
1749
|
+
pruneRuns?: (input?: RAGEvaluationHistoryPruneInput) => Promise<RAGEvaluationHistoryPruneResult> | RAGEvaluationHistoryPruneResult;
|
|
1536
1750
|
};
|
|
1537
1751
|
export type RAGAnswerGroundingEvaluationLeaderboardEntry = {
|
|
1538
1752
|
runId: string;
|
|
@@ -1631,6 +1845,8 @@ export type RAGAnswerGroundingEvaluationCaseDiff = {
|
|
|
1631
1845
|
currentMissingIds: string[];
|
|
1632
1846
|
previousExtraIds: string[];
|
|
1633
1847
|
currentExtraIds: string[];
|
|
1848
|
+
previousFailureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult['failureClasses']>;
|
|
1849
|
+
currentFailureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult['failureClasses']>;
|
|
1634
1850
|
previousReferenceCount?: number;
|
|
1635
1851
|
currentReferenceCount: number;
|
|
1636
1852
|
previousResolvedCitationCount?: number;
|
|
@@ -1659,6 +1875,7 @@ export type RAGAnswerGroundingEvaluationCaseSnapshot = {
|
|
|
1659
1875
|
matchedIds: string[];
|
|
1660
1876
|
missingIds: string[];
|
|
1661
1877
|
extraIds: string[];
|
|
1878
|
+
failureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult['failureClasses']>;
|
|
1662
1879
|
ungroundedReferenceNumbers: number[];
|
|
1663
1880
|
answer: string;
|
|
1664
1881
|
previousAnswer?: string;
|
|
@@ -1725,6 +1942,7 @@ export type RAGEvaluationCaseResult = {
|
|
|
1725
1942
|
matchedIds: string[];
|
|
1726
1943
|
missingIds: string[];
|
|
1727
1944
|
mode: 'chunkId' | 'source' | 'documentId';
|
|
1945
|
+
failureClasses?: Array<'no_expected_targets' | 'no_results' | 'no_match' | 'partial_recall' | 'extra_noise' | 'section_evidence_miss' | 'section_graph_miss' | 'section_hierarchy_miss' | 'spreadsheet_evidence_miss' | 'media_evidence_miss' | 'ocr_evidence_miss' | 'routing_miss'>;
|
|
1728
1946
|
metadata?: Record<string, unknown>;
|
|
1729
1947
|
};
|
|
1730
1948
|
export type RAGEvaluationSummary = {
|
|
@@ -1753,6 +1971,67 @@ export type RAGEvaluationSuite = {
|
|
|
1753
1971
|
input: RAGEvaluationInput;
|
|
1754
1972
|
metadata?: Record<string, unknown>;
|
|
1755
1973
|
};
|
|
1974
|
+
export type RAGEvaluationSuiteDatasetSummary = {
|
|
1975
|
+
suiteId: string;
|
|
1976
|
+
caseCount: number;
|
|
1977
|
+
goldenSetCount: number;
|
|
1978
|
+
hardNegativeCaseCount: number;
|
|
1979
|
+
hardNegativeChunkIdCount: number;
|
|
1980
|
+
hardNegativeSourceCount: number;
|
|
1981
|
+
hardNegativeDocumentIdCount: number;
|
|
1982
|
+
};
|
|
1983
|
+
export type RAGEvaluationSuiteGenerationOptions = {
|
|
1984
|
+
suiteId: string;
|
|
1985
|
+
documents: RAGIndexedDocument[];
|
|
1986
|
+
label?: string;
|
|
1987
|
+
description?: string;
|
|
1988
|
+
maxCases?: number;
|
|
1989
|
+
topK?: number;
|
|
1990
|
+
scoreThreshold?: number;
|
|
1991
|
+
filter?: Record<string, unknown>;
|
|
1992
|
+
retrieval?: RAGCollectionSearchParams['retrieval'];
|
|
1993
|
+
includeGoldenSet?: boolean;
|
|
1994
|
+
hardNegativePerCase?: number;
|
|
1995
|
+
metadata?: Record<string, unknown>;
|
|
1996
|
+
};
|
|
1997
|
+
export type RAGEvaluationSuiteSnapshot = {
|
|
1998
|
+
id: string;
|
|
1999
|
+
suiteId: string;
|
|
2000
|
+
label?: string;
|
|
2001
|
+
description?: string;
|
|
2002
|
+
version: number;
|
|
2003
|
+
createdAt: number;
|
|
2004
|
+
caseCount: number;
|
|
2005
|
+
suite: RAGEvaluationSuite;
|
|
2006
|
+
metadata?: Record<string, unknown>;
|
|
2007
|
+
};
|
|
2008
|
+
export type RAGEvaluationSuiteSnapshotDiff = {
|
|
2009
|
+
suiteId: string;
|
|
2010
|
+
currentSnapshotId: string;
|
|
2011
|
+
previousSnapshotId?: string;
|
|
2012
|
+
addedCaseIds: string[];
|
|
2013
|
+
removedCaseIds: string[];
|
|
2014
|
+
changedCaseIds: string[];
|
|
2015
|
+
unchangedCaseIds: string[];
|
|
2016
|
+
orderChanged: boolean;
|
|
2017
|
+
caseCountDelta: number;
|
|
2018
|
+
};
|
|
2019
|
+
export type RAGEvaluationSuiteSnapshotHistoryStore = {
|
|
2020
|
+
saveSnapshot: (snapshot: RAGEvaluationSuiteSnapshot) => Promise<void> | void;
|
|
2021
|
+
listSnapshots: (input?: {
|
|
2022
|
+
suiteId?: string;
|
|
2023
|
+
limit?: number;
|
|
2024
|
+
}) => Promise<RAGEvaluationSuiteSnapshot[]> | RAGEvaluationSuiteSnapshot[];
|
|
2025
|
+
pruneSnapshots?: (input?: RAGEvaluationHistoryPruneInput) => Promise<RAGEvaluationHistoryPruneResult> | RAGEvaluationHistoryPruneResult;
|
|
2026
|
+
};
|
|
2027
|
+
export type RAGEvaluationSuiteSnapshotHistory = {
|
|
2028
|
+
suiteId: string;
|
|
2029
|
+
suiteLabel?: string;
|
|
2030
|
+
snapshots: RAGEvaluationSuiteSnapshot[];
|
|
2031
|
+
latestSnapshot?: RAGEvaluationSuiteSnapshot;
|
|
2032
|
+
previousSnapshot?: RAGEvaluationSuiteSnapshot;
|
|
2033
|
+
diff?: RAGEvaluationSuiteSnapshotDiff;
|
|
2034
|
+
};
|
|
1756
2035
|
export type RAGEvaluationSuiteRun = {
|
|
1757
2036
|
id: string;
|
|
1758
2037
|
suiteId: string;
|
|
@@ -1777,6 +2056,17 @@ export type RAGEvaluationHistoryStore = {
|
|
|
1777
2056
|
suiteId?: string;
|
|
1778
2057
|
limit?: number;
|
|
1779
2058
|
}) => Promise<RAGEvaluationSuiteRun[]> | RAGEvaluationSuiteRun[];
|
|
2059
|
+
pruneRuns?: (input?: RAGEvaluationHistoryPruneInput) => Promise<RAGEvaluationHistoryPruneResult> | RAGEvaluationHistoryPruneResult;
|
|
2060
|
+
};
|
|
2061
|
+
export type RAGEvaluationHistoryPruneInput = {
|
|
2062
|
+
suiteId?: string;
|
|
2063
|
+
maxAgeMs?: number;
|
|
2064
|
+
maxRunsPerSuite?: number;
|
|
2065
|
+
now?: number;
|
|
2066
|
+
};
|
|
2067
|
+
export type RAGEvaluationHistoryPruneResult = {
|
|
2068
|
+
removedCount: number;
|
|
2069
|
+
keptCount: number;
|
|
1780
2070
|
};
|
|
1781
2071
|
export type RAGEvaluationCaseDiff = {
|
|
1782
2072
|
caseId: string;
|
|
@@ -1790,6 +2080,8 @@ export type RAGEvaluationCaseDiff = {
|
|
|
1790
2080
|
currentMatchedIds: string[];
|
|
1791
2081
|
previousMissingIds: string[];
|
|
1792
2082
|
currentMissingIds: string[];
|
|
2083
|
+
previousFailureClasses?: NonNullable<RAGEvaluationCaseResult['failureClasses']>;
|
|
2084
|
+
currentFailureClasses?: NonNullable<RAGEvaluationCaseResult['failureClasses']>;
|
|
1793
2085
|
};
|
|
1794
2086
|
export type RAGEvaluationRunDiff = {
|
|
1795
2087
|
suiteId: string;
|
|
@@ -1798,6 +2090,12 @@ export type RAGEvaluationRunDiff = {
|
|
|
1798
2090
|
regressedCases: RAGEvaluationCaseDiff[];
|
|
1799
2091
|
improvedCases: RAGEvaluationCaseDiff[];
|
|
1800
2092
|
unchangedCases: RAGEvaluationCaseDiff[];
|
|
2093
|
+
traceLeadChanges?: Array<{
|
|
2094
|
+
caseId: string;
|
|
2095
|
+
label?: string;
|
|
2096
|
+
previousLead?: string;
|
|
2097
|
+
currentLead: string;
|
|
2098
|
+
}>;
|
|
1801
2099
|
summaryDelta: {
|
|
1802
2100
|
passingRate: number;
|
|
1803
2101
|
averageF1: number;
|
|
@@ -1851,6 +2149,38 @@ export type RAGEvaluationCaseTraceSnapshot = {
|
|
|
1851
2149
|
previousCandidateTopK?: number;
|
|
1852
2150
|
lexicalTopK: number;
|
|
1853
2151
|
previousLexicalTopK?: number;
|
|
2152
|
+
topContextLabel?: string;
|
|
2153
|
+
previousTopContextLabel?: string;
|
|
2154
|
+
topLocatorLabel?: string;
|
|
2155
|
+
previousTopLocatorLabel?: string;
|
|
2156
|
+
leadSpeakerCue?: string;
|
|
2157
|
+
previousLeadSpeakerCue?: string;
|
|
2158
|
+
leadSpeakerAttributionCue?: string;
|
|
2159
|
+
previousLeadSpeakerAttributionCue?: string;
|
|
2160
|
+
leadChannelCue?: string;
|
|
2161
|
+
previousLeadChannelCue?: string;
|
|
2162
|
+
leadChannelAttributionCue?: string;
|
|
2163
|
+
previousLeadChannelAttributionCue?: string;
|
|
2164
|
+
leadContinuityCue?: string;
|
|
2165
|
+
previousLeadContinuityCue?: string;
|
|
2166
|
+
sqliteQueryMode?: 'json_fallback' | 'native_vec0';
|
|
2167
|
+
previousSqliteQueryMode?: 'json_fallback' | 'native_vec0';
|
|
2168
|
+
sqliteQueryPushdownApplied?: boolean;
|
|
2169
|
+
previousSqliteQueryPushdownApplied?: boolean;
|
|
2170
|
+
sqliteQueryPushdownClauseCount?: number;
|
|
2171
|
+
previousSqliteQueryPushdownClauseCount?: number;
|
|
2172
|
+
sqliteQueryFilteredCandidates?: number;
|
|
2173
|
+
previousSqliteQueryFilteredCandidates?: number;
|
|
2174
|
+
sqliteQueryInitialSearchK?: number;
|
|
2175
|
+
previousSqliteQueryInitialSearchK?: number;
|
|
2176
|
+
sqliteQueryFinalSearchK?: number;
|
|
2177
|
+
previousSqliteQueryFinalSearchK?: number;
|
|
2178
|
+
sqliteQueryBackfillCount?: number;
|
|
2179
|
+
previousSqliteQueryBackfillCount?: number;
|
|
2180
|
+
sourceAwareChunkReasonLabel?: string;
|
|
2181
|
+
previousSourceAwareChunkReasonLabel?: string;
|
|
2182
|
+
sourceAwareUnitScopeLabel?: string;
|
|
2183
|
+
previousSourceAwareUnitScopeLabel?: string;
|
|
1854
2184
|
stageCounts: Partial<Record<RAGRetrievalTraceStage, number>>;
|
|
1855
2185
|
previousStageCounts: Partial<Record<RAGRetrievalTraceStage, number>>;
|
|
1856
2186
|
traceChange: 'new' | 'changed' | 'unchanged';
|
|
@@ -1941,11 +2271,69 @@ export type RAGEvaluationHistoryPresentation = {
|
|
|
1941
2271
|
rows: RAGLabelValueRow[];
|
|
1942
2272
|
caseTraces: RAGEvaluationCaseTracePresentation[];
|
|
1943
2273
|
};
|
|
2274
|
+
export type RAGEvaluationSuiteSnapshotPresentation = {
|
|
2275
|
+
id: string;
|
|
2276
|
+
label: string;
|
|
2277
|
+
summary: string;
|
|
2278
|
+
version: number;
|
|
2279
|
+
rows: RAGLabelValueRow[];
|
|
2280
|
+
};
|
|
2281
|
+
export type RAGEvaluationSuiteSnapshotHistoryPresentation = {
|
|
2282
|
+
summary: string;
|
|
2283
|
+
rows: RAGLabelValueRow[];
|
|
2284
|
+
snapshots: RAGEvaluationSuiteSnapshotPresentation[];
|
|
2285
|
+
};
|
|
1944
2286
|
export type RAGAnswerGroundingHistoryPresentation = {
|
|
1945
2287
|
summary: string;
|
|
1946
2288
|
rows: RAGLabelValueRow[];
|
|
1947
2289
|
caseSnapshots: RAGAnswerGroundingCaseSnapshotPresentation[];
|
|
1948
2290
|
};
|
|
2291
|
+
export type RAGEvaluationEntityQualitySummary = {
|
|
2292
|
+
key: string;
|
|
2293
|
+
label: string;
|
|
2294
|
+
entityType: 'source' | 'document';
|
|
2295
|
+
totalCases: number;
|
|
2296
|
+
passedCases: number;
|
|
2297
|
+
partialCases: number;
|
|
2298
|
+
failedCases: number;
|
|
2299
|
+
passingRate: number;
|
|
2300
|
+
averageF1: number;
|
|
2301
|
+
failureCounts: Record<string, number>;
|
|
2302
|
+
caseIds: string[];
|
|
2303
|
+
};
|
|
2304
|
+
export type RAGAnswerGroundingEntityQualitySummary = {
|
|
2305
|
+
key: string;
|
|
2306
|
+
label: string;
|
|
2307
|
+
entityType: 'source' | 'document';
|
|
2308
|
+
totalCases: number;
|
|
2309
|
+
passedCases: number;
|
|
2310
|
+
partialCases: number;
|
|
2311
|
+
failedCases: number;
|
|
2312
|
+
passingRate: number;
|
|
2313
|
+
averageCitationF1: number;
|
|
2314
|
+
averageResolvedCitationRate: number;
|
|
2315
|
+
failureCounts: Record<string, number>;
|
|
2316
|
+
caseIds: string[];
|
|
2317
|
+
};
|
|
2318
|
+
export type RAGEvaluationEntityQualityView = {
|
|
2319
|
+
bySource: RAGEvaluationEntityQualitySummary[];
|
|
2320
|
+
byDocument: RAGEvaluationEntityQualitySummary[];
|
|
2321
|
+
};
|
|
2322
|
+
export type RAGAnswerGroundingEntityQualityView = {
|
|
2323
|
+
bySource: RAGAnswerGroundingEntityQualitySummary[];
|
|
2324
|
+
byDocument: RAGAnswerGroundingEntityQualitySummary[];
|
|
2325
|
+
};
|
|
2326
|
+
export type RAGEntityQualityPresentation = {
|
|
2327
|
+
key: string;
|
|
2328
|
+
label: string;
|
|
2329
|
+
summary: string;
|
|
2330
|
+
rows: RAGLabelValueRow[];
|
|
2331
|
+
};
|
|
2332
|
+
export type RAGEntityQualityViewPresentation = {
|
|
2333
|
+
summary: string;
|
|
2334
|
+
rows: RAGLabelValueRow[];
|
|
2335
|
+
entities: RAGEntityQualityPresentation[];
|
|
2336
|
+
};
|
|
1949
2337
|
export type RAGComparisonPresentation = {
|
|
1950
2338
|
id: string;
|
|
1951
2339
|
label: string;
|