@absolutejs/absolute 0.19.0-beta.606 → 0.19.0-beta.607
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 +60 -1
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/client/ui.js +61 -1
- package/dist/ai/client/ui.js.map +4 -4
- package/dist/ai/index.js +60 -1
- package/dist/ai/index.js.map +4 -4
- package/dist/ai/rag/quality.js +60 -1
- package/dist/ai/rag/quality.js.map +3 -3
- package/dist/ai/rag/ui.js +61 -1
- package/dist/ai/rag/ui.js.map +4 -4
- package/dist/ai-client/angular/ai/index.js +59 -0
- package/dist/ai-client/react/ai/index.js +59 -0
- package/dist/ai-client/vue/ai/index.js +59 -0
- package/dist/angular/ai/index.js +60 -1
- package/dist/angular/ai/index.js.map +4 -4
- package/dist/react/ai/index.js +60 -1
- package/dist/react/ai/index.js.map +4 -4
- package/dist/src/ai/client/ui.d.ts +1 -1
- package/dist/src/ai/rag/grounding.d.ts +2 -1
- package/dist/src/ai/rag/index.d.ts +1 -1
- package/dist/src/ai/rag/presentation.d.ts +2 -2
- package/dist/src/ai/rag/ui.d.ts +1 -1
- package/dist/svelte/ai/index.js +60 -1
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +13 -0
- package/dist/vue/ai/index.js +60 -1
- package/dist/vue/ai/index.js.map +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { buildRAGAnswerWorkflowState, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, getLatestAssistantMessage, resolveRAGStreamStage } from '../rag/workflowState';
|
|
2
2
|
export { buildRAGStreamProgress as getRAGStreamProgress } from '../rag/workflowState';
|
|
3
|
-
export { buildRAGCitationReferenceMap, buildRAGChunkGraphNavigation, buildRAGChunkGraph, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGGroundedAnswer, buildRAGGroundingReferences } from '../rag/presentation';
|
|
3
|
+
export { buildRAGCitationReferenceMap, buildRAGChunkGraphNavigation, buildRAGChunkGraph, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingReferences } from '../rag/presentation';
|
|
4
4
|
export type { RAGStreamProgress, RAGStreamProgressState } from '../rag/workflowState';
|
|
5
5
|
export type { RAGAnswerWorkflowState } from '../../../types/ai';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundingReference, RAGSource } from '../../../types/ai';
|
|
1
|
+
import type { RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundedAnswerSectionSummary, RAGGroundingReference, RAGSource } from '../../../types/ai';
|
|
2
2
|
export declare const buildRAGCitationReferenceMap: (citations: RAGCitation[]) => RAGCitationReferenceMap;
|
|
3
3
|
export declare const buildRAGCitations: (sources: RAGSource[]) => RAGCitation[];
|
|
4
4
|
export declare const buildRAGGroundedAnswer: (content: string, sources: RAGSource[]) => RAGGroundedAnswer;
|
|
5
|
+
export declare const buildRAGGroundedAnswerSectionSummaries: (references: RAGGroundingReference[]) => RAGGroundedAnswerSectionSummary[];
|
|
5
6
|
export declare const buildRAGGroundingReferences: (sources: RAGSource[]) => RAGGroundingReference[];
|
|
@@ -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 { buildRAGContext } from './types';
|
|
12
12
|
export { buildRAGEvaluationLeaderboard, buildRAGEvaluationResponse, compareRAGRetrievalStrategies, compareRAGRerankers, buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGRetrievalComparisonDecisionSummary, buildRAGRetrievalReleaseVerdict, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGFileEvaluationHistoryStore, createRAGFileRetrievalBaselineStore, createRAGFileRetrievalComparisonHistoryStore, createRAGFileRetrievalLaneHandoffDecisionStore, createRAGFileRetrievalLaneHandoffIncidentStore, createRAGFileRetrievalLaneHandoffIncidentHistoryStore, createRAGFileRetrievalIncidentRemediationDecisionStore, createRAGFileRetrievalIncidentRemediationExecutionHistoryStore, createRAGFileRetrievalLaneHandoffAutoCompletePolicyHistoryStore, createRAGFileRetrievalReleaseLanePolicyHistoryStore, createRAGFileRetrievalBaselineGatePolicyHistoryStore, createRAGFileRetrievalReleaseLaneEscalationPolicyHistoryStore, createRAGFileRetrievalReleaseDecisionStore, createRAGFileRetrievalReleaseIncidentStore, createRAGFileSearchTraceStore, createRAGFileSearchTracePruneHistoryStore, createRAGSQLiteSearchTraceStore, createRAGEvaluationSuite, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, loadRAGRetrievalBaselines, loadRAGRetrievalComparisonHistory, loadRAGRetrievalLaneHandoffDecisions, loadRAGRetrievalLaneHandoffIncidents, loadRAGRetrievalLaneHandoffIncidentHistory, loadRAGRetrievalIncidentRemediationDecisions, loadRAGRetrievalIncidentRemediationExecutionHistory, loadRAGRetrievalLaneHandoffAutoCompletePolicyHistory, loadRAGRetrievalReleaseLanePolicyHistory, loadRAGRetrievalBaselineGatePolicyHistory, loadRAGRetrievalReleaseLaneEscalationPolicyHistory, loadRAGRetrievalReleaseDecisions, loadRAGRetrievalReleaseIncidents, loadRAGSearchTraceGroupHistory, loadRAGSearchTraceHistory, loadRAGSearchTracePruneHistory, previewRAGSearchTraceStorePrune, persistRAGRetrievalBaseline, persistRAGRetrievalComparisonRun, persistRAGRetrievalLaneHandoffDecision, persistRAGRetrievalLaneHandoffIncident, persistRAGRetrievalLaneHandoffIncidentHistory, persistRAGRetrievalIncidentRemediationDecision, persistRAGRetrievalIncidentRemediationExecutionHistory, persistRAGRetrievalLaneHandoffAutoCompletePolicyHistory, persistRAGRetrievalReleaseLanePolicyHistory, persistRAGRetrievalBaselineGatePolicyHistory, persistRAGRetrievalReleaseLaneEscalationPolicyHistory, persistRAGRetrievalReleaseDecision, persistRAGRetrievalReleaseIncident, persistRAGSearchTracePruneRun, pruneRAGSearchTraceStore, summarizeRAGSearchTraceStore, buildRAGRetrievalTraceHistoryTrend, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, persistRAGSearchTraceRecord, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison, compareRAGRetrievalTraceSummaries, summarizeRAGRetrievalTraces, buildRAGEvaluationRunDiff, buildRAGSearchTraceDiff, buildRAGSearchTraceRecord } from './quality';
|
|
13
|
-
export { buildRAGAdminActionPresentation, buildRAGAdminActionPresentations, buildRAGAdminJobPresentation, buildRAGAdminJobPresentations, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGChunkGraphNavigation, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGChunkGraph, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGCorpusHealthPresentation, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, buildRAGEvaluationHistoryRows, buildRAGGroundedAnswer, buildRAGGroundingOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderPresentations, buildRAGGroundingReferences, buildRAGQualityOverviewPresentation, buildRAGReadinessPresentation, buildRAGRerankerComparisonOverviewPresentation, buildRAGRerankerComparisonPresentations, buildRAGRerankerOverviewPresentation, buildRAGRetrievalComparisonOverviewPresentation, buildRAGRetrievalComparisonPresentations, buildRAGRetrievalOverviewPresentation, buildRAGRetrievalTracePresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGSyncOverviewPresentation, buildRAGSyncSourcePresentation, buildRAGSyncSourcePresentations } from './ui';
|
|
13
|
+
export { buildRAGAdminActionPresentation, buildRAGAdminActionPresentations, buildRAGAdminJobPresentation, buildRAGAdminJobPresentations, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGChunkGraphNavigation, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGChunkGraph, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGCorpusHealthPresentation, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, buildRAGEvaluationHistoryRows, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderPresentations, buildRAGGroundingReferences, buildRAGQualityOverviewPresentation, buildRAGReadinessPresentation, buildRAGRerankerComparisonOverviewPresentation, buildRAGRerankerComparisonPresentations, buildRAGRerankerOverviewPresentation, buildRAGRetrievalComparisonOverviewPresentation, buildRAGRetrievalComparisonPresentations, buildRAGRetrievalOverviewPresentation, buildRAGRetrievalTracePresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGSyncOverviewPresentation, buildRAGSyncSourcePresentation, buildRAGSyncSourcePresentations } from './ui';
|
|
14
14
|
export { createRAGBunS3SyncClient, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGFileSyncStateStore, createRAGStaticEmailSyncClient, createRAGStorageSyncSource, createRAGSyncManager, createRAGSyncScheduler, createRAGUrlSyncSource } from './sync';
|
|
15
15
|
export { createRAGCollection, ingestDocuments, ingestRAGDocuments, searchDocuments } from './collection';
|
|
16
16
|
export { createInMemoryRAGStore } from './adapters/inMemory';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RAGAdminActionPresentation, RAGAdminActionRecord, RAGAdminJobPresentation, RAGAdminJobRecord, AIMessage, RAGAnswerGroundingCaseSnapshotPresentation, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingEvaluationResponse, RAGCorpusHealth, RAGCorpusHealthPresentation, RAGExtractorReadiness, RAGReadinessPresentation, RAGGroundingOverviewPresentation, RAGGroundingProviderCaseComparisonPresentation, RAGGroundingProviderOverviewPresentation, RAGGroundingProviderPresentation, RAGComparisonOverviewPresentation, RAGComparisonPresentation, RAGChunkGraph, RAGChunkGraphNavigation, RAGChunkStructure, RAGDocumentChunkPreview, RAGLabelValueRow, RAGRerankerComparisonEntry, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalTrace, RAGQualityOverviewPresentation, RAGEvaluationCaseTracePresentation, RAGEvaluationHistory, RAGAnswerGroundingHistoryPresentation, RAGEvaluationHistoryPresentation, RAGRerankerComparison, RAGAnswerWorkflowState, RAGRetrievalTracePresentation, RAGSource, RAGSourceLabels, RAGSourceGroup, RAGSourceSummary, RAGStreamStage, RAGSyncOverviewPresentation, RAGSyncSourcePresentation, RAGSyncSourceRecord } from '../../../types/ai';
|
|
2
|
-
import { buildRAGCitationReferenceMap, buildRAGCitations, buildRAGGroundedAnswer, buildRAGGroundingReferences } from './grounding';
|
|
3
|
-
export { buildRAGCitationReferenceMap, buildRAGCitations, buildRAGGroundedAnswer, buildRAGGroundingReferences };
|
|
2
|
+
import { buildRAGCitationReferenceMap, buildRAGCitations, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingReferences } from './grounding';
|
|
3
|
+
export { buildRAGCitationReferenceMap, buildRAGCitations, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingReferences };
|
|
4
4
|
export declare const buildRAGRetrievalTracePresentation: (trace?: RAGRetrievalTrace) => RAGRetrievalTracePresentation;
|
|
5
5
|
export declare const buildRAGAdminJobPresentation: (job: RAGAdminJobRecord) => RAGAdminJobPresentation;
|
|
6
6
|
export declare const buildRAGAdminJobPresentations: (jobs?: RAGAdminJobRecord[]) => RAGAdminJobPresentation[];
|
package/dist/src/ai/rag/ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { buildRAGAdminActionPresentation, buildRAGAdminActionPresentations, buildRAGAdminJobPresentation, buildRAGAdminJobPresentations, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGChunkGraphNavigation, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGChunkGraph, buildRAGCorpusHealthPresentation, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGReadinessPresentation, buildRAGRetrievalTracePresentation, buildRAGSyncOverviewPresentation, buildRAGSyncSourcePresentation, buildRAGSyncSourcePresentations } from './presentation';
|
|
1
|
+
export { buildRAGAdminActionPresentation, buildRAGAdminActionPresentations, buildRAGAdminJobPresentation, buildRAGAdminJobPresentations, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGChunkGraphNavigation, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGChunkGraph, buildRAGCorpusHealthPresentation, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingReferences, buildRAGReadinessPresentation, buildRAGRetrievalTracePresentation, buildRAGSyncOverviewPresentation, buildRAGSyncSourcePresentation, buildRAGSyncSourcePresentations } from './presentation';
|
|
2
2
|
export { buildRAGAnswerWorkflowState, buildRAGRetrievedState, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './workflowState';
|
|
3
3
|
export { buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGQualityOverviewPresentation, buildRAGGroundingOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderPresentations, buildRAGRetrievalComparisonOverviewPresentation, buildRAGRetrievalOverviewPresentation, buildRAGRetrievalComparisonPresentations, buildRAGRerankerComparisonOverviewPresentation, buildRAGRerankerOverviewPresentation, buildRAGRerankerComparisonPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, buildRAGEvaluationHistoryRows } from './presentation';
|
|
4
4
|
export type { RAGStreamProgress, RAGStreamProgressState } from './workflowState';
|
package/dist/svelte/ai/index.js
CHANGED
|
@@ -354,6 +354,13 @@ var buildGroundingReferenceEvidenceSummary = (reference) => [
|
|
|
354
354
|
reference.contextLabel,
|
|
355
355
|
reference.provenanceLabel
|
|
356
356
|
].filter((value) => Boolean(value && value.length > 0)).filter((value, index, values) => values.findIndex((entry) => entry === value) === index).join(" \xB7 ");
|
|
357
|
+
var buildGroundingSectionKey = (reference) => reference.contextLabel ?? reference.locatorLabel ?? reference.label ?? reference.source ?? reference.chunkId;
|
|
358
|
+
var buildGroundingSectionSummaryLine = (reference) => [
|
|
359
|
+
reference.source ?? reference.title ?? reference.chunkId,
|
|
360
|
+
reference.locatorLabel,
|
|
361
|
+
reference.contextLabel,
|
|
362
|
+
reference.provenanceLabel
|
|
363
|
+
].filter((value) => Boolean(value && value.length > 0)).filter((value, index, values) => values.findIndex((entry) => entry === value) === index).join(" \xB7 ");
|
|
357
364
|
var buildGroundedAnswerCitationDetail = (reference) => ({
|
|
358
365
|
contextLabel: reference.contextLabel,
|
|
359
366
|
evidenceLabel: buildGroundingReferenceEvidenceLabel(reference),
|
|
@@ -444,9 +451,61 @@ var buildRAGGroundedAnswer = (content, sources) => {
|
|
|
444
451
|
hasCitations,
|
|
445
452
|
parts,
|
|
446
453
|
references,
|
|
454
|
+
sectionSummaries: buildRAGGroundedAnswerSectionSummaries(references),
|
|
447
455
|
ungroundedReferenceNumbers: [...ungroundedReferenceNumbers].sort((left, right) => left - right)
|
|
448
456
|
};
|
|
449
457
|
};
|
|
458
|
+
var buildRAGGroundedAnswerSectionSummaries = (references) => {
|
|
459
|
+
const groups = new Map;
|
|
460
|
+
for (const reference of references) {
|
|
461
|
+
const key = buildGroundingSectionKey(reference);
|
|
462
|
+
const existing = groups.get(key);
|
|
463
|
+
if (!existing) {
|
|
464
|
+
groups.set(key, {
|
|
465
|
+
chunkIds: [reference.chunkId],
|
|
466
|
+
contextLabel: reference.contextLabel,
|
|
467
|
+
count: 1,
|
|
468
|
+
key,
|
|
469
|
+
label: key,
|
|
470
|
+
locatorLabel: reference.locatorLabel,
|
|
471
|
+
provenanceLabel: reference.provenanceLabel,
|
|
472
|
+
referenceNumbers: [reference.number],
|
|
473
|
+
references: [reference],
|
|
474
|
+
summary: buildGroundingSectionSummaryLine(reference) || reference.label || reference.chunkId
|
|
475
|
+
});
|
|
476
|
+
continue;
|
|
477
|
+
}
|
|
478
|
+
existing.count += 1;
|
|
479
|
+
if (!existing.chunkIds.includes(reference.chunkId)) {
|
|
480
|
+
existing.chunkIds.push(reference.chunkId);
|
|
481
|
+
}
|
|
482
|
+
if (!existing.referenceNumbers.includes(reference.number)) {
|
|
483
|
+
existing.referenceNumbers.push(reference.number);
|
|
484
|
+
}
|
|
485
|
+
existing.references.push(reference);
|
|
486
|
+
if (!existing.contextLabel && reference.contextLabel) {
|
|
487
|
+
existing.contextLabel = reference.contextLabel;
|
|
488
|
+
}
|
|
489
|
+
if (!existing.locatorLabel && reference.locatorLabel) {
|
|
490
|
+
existing.locatorLabel = reference.locatorLabel;
|
|
491
|
+
}
|
|
492
|
+
if (!existing.provenanceLabel && reference.provenanceLabel) {
|
|
493
|
+
existing.provenanceLabel = reference.provenanceLabel;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return [...groups.values()].map((group) => ({
|
|
497
|
+
...group,
|
|
498
|
+
referenceNumbers: [...group.referenceNumbers].sort((left, right) => left - right),
|
|
499
|
+
references: group.references.slice().sort((left, right) => left.number - right.number)
|
|
500
|
+
})).sort((left, right) => {
|
|
501
|
+
const leftFirst = left.referenceNumbers[0] ?? Number.POSITIVE_INFINITY;
|
|
502
|
+
const rightFirst = right.referenceNumbers[0] ?? Number.POSITIVE_INFINITY;
|
|
503
|
+
if (leftFirst !== rightFirst) {
|
|
504
|
+
return leftFirst - rightFirst;
|
|
505
|
+
}
|
|
506
|
+
return left.label.localeCompare(right.label);
|
|
507
|
+
});
|
|
508
|
+
};
|
|
450
509
|
var buildRAGGroundingReferences = (sources) => {
|
|
451
510
|
const citations = buildRAGCitations(sources);
|
|
452
511
|
const citationReferenceMap = buildRAGCitationReferenceMap(citations);
|
|
@@ -7665,5 +7724,5 @@ export {
|
|
|
7665
7724
|
createAIStream
|
|
7666
7725
|
};
|
|
7667
7726
|
|
|
7668
|
-
//# debugId=
|
|
7727
|
+
//# debugId=CC16B816D2847A9E64756E2164756E21
|
|
7669
7728
|
//# sourceMappingURL=index.js.map
|