@absolutejs/rag 0.0.2 → 0.0.4
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 +12 -49
- package/dist/ai/client/index.js.map +8 -8
- package/dist/ai/client/ui.js +12 -49
- package/dist/ai/client/ui.js.map +5 -5
- package/dist/ai/rag/index.js +90 -173
- package/dist/ai/rag/index.js.map +30 -30
- package/dist/ai/rag/quality.js +12 -49
- package/dist/ai/rag/quality.js.map +5 -5
- package/dist/ai/rag/ui.js +12 -49
- package/dist/ai/rag/ui.js.map +5 -5
- package/dist/angular/ai/index.js.map +8 -8
- package/dist/react/ai/index.js.map +22 -22
- package/dist/svelte/ai/index.js.map +20 -20
- package/dist/vue/ai/index.js.map +20 -20
- package/package.json +103 -80
- package/dist/src/ai/client/createRAGAnswerWorkflow.d.ts +0 -32
- package/dist/src/ai/client/createRAGStream.d.ts +0 -2
- package/dist/src/ai/client/createRAGWorkflow.d.ts +0 -3
- package/dist/src/ai/client/index.d.ts +0 -8
- package/dist/src/ai/client/ragClient.d.ts +0 -349
- package/dist/src/ai/client/ui.d.ts +0 -5
- package/dist/src/ai/rag/accessControl.d.ts +0 -2
- package/dist/src/ai/rag/adapters/filtering.d.ts +0 -2
- package/dist/src/ai/rag/adapters/inMemory.d.ts +0 -8
- package/dist/src/ai/rag/adapters/postgres.d.ts +0 -20
- package/dist/src/ai/rag/adapters/queryPlanning.d.ts +0 -26
- package/dist/src/ai/rag/adapters/sqlite.d.ts +0 -24
- package/dist/src/ai/rag/adapters/utils.d.ts +0 -3
- package/dist/src/ai/rag/chat.d.ts +0 -1773
- package/dist/src/ai/rag/collection.d.ts +0 -15
- package/dist/src/ai/rag/constants.d.ts +0 -9
- package/dist/src/ai/rag/emailProviders.d.ts +0 -34
- package/dist/src/ai/rag/embedding.d.ts +0 -9
- package/dist/src/ai/rag/embeddingProviders.d.ts +0 -50
- package/dist/src/ai/rag/extractorProviders.d.ts +0 -58
- package/dist/src/ai/rag/grounding.d.ts +0 -6
- package/dist/src/ai/rag/htmxConfig.d.ts +0 -3
- package/dist/src/ai/rag/htmxWorkflowRenderers.d.ts +0 -3
- package/dist/src/ai/rag/index.d.ts +0 -31
- package/dist/src/ai/rag/ingestion.d.ts +0 -61
- package/dist/src/ai/rag/jobState.d.ts +0 -2
- package/dist/src/ai/rag/lexical.d.ts +0 -42
- package/dist/src/ai/rag/presentation.d.ts +0 -165
- package/dist/src/ai/rag/quality.d.ts +0 -607
- package/dist/src/ai/rag/queryTransforms.d.ts +0 -17
- package/dist/src/ai/rag/reranking.d.ts +0 -17
- package/dist/src/ai/rag/resolveAbsoluteSQLiteVec.d.ts +0 -3
- package/dist/src/ai/rag/retrievalStrategies.d.ts +0 -6
- package/dist/src/ai/rag/sync.d.ts +0 -37
- package/dist/src/ai/rag/types.d.ts +0 -11
- package/dist/src/ai/rag/ui.d.ts +0 -4
- package/dist/src/ai/rag/workflowState.d.ts +0 -1
- package/dist/src/angular/ai/ai-rag-stream.service.d.ts +0 -32
- package/dist/src/angular/ai/ai-rag-workflow.service.d.ts +0 -33
- package/dist/src/angular/ai/index.d.ts +0 -3
- package/dist/src/angular/ai/rag-client.service.d.ts +0 -243
- package/dist/src/constants.d.ts +0 -60
- package/dist/src/react/ai/index.d.ts +0 -18
- package/dist/src/react/ai/useRAG.d.ts +0 -341
- package/dist/src/react/ai/useRAGChunkPreview.d.ts +0 -20
- package/dist/src/react/ai/useRAGCitations.d.ts +0 -9
- package/dist/src/react/ai/useRAGDocuments.d.ts +0 -10
- package/dist/src/react/ai/useRAGEvaluate.d.ts +0 -28
- package/dist/src/react/ai/useRAGGrounding.d.ts +0 -10
- package/dist/src/react/ai/useRAGIndexAdmin.d.ts +0 -58
- package/dist/src/react/ai/useRAGIngest.d.ts +0 -16
- package/dist/src/react/ai/useRAGOps.d.ts +0 -20
- package/dist/src/react/ai/useRAGSearch.d.ts +0 -17
- package/dist/src/react/ai/useRAGSources.d.ts +0 -13
- package/dist/src/react/ai/useRAGStatus.d.ts +0 -10
- package/dist/src/react/ai/useRAGStream.d.ts +0 -55
- package/dist/src/react/ai/useRAGStreamProgress.d.ts +0 -9
- package/dist/src/react/ai/useRAGWorkflow.d.ts +0 -55
- package/dist/src/svelte/ai/createRAG.d.ts +0 -292
- package/dist/src/svelte/ai/createRAGChunkPreview.d.ts +0 -20
- package/dist/src/svelte/ai/createRAGCitations.d.ts +0 -10
- package/dist/src/svelte/ai/createRAGDocuments.d.ts +0 -10
- package/dist/src/svelte/ai/createRAGEvaluate.d.ts +0 -28
- package/dist/src/svelte/ai/createRAGGrounding.d.ts +0 -11
- package/dist/src/svelte/ai/createRAGIndexAdmin.d.ts +0 -58
- package/dist/src/svelte/ai/createRAGIngest.d.ts +0 -17
- package/dist/src/svelte/ai/createRAGOps.d.ts +0 -20
- package/dist/src/svelte/ai/createRAGSearch.d.ts +0 -15
- package/dist/src/svelte/ai/createRAGSources.d.ts +0 -14
- package/dist/src/svelte/ai/createRAGStatus.d.ts +0 -9
- package/dist/src/svelte/ai/createRAGStream.d.ts +0 -30
- package/dist/src/svelte/ai/createRAGStreamProgress.d.ts +0 -8
- package/dist/src/svelte/ai/createRAGWorkflow.d.ts +0 -30
- package/dist/src/svelte/ai/index.d.ts +0 -17
- package/dist/src/vue/ai/index.d.ts +0 -17
- package/dist/src/vue/ai/useRAG.d.ts +0 -2892
- package/dist/src/vue/ai/useRAGChunkPreview.d.ts +0 -152
- package/dist/src/vue/ai/useRAGCitations.d.ts +0 -10
- package/dist/src/vue/ai/useRAGDocuments.d.ts +0 -94
- package/dist/src/vue/ai/useRAGEvaluate.d.ts +0 -1002
- package/dist/src/vue/ai/useRAGGrounding.d.ts +0 -11
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +0 -1104
- package/dist/src/vue/ai/useRAGIngest.d.ts +0 -27
- package/dist/src/vue/ai/useRAGOps.d.ts +0 -220
- package/dist/src/vue/ai/useRAGSearch.d.ts +0 -159
- package/dist/src/vue/ai/useRAGSources.d.ts +0 -14
- package/dist/src/vue/ai/useRAGStatus.d.ts +0 -9
- package/dist/src/vue/ai/useRAGStream.d.ts +0 -35
- package/dist/src/vue/ai/useRAGStreamProgress.d.ts +0 -8
- package/dist/src/vue/ai/useRAGWorkflow.d.ts +0 -35
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { RAGCollection, RAGCollectionSearchParams, RAGRerankerProviderLike, RAGDocumentIngestInput, RAGEmbeddingProviderLike, RAGQueryResult, RAGQueryTransformProviderLike, RAGRetrievalStrategyProviderLike, RAGUpsertInput, RAGVectorStore } from '@absolutejs/ai';
|
|
2
|
-
export type CreateRAGCollectionOptions = {
|
|
3
|
-
store: RAGVectorStore;
|
|
4
|
-
embedding?: RAGEmbeddingProviderLike;
|
|
5
|
-
defaultTopK?: number;
|
|
6
|
-
defaultCandidateMultiplier?: number;
|
|
7
|
-
defaultModel?: string;
|
|
8
|
-
queryTransform?: RAGQueryTransformProviderLike;
|
|
9
|
-
retrievalStrategy?: RAGRetrievalStrategyProviderLike;
|
|
10
|
-
rerank?: RAGRerankerProviderLike;
|
|
11
|
-
};
|
|
12
|
-
export declare const createRAGCollection: (options: CreateRAGCollectionOptions) => RAGCollection;
|
|
13
|
-
export declare const ingestDocuments: (collection: RAGCollection, input: RAGUpsertInput) => Promise<void>;
|
|
14
|
-
export declare const ingestRAGDocuments: (collection: RAGCollection, input: RAGDocumentIngestInput) => Promise<void>;
|
|
15
|
-
export declare const searchDocuments: (collection: RAGCollection, input: RAGCollectionSearchParams) => Promise<RAGQueryResult[]>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const HTTP_STATUS_OK = 200;
|
|
2
|
-
export declare const HTTP_STATUS_BAD_REQUEST = 400;
|
|
3
|
-
export declare const HTTP_STATUS_NOT_FOUND = 404;
|
|
4
|
-
export declare const EXCLUDE_LAST_OFFSET = -1;
|
|
5
|
-
export declare const RAG_CHUNK_ID_PAD_LENGTH = 3;
|
|
6
|
-
export declare const RAG_DOCUMENT_ID_PREVIEW_LENGTH = 32;
|
|
7
|
-
export declare const RAG_DOCUMENT_SLUG_MAX_LENGTH = 48;
|
|
8
|
-
export declare const RAG_MIN_CHUNK_LENGTH_FLOOR = 120;
|
|
9
|
-
export declare const RAG_SEARCH_SCORE_DECIMAL_PLACES = 3;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { RAGEmailSyncClient, RAGGmailLinkedEmailSyncClientOptions } from '@absolutejs/ai';
|
|
2
|
-
export type GmailEmailSyncConfig = {
|
|
3
|
-
accessToken: string;
|
|
4
|
-
userId?: string;
|
|
5
|
-
query?: string;
|
|
6
|
-
labelIds?: string[];
|
|
7
|
-
includeSpamTrash?: boolean;
|
|
8
|
-
maxResults?: number;
|
|
9
|
-
fetch?: typeof fetch;
|
|
10
|
-
};
|
|
11
|
-
export type GraphEmailSyncConfig = {
|
|
12
|
-
accessToken: string;
|
|
13
|
-
baseUrl?: string;
|
|
14
|
-
userId?: string;
|
|
15
|
-
folderId?: string;
|
|
16
|
-
filter?: string;
|
|
17
|
-
search?: string;
|
|
18
|
-
top?: number;
|
|
19
|
-
fetch?: typeof fetch;
|
|
20
|
-
};
|
|
21
|
-
export type IMAPEmailSyncConfig = {
|
|
22
|
-
host: string;
|
|
23
|
-
port?: number;
|
|
24
|
-
secure?: boolean;
|
|
25
|
-
username: string;
|
|
26
|
-
password: string;
|
|
27
|
-
mailbox?: string;
|
|
28
|
-
search?: string[];
|
|
29
|
-
maxResults?: number;
|
|
30
|
-
};
|
|
31
|
-
export declare const createRAGGmailEmailSyncClient: (config: GmailEmailSyncConfig) => RAGEmailSyncClient;
|
|
32
|
-
export declare const createRAGLinkedGmailEmailSyncClient: (config: RAGGmailLinkedEmailSyncClientOptions) => RAGEmailSyncClient;
|
|
33
|
-
export declare const createRAGGraphEmailSyncClient: (config: GraphEmailSyncConfig) => RAGEmailSyncClient;
|
|
34
|
-
export declare const createRAGIMAPEmailSyncClient: (config: IMAPEmailSyncConfig) => RAGEmailSyncClient;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RAGEmbeddingFunction, RAGEmbeddingProvider, RAGEmbeddingProviderLike } from '@absolutejs/ai';
|
|
2
|
-
export type CreateRAGEmbeddingProviderOptions = {
|
|
3
|
-
embed: RAGEmbeddingFunction;
|
|
4
|
-
dimensions?: number;
|
|
5
|
-
defaultModel?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const createRAGEmbeddingProvider: (options: CreateRAGEmbeddingProviderOptions) => RAGEmbeddingProvider;
|
|
8
|
-
export declare const resolveRAGEmbeddingProvider: (providerLike: RAGEmbeddingProviderLike | undefined, fallbackEmbed?: RAGEmbeddingFunction, defaultModel?: string) => RAGEmbeddingProvider;
|
|
9
|
-
export declare const validateRAGEmbeddingDimensions: (vector: number[], expectedDimensions: number | undefined, context: "query" | "chunk") => void;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { RAGEmbeddingProvider } from '@absolutejs/ai';
|
|
2
|
-
type FetchLike = (input: RequestInfo | URL, init?: RequestInit | BunFetchRequestInit) => Promise<Response>;
|
|
3
|
-
export type OpenAIEmbeddingsConfig = {
|
|
4
|
-
apiKey: string;
|
|
5
|
-
baseUrl?: string;
|
|
6
|
-
defaultModel?: string;
|
|
7
|
-
dimensions?: number;
|
|
8
|
-
fetch?: FetchLike;
|
|
9
|
-
};
|
|
10
|
-
export type OpenAICompatibleEmbeddingsConfig = OpenAIEmbeddingsConfig & {
|
|
11
|
-
baseUrl: string;
|
|
12
|
-
};
|
|
13
|
-
export type GeminiEmbeddingsConfig = {
|
|
14
|
-
apiKey: string;
|
|
15
|
-
baseUrl?: string;
|
|
16
|
-
defaultModel?: string;
|
|
17
|
-
dimensions?: number;
|
|
18
|
-
fetch?: FetchLike;
|
|
19
|
-
};
|
|
20
|
-
export type OllamaEmbeddingsConfig = {
|
|
21
|
-
baseUrl?: string;
|
|
22
|
-
defaultModel?: string;
|
|
23
|
-
fetch?: FetchLike;
|
|
24
|
-
};
|
|
25
|
-
export declare const alibabaEmbeddings: (config: {
|
|
26
|
-
apiKey: string;
|
|
27
|
-
}) => RAGEmbeddingProvider;
|
|
28
|
-
export declare const deepseekEmbeddings: (config: {
|
|
29
|
-
apiKey: string;
|
|
30
|
-
}) => RAGEmbeddingProvider;
|
|
31
|
-
export declare const geminiEmbeddings: (config: GeminiEmbeddingsConfig) => RAGEmbeddingProvider;
|
|
32
|
-
export declare const googleEmbeddings: (config: {
|
|
33
|
-
apiKey: string;
|
|
34
|
-
}) => RAGEmbeddingProvider;
|
|
35
|
-
export declare const metaEmbeddings: (config: {
|
|
36
|
-
apiKey: string;
|
|
37
|
-
}) => RAGEmbeddingProvider;
|
|
38
|
-
export declare const mistralaiEmbeddings: (config: {
|
|
39
|
-
apiKey: string;
|
|
40
|
-
}) => RAGEmbeddingProvider;
|
|
41
|
-
export declare const moonshotEmbeddings: (config: {
|
|
42
|
-
apiKey: string;
|
|
43
|
-
}) => RAGEmbeddingProvider;
|
|
44
|
-
export declare const ollamaEmbeddings: (config?: OllamaEmbeddingsConfig) => RAGEmbeddingProvider;
|
|
45
|
-
export declare const openaiCompatibleEmbeddings: (config: OpenAICompatibleEmbeddingsConfig) => RAGEmbeddingProvider;
|
|
46
|
-
export declare const openaiEmbeddings: (config: OpenAIEmbeddingsConfig) => RAGEmbeddingProvider;
|
|
47
|
-
export declare const xaiEmbeddings: (config: {
|
|
48
|
-
apiKey: string;
|
|
49
|
-
}) => RAGEmbeddingProvider;
|
|
50
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { RAGMediaTranscriber, RAGOCRProvider } from '@absolutejs/ai';
|
|
2
|
-
type FetchLike = (input: RequestInfo | URL, init?: RequestInit | BunFetchRequestInit) => Promise<Response>;
|
|
3
|
-
export type OpenAITranscriptionConfig = {
|
|
4
|
-
apiKey: string;
|
|
5
|
-
baseUrl?: string;
|
|
6
|
-
defaultModel?: string;
|
|
7
|
-
fetch?: FetchLike;
|
|
8
|
-
language?: string;
|
|
9
|
-
prompt?: string;
|
|
10
|
-
};
|
|
11
|
-
export type OpenAICompatibleTranscriptionConfig = OpenAITranscriptionConfig & {
|
|
12
|
-
baseUrl: string;
|
|
13
|
-
};
|
|
14
|
-
export type OpenAIOCRConfig = {
|
|
15
|
-
apiKey: string;
|
|
16
|
-
baseUrl?: string;
|
|
17
|
-
defaultModel?: string;
|
|
18
|
-
fetch?: FetchLike;
|
|
19
|
-
prompt?: string;
|
|
20
|
-
};
|
|
21
|
-
export type OpenAICompatibleOCRConfig = OpenAIOCRConfig & {
|
|
22
|
-
baseUrl: string;
|
|
23
|
-
};
|
|
24
|
-
export type GeminiOCRConfig = {
|
|
25
|
-
apiKey: string;
|
|
26
|
-
baseUrl?: string;
|
|
27
|
-
defaultModel?: string;
|
|
28
|
-
fetch?: FetchLike;
|
|
29
|
-
prompt?: string;
|
|
30
|
-
};
|
|
31
|
-
export type OllamaOCRConfig = {
|
|
32
|
-
baseUrl?: string;
|
|
33
|
-
defaultModel?: string;
|
|
34
|
-
fetch?: FetchLike;
|
|
35
|
-
prompt?: string;
|
|
36
|
-
};
|
|
37
|
-
export type OllamaTranscriptionConfig = {
|
|
38
|
-
baseUrl?: string;
|
|
39
|
-
defaultModel?: string;
|
|
40
|
-
fetch?: FetchLike;
|
|
41
|
-
prompt?: string;
|
|
42
|
-
};
|
|
43
|
-
export type AnthropicOCRConfig = {
|
|
44
|
-
apiKey: string;
|
|
45
|
-
baseUrl?: string;
|
|
46
|
-
defaultModel?: string;
|
|
47
|
-
fetch?: FetchLike;
|
|
48
|
-
prompt?: string;
|
|
49
|
-
};
|
|
50
|
-
export declare const anthropicOCR: (config: AnthropicOCRConfig) => RAGOCRProvider;
|
|
51
|
-
export declare const geminiOCR: (config: GeminiOCRConfig) => RAGOCRProvider;
|
|
52
|
-
export declare const ollamaOCR: (config?: OllamaOCRConfig) => RAGOCRProvider;
|
|
53
|
-
export declare const ollamaTranscriber: (config?: OllamaTranscriptionConfig) => RAGMediaTranscriber;
|
|
54
|
-
export declare const openaiCompatibleOCR: (config: OpenAICompatibleOCRConfig) => RAGOCRProvider;
|
|
55
|
-
export declare const openaiCompatibleTranscriber: (config: OpenAICompatibleTranscriptionConfig) => RAGMediaTranscriber;
|
|
56
|
-
export declare const openaiOCR: (config: OpenAIOCRConfig) => RAGOCRProvider;
|
|
57
|
-
export declare const openaiTranscriber: (config: OpenAITranscriptionConfig) => RAGMediaTranscriber;
|
|
58
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundedAnswerSectionSummary, RAGGroundingReference, RAGSource } from '@absolutejs/ai';
|
|
2
|
-
export declare const buildRAGCitationReferenceMap: (citations: RAGCitation[]) => RAGCitationReferenceMap;
|
|
3
|
-
export declare const buildRAGCitations: (sources: RAGSource[]) => RAGCitation[];
|
|
4
|
-
export declare const buildRAGGroundedAnswer: (content: string, sources: RAGSource[]) => RAGGroundedAnswer;
|
|
5
|
-
export declare const buildRAGGroundedAnswerSectionSummaries: (references: RAGGroundingReference[]) => RAGGroundedAnswerSectionSummary[];
|
|
6
|
-
export declare const buildRAGGroundingReferences: (sources: RAGSource[]) => RAGGroundingReference[];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { RAGHTMXConfig, RAGHTMXWorkflowRenderConfig } from '@absolutejs/ai';
|
|
2
|
-
export declare const createRAGHTMXConfig: (config: RAGHTMXConfig) => RAGHTMXConfig;
|
|
3
|
-
export declare const createRAGHTMXWorkflowRenderConfig: (config: RAGHTMXWorkflowRenderConfig) => RAGHTMXWorkflowRenderConfig;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export { ragChat, ragChat as ragPlugin } from './chat';
|
|
2
|
-
export { createRAGHTMXConfig, createRAGHTMXWorkflowRenderConfig } from './htmxConfig';
|
|
3
|
-
export { createRAGEmbeddingProvider, resolveRAGEmbeddingProvider, validateRAGEmbeddingDimensions } from './embedding';
|
|
4
|
-
export { applyRAGReranking, createHeuristicRAGReranker, createRAGReranker, resolveRAGReranker } from './reranking';
|
|
5
|
-
export { applyRAGQueryTransform, createHeuristicRAGQueryTransform, createRAGQueryTransform, resolveRAGQueryTransform } from './queryTransforms';
|
|
6
|
-
export { createHeuristicRAGRetrievalStrategy } from './retrievalStrategies';
|
|
7
|
-
export { createRAGAccessControl } from './accessControl';
|
|
8
|
-
export { buildRAGLexicalHaystack, fuseRAGQueryResults, resolveRAGHybridSearchOptions, scoreRAGLexicalMatch } from './lexical';
|
|
9
|
-
export { alibabaEmbeddings, deepseekEmbeddings, geminiEmbeddings, googleEmbeddings, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, openaiCompatibleEmbeddings, openaiEmbeddings, xaiEmbeddings } from './embeddingProviders';
|
|
10
|
-
export { anthropicOCR, geminiOCR, ollamaOCR, ollamaTranscriber, openaiCompatibleOCR, openaiCompatibleTranscriber, openaiOCR, openaiTranscriber } from './extractorProviders';
|
|
11
|
-
export { createRAGGmailEmailSyncClient, createRAGLinkedGmailEmailSyncClient, createRAGGraphEmailSyncClient, createRAGIMAPEmailSyncClient } from './emailProviders';
|
|
12
|
-
export { buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, buildRAGUpsertInputFromUploads, createBuiltinArchiveExpander, createEmailExtractor, createEPUBExtractor, createLegacyDocumentExtractor, createRAGPDFOCRExtractor, createRAGArchiveExpander, createRAGArchiveFileExtractor, createOfficeDocumentExtractor, createPDFFileExtractor, createRAGFileExtractor, createRAGFileExtractorRegistry, createRAGChunkingRegistry, createRAGImageOCRExtractor, createRAGMediaFileExtractor, createRAGMediaTranscriber, createRAGOCRProvider, createTextFileExtractor, loadRAGDocumentFromURL, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentsFromURLs, prepareRAGDirectoryDocuments, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments } from './ingestion';
|
|
13
|
-
export { buildRAGContext } from './types';
|
|
14
|
-
export { buildRAGEvaluationLeaderboard, buildRAGEvaluationResponse, buildRAGEvaluationEntityQualityView, compareRAGRetrievalStrategies, compareRAGRerankers, buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEntityQualityView, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGRetrievalComparisonDecisionSummary, buildRAGRetrievalReleaseVerdict, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGFileEvaluationHistoryStore, createRAGSQLiteAnswerGroundingEvaluationHistoryStore, createRAGSQLiteEvaluationHistoryStore, createRAGFileRetrievalBaselineStore, createRAGFileRetrievalComparisonHistoryStore, createRAGFileRetrievalLaneHandoffDecisionStore, createRAGFileRetrievalLaneHandoffIncidentStore, createRAGFileRetrievalLaneHandoffIncidentHistoryStore, createRAGFileRetrievalIncidentRemediationDecisionStore, createRAGFileRetrievalIncidentRemediationExecutionHistoryStore, createRAGFileRetrievalLaneHandoffAutoCompletePolicyHistoryStore, createRAGFileRetrievalReleaseLanePolicyHistoryStore, createRAGFileRetrievalBaselineGatePolicyHistoryStore, createRAGFileRetrievalReleaseLaneEscalationPolicyHistoryStore, createRAGFileRetrievalReleaseDecisionStore, createRAGFileRetrievalReleaseIncidentStore, createRAGFileSearchTraceStore, createRAGFileSearchTracePruneHistoryStore, createRAGSQLiteGovernanceStores, inspectRAGSQLiteStoreMigrations, applyRAGSQLiteStoreMigrations, createRAGSQLiteRetrievalBaselineStore, createRAGSQLiteRetrievalComparisonHistoryStore, createRAGSQLiteRetrievalLaneHandoffDecisionStore, createRAGSQLiteRetrievalLaneHandoffIncidentStore, createRAGSQLiteRetrievalLaneHandoffIncidentHistoryStore, createRAGSQLiteRetrievalLaneHandoffAutoCompletePolicyHistoryStore, createRAGSQLiteRetrievalIncidentRemediationDecisionStore, createRAGSQLiteRetrievalIncidentRemediationExecutionHistoryStore, createRAGSQLiteRetrievalReleaseLanePolicyHistoryStore, createRAGSQLiteRetrievalBaselineGatePolicyHistoryStore, createRAGSQLiteRetrievalReleaseLaneEscalationPolicyHistoryStore, createRAGSQLiteRetrievalReleaseIncidentStore, createRAGSQLiteRetrievalReleaseDecisionStore, createRAGSQLiteSearchTraceStore, createRAGSQLiteSearchTracePruneHistoryStore, createRAGSQLiteEvaluationSuiteSnapshotHistoryStore, createRAGFileEvaluationSuiteSnapshotHistoryStore, createRAGEvaluationSuite, addRAGEvaluationSuiteCase, addRAGEvaluationSuiteCaseHardNegative, createRAGEvaluationSuiteSnapshot, createRAGAdaptiveNativePlannerBenchmarkSuite, createRAGAdaptiveNativePlannerBenchmarkSnapshot, createRAGNativeBackendBenchmarkCorpus, createRAGNativeBackendBenchmarkMockEmbedding, createRAGNativeBackendComparisonBenchmarkSuite, createRAGNativeBackendComparisonBenchmarkSnapshot, createRAGPresentationCueBenchmarkSuite, createRAGPresentationCueBenchmarkSnapshot, createRAGSpreadsheetCueBenchmarkSuite, createRAGSpreadsheetCueBenchmarkSnapshot, setRAGEvaluationSuiteCaseGoldenSet, updateRAGEvaluationSuiteCase, buildRAGEvaluationSuiteSnapshotDiff, removeRAGEvaluationSuiteCase, removeRAGEvaluationSuiteCaseHardNegative, reorderRAGEvaluationSuiteCases, summarizeRAGEvaluationSuiteDataset, generateRAGEvaluationSuiteFromDocuments, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, loadRAGEvaluationSuiteSnapshotHistory, 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';
|
|
15
|
-
export { buildRAGAdminActionPresentation, buildRAGAdminActionPresentations, buildRAGAdminJobPresentation, buildRAGAdminJobPresentations, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingEntityQualityPresentation, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGChunkExcerpts, buildRAGChunkGraphNavigation, buildRAGChunkPreviewGraph, buildRAGChunkPreviewNavigation, buildRAGChunkGraph, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGCorpusHealthPresentation, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationEntityQualityPresentation, buildRAGEvaluationHistoryPresentation, buildRAGEvaluationHistoryRows, buildRAGEvaluationSuiteSnapshotHistoryPresentation, buildRAGEvaluationSuiteSnapshotPresentations, buildRAGEvaluationSuiteSnapshotRows, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderPresentations, buildRAGGroundingReferences, buildRAGQualityOverviewPresentation, buildRAGReadinessPresentation, buildRAGSourceLabels, buildRAGSectionRetrievalDiagnostics, buildRAGRerankerComparisonOverviewPresentation, buildRAGRerankerComparisonPresentations, buildRAGRerankerOverviewPresentation, buildRAGRetrievalComparisonOverviewPresentation, buildRAGRetrievalComparisonPresentations, buildRAGRetrievalOverviewPresentation, buildRAGRetrievalTracePresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGSyncOverviewPresentation, buildRAGSyncSourcePresentation, buildRAGSyncSourcePresentations } from './ui';
|
|
16
|
-
export { createRAGBunS3SyncClient, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGFeedSyncSource, createRAGFileSyncStateStore, createRAGGitHubSyncSource, createRAGLinkedGmailEmailSyncSource, createRAGSiteDiscoverySyncSource, createRAGSitemapSyncSource, createRAGStaticEmailSyncClient, previewRAGSyncConflictResolutions, previewRAGSyncExtractionRecovery, resolveRAGSyncExtractionRecovery, resolveRAGSyncConflictResolutions, createRAGStorageSyncSource, createRAGSyncManager, createRAGSyncScheduler, createRAGUrlSyncSource } from './sync';
|
|
17
|
-
export { createRAGFileJobStateStore } from './jobState';
|
|
18
|
-
export { createRAGCollection, ingestDocuments, ingestRAGDocuments, searchDocuments } from './collection';
|
|
19
|
-
export { createInMemoryRAGStore } from './adapters/inMemory';
|
|
20
|
-
export { createPostgresRAGStore } from './adapters/postgres';
|
|
21
|
-
export { createSQLiteRAGStore } from './adapters/sqlite';
|
|
22
|
-
export { resolveAbsoluteSQLiteVec, resolveAbsoluteSQLiteVecExtensionPath } from './resolveAbsoluteSQLiteVec';
|
|
23
|
-
export { createRAGVector, normalizeVector, querySimilarity } from './adapters/utils';
|
|
24
|
-
export type { SQLiteRAGSearchTraceStoreOptions } from './quality';
|
|
25
|
-
export type { GeminiEmbeddingsConfig, OllamaEmbeddingsConfig, OpenAICompatibleEmbeddingsConfig, OpenAIEmbeddingsConfig } from './embeddingProviders';
|
|
26
|
-
export type { AnthropicOCRConfig, GeminiOCRConfig, OllamaOCRConfig, OllamaTranscriptionConfig, OpenAICompatibleOCRConfig, OpenAICompatibleTranscriptionConfig, OpenAIOCRConfig, OpenAITranscriptionConfig } from './extractorProviders';
|
|
27
|
-
export type { GmailEmailSyncConfig, GraphEmailSyncConfig, IMAPEmailSyncConfig } from './emailProviders';
|
|
28
|
-
export type { NativeSQLiteRAGStoreOptions, SQLiteRAGStoreOptions } from './adapters/sqlite';
|
|
29
|
-
export type { AIHTMXRenderConfig, RAGAnswerWorkflowState, RAGBackendCapabilities, RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundedAnswerPart, RAGGroundingReference, RAGChunkingOptions, RAGChunkingStrategy, RAGDocumentChunk, RAGDocumentChunkPreview, RAGArchiveEntry, RAGArchiveExpander, RAGArchiveExpansionResult, RAGExtractedFileDocument, RAGFileExtractionInput, RAGFileExtractor, RAGPDFOCRExtractorOptions, RAGDocumentFileInput, RAGDirectoryIngestInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGDocumentUrlIngestInput, RAGDocumentUrlInput, RAGEmailSyncAttachment, RAGEmailSyncClient, RAGEmailSyncListInput, RAGEmailSyncListResult, RAGEmailSyncMessage, RAGEmailSyncSourceOptions, RAGFeedSyncInput, RAGFeedSyncSourceOptions, RAGGitHubRepoSyncInput, RAGGitHubSyncSourceOptions, RAGSitemapSyncInput, RAGSitemapSyncSourceOptions, RAGSiteDiscoveryInput, RAGSiteDiscoverySyncSourceOptions, RAGStorageSyncClient, RAGStorageSyncFile, RAGStorageSyncListInput, RAGStorageSyncListResult, RAGStorageSyncObject, RAGStorageSyncSourceOptions, RAGEmbeddingFunction, RAGEmbeddingInput, RAGEmbeddingProvider, RAGEmbeddingProviderLike, RAGBackendDescriptor, RAGCollection, RAGCollectionSearchParams, RAGContentFormat, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationSummary, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationLeaderboardEntry, RAGEvaluationInput, RAGEvaluationResponse, RAGEvaluationSummary, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalComparisonSummary, RAGHTMXConfig, RAGHTMXWorkflowRenderConfig, RAGIngestDocument, RAGIngestResponse, RAGIndexedDocument, RAGHybridFusionMode, RAGHybridRetrievalMode, RAGHybridSearchOptions, RAGMediaTranscriber, RAGMediaTranscriptSegment, RAGMediaTranscriptionResult, RAGMutationResponse, RAGLexicalQueryInput, RAGOCRProvider, RAGOCRResult, RAGQueryInput, RAGQueryResult, RAGQueryTransformInput, RAGQueryTransformProvider, RAGQueryTransformProviderLike, RAGQueryTransformResult, RAGQueryTransformer, RAGPreparedDocument, RAGReranker, RAGRerankerCandidate, RAGRerankerComparison, RAGRerankerComparisonEntry, RAGRerankerComparisonSummary, RAGRerankerInput, RAGRerankerProvider, RAGRerankerProviderLike, RAGSearchRequest, RAGSyncManager, RAGSyncSchedule, RAGSyncScheduler, RAGSyncResponse, RAGSyncRunOptions, RAGSyncStateStore, RAGSyncSourceContext, RAGSyncSourceDefinition, RAGSyncSourceRecord, RAGSyncSourceRunResult, RAGDirectorySyncSourceOptions, RAGUrlSyncSourceOptions, RAGSource, RAGSourceGroup, RAGSourceSummary, RAGSQLiteNativeDiagnostics, RAGStatusResponse, RAGUpsertInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution } from './types';
|
|
30
|
-
export type { RAGJobState, RAGJobStateStore, RAGPostgresNativeDiagnostics, RAGRetrievalComparisonCandidateInput, RAGRetrievalComparisonHistoryResponse, RAGRetrievalComparisonHistoryStore, RAGRetrievalComparisonRequest, RAGRetrievalComparisonResponse, RAGRetrievalComparisonRun, RAGSearchTraceGroupHistoryResponse, RAGSearchTraceHistoryResponse, RAGSearchTracePrunePreviewResponse, RAGSearchTracePruneHistoryResponse, RAGSearchTracePruneResponse, RAGSearchTracePruneInput, RAGSearchTracePrunePreview, RAGSearchTracePruneResult, RAGSearchTracePruneHistoryStore, RAGSearchTracePruneRun, RAGSearchTraceRetentionRuntime, RAGSearchTraceRetentionSchedule, RAGSearchTraceStats, RAGSearchTraceStatsResponse } from '@absolutejs/ai';
|
|
31
|
-
export type * from '@absolutejs/ai';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { RAGChunkingOptions, RAGChunkingRegistryLike, RAGArchiveExpander, RAGDirectoryIngestInput, RAGDocumentChunk, RAGDocumentFileInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGDocumentUrlInput, RAGDocumentUrlIngestInput, RAGFileExtractor, RAGFileExtractorRegistryLike, RAGIngestDocument, RAGMediaTranscriber, RAGPDFOCRExtractorOptions, RAGOCRProvider, RAGPreparedDocument } from '@absolutejs/ai';
|
|
2
|
-
export declare const createBuiltinArchiveExpander: () => RAGArchiveExpander;
|
|
3
|
-
export declare const createEmailExtractor: () => RAGFileExtractor;
|
|
4
|
-
export declare const createMailboxContainerExtractor: () => RAGFileExtractor;
|
|
5
|
-
export declare const createEPUBExtractor: () => RAGFileExtractor;
|
|
6
|
-
export declare const createLegacyDocumentExtractor: () => RAGFileExtractor;
|
|
7
|
-
export declare const createOfficeDocumentExtractor: () => RAGFileExtractor;
|
|
8
|
-
export declare const createRAGArchiveExpander: (expander: RAGArchiveExpander) => RAGArchiveExpander;
|
|
9
|
-
export declare const createRAGFileExtractor: (extractor: RAGFileExtractor) => RAGFileExtractor;
|
|
10
|
-
export declare const createRAGFileExtractorRegistry: (registry: RAGFileExtractorRegistryLike) => RAGFileExtractorRegistryLike;
|
|
11
|
-
export declare const createRAGChunkingRegistry: (registry: RAGChunkingRegistryLike) => RAGChunkingRegistryLike;
|
|
12
|
-
export declare const createRAGImageOCRExtractor: (provider: RAGOCRProvider) => RAGFileExtractor;
|
|
13
|
-
export declare const createRAGMediaFileExtractor: (transcriber: RAGMediaTranscriber) => RAGFileExtractor;
|
|
14
|
-
export declare const createRAGMediaTranscriber: (transcriber: RAGMediaTranscriber) => RAGMediaTranscriber;
|
|
15
|
-
export declare const createRAGOCRProvider: (provider: RAGOCRProvider) => RAGOCRProvider;
|
|
16
|
-
export declare const createTextFileExtractor: () => RAGFileExtractor;
|
|
17
|
-
export declare const createPDFFileExtractor: () => RAGFileExtractor;
|
|
18
|
-
export declare const createRAGArchiveFileExtractor: (expander: RAGArchiveExpander, options?: {
|
|
19
|
-
entryExtractors?: RAGFileExtractor[];
|
|
20
|
-
}) => RAGFileExtractor;
|
|
21
|
-
export declare const createRAGPDFOCRExtractor: (options: RAGPDFOCRExtractorOptions) => RAGFileExtractor;
|
|
22
|
-
export declare const prepareRAGDocument: (document: RAGIngestDocument, defaultChunking?: RAGChunkingOptions, chunkingRegistry?: RAGChunkingRegistryLike) => RAGPreparedDocument;
|
|
23
|
-
export declare const prepareRAGDocuments: (input: RAGDocumentIngestInput) => RAGPreparedDocument[];
|
|
24
|
-
export declare const mergeMetadata: (inputMetadata: Record<string, unknown> | undefined, extraMetadata: Record<string, unknown> | undefined, baseMetadata: Record<string, unknown> | undefined) => {
|
|
25
|
-
[x: string]: unknown;
|
|
26
|
-
};
|
|
27
|
-
export declare const buildRAGUpsertInputFromURLs: (input: RAGDocumentUrlIngestInput) => Promise<{
|
|
28
|
-
chunks: RAGDocumentChunk[];
|
|
29
|
-
}>;
|
|
30
|
-
export declare const loadRAGDocumentFile: (input: RAGDocumentFileInput) => Promise<RAGIngestDocument>;
|
|
31
|
-
export declare const loadRAGDocumentFromURL: (input: RAGDocumentUrlInput) => Promise<RAGIngestDocument>;
|
|
32
|
-
export declare const loadRAGDocumentsFromUploads: (input: RAGDocumentUploadIngestInput) => Promise<{
|
|
33
|
-
defaultChunking: RAGChunkingOptions | undefined;
|
|
34
|
-
chunkingRegistry: RAGChunkingRegistryLike | undefined;
|
|
35
|
-
documents: RAGIngestDocument[];
|
|
36
|
-
}>;
|
|
37
|
-
export declare const loadRAGDocumentsFromURLs: (input: RAGDocumentUrlIngestInput) => Promise<{
|
|
38
|
-
defaultChunking: RAGChunkingOptions | undefined;
|
|
39
|
-
chunkingRegistry: RAGChunkingRegistryLike | undefined;
|
|
40
|
-
documents: RAGIngestDocument[];
|
|
41
|
-
}>;
|
|
42
|
-
export declare const loadRAGDocumentUpload: (input: RAGDocumentUploadInput & {
|
|
43
|
-
extractors?: RAGFileExtractor[];
|
|
44
|
-
extractorRegistry?: RAGFileExtractorRegistryLike;
|
|
45
|
-
}) => Promise<RAGIngestDocument>;
|
|
46
|
-
export declare const prepareRAGDocumentFile: (input: RAGDocumentFileInput, defaultChunking?: RAGChunkingOptions, chunkingRegistry?: RAGChunkingRegistryLike) => Promise<RAGPreparedDocument>;
|
|
47
|
-
export declare const buildRAGUpsertInputFromDirectory: (input: RAGDirectoryIngestInput) => Promise<{
|
|
48
|
-
chunks: RAGDocumentChunk[];
|
|
49
|
-
}>;
|
|
50
|
-
export declare const buildRAGUpsertInputFromDocuments: (input: RAGDocumentIngestInput) => {
|
|
51
|
-
chunks: RAGDocumentChunk[];
|
|
52
|
-
};
|
|
53
|
-
export declare const buildRAGUpsertInputFromUploads: (input: RAGDocumentUploadIngestInput) => Promise<{
|
|
54
|
-
chunks: RAGDocumentChunk[];
|
|
55
|
-
}>;
|
|
56
|
-
export declare const loadRAGDocumentsFromDirectory: (input: RAGDirectoryIngestInput) => Promise<{
|
|
57
|
-
defaultChunking: RAGChunkingOptions | undefined;
|
|
58
|
-
chunkingRegistry: RAGChunkingRegistryLike | undefined;
|
|
59
|
-
documents: RAGIngestDocument[];
|
|
60
|
-
}>;
|
|
61
|
-
export declare const prepareRAGDirectoryDocuments: (input: RAGDirectoryIngestInput) => Promise<RAGPreparedDocument[]>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { RAGHybridFusionMode, RAGHybridRetrievalMode, RAGHybridSearchOptions, RAGQueryResult } from '@absolutejs/ai';
|
|
2
|
-
type LexicalScoringCandidate = {
|
|
3
|
-
chunkId: string;
|
|
4
|
-
text: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
source?: string;
|
|
7
|
-
metadata?: Record<string, unknown>;
|
|
8
|
-
};
|
|
9
|
-
export declare const buildRAGLexicalHaystack: (result: {
|
|
10
|
-
title?: string;
|
|
11
|
-
source?: string;
|
|
12
|
-
chunkText: string;
|
|
13
|
-
metadata?: Record<string, unknown>;
|
|
14
|
-
}) => string;
|
|
15
|
-
export declare const scoreRAGLexicalMatch: (query: string, result: {
|
|
16
|
-
title?: string;
|
|
17
|
-
source?: string;
|
|
18
|
-
chunkText: string;
|
|
19
|
-
metadata?: Record<string, unknown>;
|
|
20
|
-
}) => number;
|
|
21
|
-
export declare const rankRAGLexicalMatches: <T extends LexicalScoringCandidate>(query: string, results: T[]) => {
|
|
22
|
-
result: T;
|
|
23
|
-
score: number;
|
|
24
|
-
}[];
|
|
25
|
-
export declare const fuseRAGQueryResults: ({ fusion, fusionConstant, lexical, lexicalWeight, vector, vectorWeight }: {
|
|
26
|
-
vector?: RAGQueryResult[];
|
|
27
|
-
lexical?: RAGQueryResult[];
|
|
28
|
-
fusion?: RAGHybridFusionMode;
|
|
29
|
-
fusionConstant?: number;
|
|
30
|
-
lexicalWeight?: number;
|
|
31
|
-
vectorWeight?: number;
|
|
32
|
-
}) => {
|
|
33
|
-
score: number;
|
|
34
|
-
chunkId: string;
|
|
35
|
-
chunkText: string;
|
|
36
|
-
embedding?: number[];
|
|
37
|
-
title?: string;
|
|
38
|
-
source?: string;
|
|
39
|
-
metadata?: Record<string, unknown>;
|
|
40
|
-
}[];
|
|
41
|
-
export declare const resolveRAGHybridSearchOptions: (retrieval: RAGHybridSearchOptions | RAGHybridRetrievalMode | undefined) => Required<Pick<RAGHybridSearchOptions, "fusion" | "fusionConstant" | "lexicalWeight" | "mode" | "diversityStrategy" | "mmrLambda" | "sourceBalanceStrategy" | "vectorWeight">> & Pick<RAGHybridSearchOptions, "lexicalTopK" | "maxResultsPerSource">;
|
|
42
|
-
export {};
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import type { RAGAdminActionPresentation, RAGAdminActionRecord, RAGAdminJobPresentation, RAGAdminJobRecord, AIMessage, RAGAnswerGroundingCaseSnapshotPresentation, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingEntityQualityView, RAGAnswerGroundingEvaluationResponse, RAGCorpusHealth, RAGCorpusHealthPresentation, RAGExtractorReadiness, RAGReadinessPresentation, RAGGroundingOverviewPresentation, RAGGroundingProviderCaseComparisonPresentation, RAGGroundingProviderOverviewPresentation, RAGGroundingProviderPresentation, RAGComparisonOverviewPresentation, RAGComparisonPresentation, RAGChunkGraph, RAGChunkExcerpts, RAGExcerptModeCounts, RAGExcerptSelection, RAGChunkGraphNavigation, RAGChunkStructure, RAGDocumentChunkPreview, RAGLabelValueRow, RAGRerankerComparisonEntry, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalComparisonRun, RAGRetrievalReleaseGroupHistoryPresentation, RAGRetrievalReleaseTimelineSummary, RAGRetrievalTrace, RAGQualityOverviewPresentation, RAGSectionRetrievalDiagnostic, RAGEvaluationCaseTracePresentation, RAGEvaluationEntityQualityView, RAGEvaluationHistory, RAGAnswerGroundingHistoryPresentation, RAGEvaluationHistoryPresentation, RAGEvaluationSuiteSnapshotHistory, RAGEvaluationSuiteSnapshotHistoryPresentation, RAGEvaluationSuiteSnapshotPresentation, RAGEntityQualityViewPresentation, RAGRerankerComparison, RAGAnswerWorkflowState, RAGRetrievalTracePresentation, RAGSource, RAGSourceLabels, RAGSourceGroup, RAGSourceSummary, RAGStreamStage, RAGSyncOverviewPresentation, RAGSyncSourcePresentation, RAGSyncSourceRecord } from '@absolutejs/ai';
|
|
2
|
-
import { buildRAGCitationReferenceMap, buildRAGCitations, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingReferences } from './grounding';
|
|
3
|
-
export { buildRAGCitationReferenceMap, buildRAGCitations, buildRAGGroundedAnswer, buildRAGGroundedAnswerSectionSummaries, buildRAGGroundingReferences };
|
|
4
|
-
export declare const buildRAGRetrievalTracePresentation: (trace?: RAGRetrievalTrace) => RAGRetrievalTracePresentation;
|
|
5
|
-
export declare const buildRAGAdminJobPresentation: (job: RAGAdminJobRecord) => RAGAdminJobPresentation;
|
|
6
|
-
export declare const buildRAGAdminJobPresentations: (jobs?: RAGAdminJobRecord[]) => RAGAdminJobPresentation[];
|
|
7
|
-
export declare const buildRAGAdminActionPresentation: (action: RAGAdminActionRecord) => RAGAdminActionPresentation;
|
|
8
|
-
export declare const buildRAGAdminActionPresentations: (actions?: RAGAdminActionRecord[]) => RAGAdminActionPresentation[];
|
|
9
|
-
export declare const buildRAGSyncSourcePresentation: (source: RAGSyncSourceRecord) => RAGSyncSourcePresentation;
|
|
10
|
-
export declare const buildRAGSyncSourcePresentations: (sources?: RAGSyncSourceRecord[]) => RAGSyncSourcePresentation[];
|
|
11
|
-
export declare const buildRAGReadinessPresentation: (readiness?: RAGExtractorReadiness) => RAGReadinessPresentation;
|
|
12
|
-
export declare const buildRAGCorpusHealthPresentation: (health?: RAGCorpusHealth) => RAGCorpusHealthPresentation;
|
|
13
|
-
export declare const buildRAGSyncOverviewPresentation: (sources?: RAGSyncSourceRecord[]) => RAGSyncOverviewPresentation;
|
|
14
|
-
export declare const buildRAGSourceLabels: ({ metadata, source, title }: {
|
|
15
|
-
metadata?: Record<string, unknown>;
|
|
16
|
-
source?: string;
|
|
17
|
-
title?: string;
|
|
18
|
-
}) => RAGSourceLabels | undefined;
|
|
19
|
-
export declare const buildRAGChunkStructure: (metadata?: Record<string, unknown>) => RAGChunkStructure | undefined;
|
|
20
|
-
type ExcerptChunkInput = Pick<RAGSource, 'chunkId' | 'metadata' | 'structure' | 'text'>;
|
|
21
|
-
export declare const buildRAGChunkExcerpts: (chunks: ExcerptChunkInput[], activeChunkId?: string) => RAGChunkExcerpts | undefined;
|
|
22
|
-
export declare const buildRAGPreferredExcerpt: (excerpts?: RAGChunkExcerpts, structure?: RAGChunkStructure) => string;
|
|
23
|
-
export declare const buildRAGExcerptSelection: (excerpts?: RAGChunkExcerpts, structure?: RAGChunkStructure) => RAGExcerptSelection & {
|
|
24
|
-
excerpt: string;
|
|
25
|
-
};
|
|
26
|
-
export declare const buildRAGExcerptModeCounts: (selections: Array<RAGExcerptSelection | undefined>) => RAGExcerptModeCounts;
|
|
27
|
-
type GraphChunkInput = Pick<RAGSource, 'chunkId' | 'metadata' | 'source' | 'title' | 'labels' | 'structure'> & Partial<Pick<RAGSource, 'score'>>;
|
|
28
|
-
export declare const buildRAGChunkGraph: (chunks: GraphChunkInput[]) => RAGChunkGraph;
|
|
29
|
-
export declare const buildRAGChunkPreviewGraph: (preview: Pick<RAGDocumentChunkPreview, "chunks" | "document">) => RAGChunkGraph;
|
|
30
|
-
export declare const buildRAGChunkPreviewNavigation: (preview: Pick<RAGDocumentChunkPreview, "chunks" | "document">, activeChunkId?: string) => RAGChunkGraphNavigation;
|
|
31
|
-
export declare const buildRAGChunkGraphNavigation: (graph: RAGChunkGraph, activeChunkId?: string) => RAGChunkGraphNavigation;
|
|
32
|
-
export declare const buildRAGRetrievedState: (messages: AIMessage[]) => {
|
|
33
|
-
citationReferenceMap: import("@absolutejs/ai").RAGCitationReferenceMap;
|
|
34
|
-
citations: import("@absolutejs/ai").RAGCitation[];
|
|
35
|
-
conversationId: string;
|
|
36
|
-
excerptModeCounts: RAGExcerptModeCounts;
|
|
37
|
-
groundedAnswer: import("@absolutejs/ai").RAGGroundedAnswer;
|
|
38
|
-
messageId: string;
|
|
39
|
-
retrievalDurationMs: number | undefined;
|
|
40
|
-
retrievalStartedAt: number | undefined;
|
|
41
|
-
retrievedAt: number | undefined;
|
|
42
|
-
trace: RAGRetrievalTrace | undefined;
|
|
43
|
-
sectionDiagnostics: RAGSectionRetrievalDiagnostic[];
|
|
44
|
-
sourceGroups: RAGSourceGroup[];
|
|
45
|
-
sourceSummaries: RAGSourceSummary[];
|
|
46
|
-
sources: RAGSource[];
|
|
47
|
-
} | null;
|
|
48
|
-
export declare const buildRAGSourceSummaries: (sources: RAGSource[]) => RAGSourceSummary[];
|
|
49
|
-
export declare const buildRAGSectionRetrievalDiagnostics: (sources: RAGSource[], trace?: RAGRetrievalTrace) => RAGSectionRetrievalDiagnostic[];
|
|
50
|
-
export type RAGStreamProgress = {
|
|
51
|
-
stage: RAGStreamStage;
|
|
52
|
-
conversationId?: string;
|
|
53
|
-
messageId?: string;
|
|
54
|
-
retrievalStartedAt?: number;
|
|
55
|
-
retrievedAt?: number;
|
|
56
|
-
retrievalDurationMs?: number;
|
|
57
|
-
hasContent: boolean;
|
|
58
|
-
hasRetrieved: boolean;
|
|
59
|
-
hasSources: boolean;
|
|
60
|
-
hasThinking: boolean;
|
|
61
|
-
hasToolCalls: boolean;
|
|
62
|
-
isComplete: boolean;
|
|
63
|
-
isError: boolean;
|
|
64
|
-
isIdle: boolean;
|
|
65
|
-
isRetrieving: boolean;
|
|
66
|
-
isRetrieved: boolean;
|
|
67
|
-
isStreaming: boolean;
|
|
68
|
-
isSubmitting: boolean;
|
|
69
|
-
sourceCount: number;
|
|
70
|
-
latestMessage: AIMessage | undefined;
|
|
71
|
-
};
|
|
72
|
-
export declare const buildRAGStreamProgress: ({ error, isStreaming, messages }: {
|
|
73
|
-
error: string | null;
|
|
74
|
-
isStreaming: boolean;
|
|
75
|
-
messages: AIMessage[];
|
|
76
|
-
}) => RAGStreamProgress;
|
|
77
|
-
export type RAGStreamProgressState = ReturnType<typeof buildRAGStreamProgress>;
|
|
78
|
-
export declare const buildRAGAnswerWorkflowState: ({ error, isStreaming, messages }: {
|
|
79
|
-
error: string | null;
|
|
80
|
-
isStreaming: boolean;
|
|
81
|
-
messages: AIMessage[];
|
|
82
|
-
}) => RAGAnswerWorkflowState;
|
|
83
|
-
export declare const buildRAGSourceGroups: (sources: RAGSource[]) => RAGSourceGroup[];
|
|
84
|
-
export declare const getLatestAssistantMessage: (messages: AIMessage[]) => AIMessage | undefined;
|
|
85
|
-
export declare const getLatestRAGSources: (messages: AIMessage[]) => RAGSource[];
|
|
86
|
-
export declare const getLatestRetrievedMessage: (messages: AIMessage[]) => AIMessage | undefined;
|
|
87
|
-
export declare const resolveRAGStreamStage: ({ error, isStreaming, messages }: {
|
|
88
|
-
error: string | null;
|
|
89
|
-
isStreaming: boolean;
|
|
90
|
-
messages: AIMessage[];
|
|
91
|
-
}) => "error" | "complete" | "idle" | "submitting" | "retrieving" | "retrieved" | "streaming";
|
|
92
|
-
export declare const buildRAGComparisonTraceSummaryRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
|
|
93
|
-
export declare const buildRAGComparisonTraceDiffRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry, leader?: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
|
|
94
|
-
export declare const buildRAGRetrievalComparisonPresentations: (comparison: RAGRetrievalComparison) => RAGComparisonPresentation[];
|
|
95
|
-
export declare const buildRAGRetrievalComparisonOverviewPresentation: (comparison: RAGRetrievalComparison) => RAGComparisonOverviewPresentation;
|
|
96
|
-
export declare const buildRAGRerankerComparisonPresentations: (comparison: RAGRerankerComparison) => RAGComparisonPresentation[];
|
|
97
|
-
export declare const buildRAGRerankerComparisonOverviewPresentation: (comparison: RAGRerankerComparison) => RAGComparisonOverviewPresentation;
|
|
98
|
-
export declare const buildRAGGroundingProviderPresentations: (entries: Array<{
|
|
99
|
-
providerKey: string;
|
|
100
|
-
label: string;
|
|
101
|
-
elapsedMs: number;
|
|
102
|
-
response: RAGAnswerGroundingEvaluationResponse;
|
|
103
|
-
}>) => RAGGroundingProviderPresentation[];
|
|
104
|
-
export declare const buildRAGGroundingProviderOverviewPresentation: (input: {
|
|
105
|
-
entries: Array<{
|
|
106
|
-
providerKey: string;
|
|
107
|
-
label: string;
|
|
108
|
-
elapsedMs: number;
|
|
109
|
-
response: RAGAnswerGroundingEvaluationResponse;
|
|
110
|
-
}>;
|
|
111
|
-
summary: {
|
|
112
|
-
bestByPassingRate?: string;
|
|
113
|
-
bestByAverageCitationF1?: string;
|
|
114
|
-
bestByResolvedCitationRate?: string;
|
|
115
|
-
fastest?: string;
|
|
116
|
-
};
|
|
117
|
-
}) => RAGGroundingProviderOverviewPresentation;
|
|
118
|
-
export declare const buildRAGRetrievalOverviewPresentation: (comparison: RAGRetrievalComparison) => RAGQualityOverviewPresentation;
|
|
119
|
-
export declare const buildRAGRerankerOverviewPresentation: (comparison: RAGRerankerComparison) => RAGQualityOverviewPresentation;
|
|
120
|
-
export declare const buildRAGGroundingOverviewPresentation: (input: {
|
|
121
|
-
groundingEvaluation: RAGAnswerGroundingEvaluationResponse;
|
|
122
|
-
groundingProviderOverview?: RAGGroundingProviderOverviewPresentation | null;
|
|
123
|
-
}) => RAGGroundingOverviewPresentation;
|
|
124
|
-
export declare const buildRAGQualityOverviewPresentation: (input: {
|
|
125
|
-
retrievalComparison: RAGRetrievalComparison;
|
|
126
|
-
rerankerComparison: RAGRerankerComparison;
|
|
127
|
-
groundingEvaluation: RAGAnswerGroundingEvaluationResponse;
|
|
128
|
-
groundingProviderOverview?: RAGGroundingProviderOverviewPresentation | null;
|
|
129
|
-
}) => RAGQualityOverviewPresentation;
|
|
130
|
-
export declare const buildRAGGroundingProviderCaseComparisonPresentations: (comparisons: Array<{
|
|
131
|
-
caseId: string;
|
|
132
|
-
label: string;
|
|
133
|
-
entries: Array<{
|
|
134
|
-
providerKey: string;
|
|
135
|
-
label: string;
|
|
136
|
-
status: string;
|
|
137
|
-
coverage: string;
|
|
138
|
-
citationF1: number;
|
|
139
|
-
resolvedCitationRate: number;
|
|
140
|
-
matchedIds: string[];
|
|
141
|
-
missingIds: string[];
|
|
142
|
-
extraIds: string[];
|
|
143
|
-
answerExcerpt: string;
|
|
144
|
-
}>;
|
|
145
|
-
summary: {
|
|
146
|
-
bestByStatus?: string;
|
|
147
|
-
bestByCitationF1?: string;
|
|
148
|
-
bestByResolvedCitationRate?: string;
|
|
149
|
-
};
|
|
150
|
-
}>) => RAGGroundingProviderCaseComparisonPresentation[];
|
|
151
|
-
export declare const buildRAGEvaluationHistoryRows: (history?: RAGEvaluationHistory) => RAGLabelValueRow[];
|
|
152
|
-
export declare const buildRAGEvaluationCaseTracePresentations: (history?: RAGEvaluationHistory) => RAGEvaluationCaseTracePresentation[];
|
|
153
|
-
export declare const buildRAGEvaluationHistoryPresentation: (history?: RAGEvaluationHistory) => RAGEvaluationHistoryPresentation;
|
|
154
|
-
export declare const buildRAGEvaluationSuiteSnapshotRows: (history?: RAGEvaluationSuiteSnapshotHistory) => RAGLabelValueRow[];
|
|
155
|
-
export declare const buildRAGEvaluationSuiteSnapshotPresentations: (history?: RAGEvaluationSuiteSnapshotHistory) => RAGEvaluationSuiteSnapshotPresentation[];
|
|
156
|
-
export declare const buildRAGEvaluationSuiteSnapshotHistoryPresentation: (history?: RAGEvaluationSuiteSnapshotHistory) => RAGEvaluationSuiteSnapshotHistoryPresentation;
|
|
157
|
-
export declare const buildRAGRetrievalReleaseGroupHistoryPresentation: (input: {
|
|
158
|
-
timeline?: RAGRetrievalReleaseTimelineSummary;
|
|
159
|
-
runs?: RAGRetrievalComparisonRun[];
|
|
160
|
-
}) => RAGRetrievalReleaseGroupHistoryPresentation;
|
|
161
|
-
export declare const buildRAGAnswerGroundingCaseSnapshotPresentations: (history?: RAGAnswerGroundingEvaluationHistory) => RAGAnswerGroundingCaseSnapshotPresentation[];
|
|
162
|
-
export declare const buildRAGAnswerGroundingHistoryRows: (history?: RAGAnswerGroundingEvaluationHistory) => RAGLabelValueRow[];
|
|
163
|
-
export declare const buildRAGAnswerGroundingHistoryPresentation: (history?: RAGAnswerGroundingEvaluationHistory) => RAGAnswerGroundingHistoryPresentation;
|
|
164
|
-
export declare const buildRAGEvaluationEntityQualityPresentation: (view: RAGEvaluationEntityQualityView, entityType: "source" | "document") => RAGEntityQualityViewPresentation;
|
|
165
|
-
export declare const buildRAGAnswerGroundingEntityQualityPresentation: (view: RAGAnswerGroundingEntityQualityView, entityType: "source" | "document") => RAGEntityQualityViewPresentation;
|