@absolutejs/absolute 0.19.0-beta.493 → 0.19.0-beta.495

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.
@@ -39,7 +39,17 @@ export declare const loadRAGDocumentsFromUploads: (input: RAGDocumentUploadInges
39
39
  }>;
40
40
  export declare const loadRAGDocumentsFromURLs: (input: RAGDocumentUrlIngestInput) => Promise<{
41
41
  defaultChunking: RAGChunkingOptions | undefined;
42
- documents: RAGIngestDocument[];
42
+ documents: {
43
+ metadata: {
44
+ [x: string]: unknown;
45
+ };
46
+ text: string;
47
+ id?: string;
48
+ title?: string;
49
+ source?: string;
50
+ format?: RAGContentFormat;
51
+ chunking?: RAGChunkingOptions;
52
+ }[];
43
53
  }>;
44
54
  export declare const loadRAGDocumentUpload: (input: RAGDocumentUploadInput & {
45
55
  extractors?: RAGFileExtractor[];
@@ -56,6 +66,16 @@ export declare const buildRAGUpsertInputFromUploads: (input: RAGDocumentUploadIn
56
66
  }>;
57
67
  export declare const loadRAGDocumentsFromDirectory: (input: RAGDirectoryIngestInput) => Promise<{
58
68
  defaultChunking: RAGChunkingOptions | undefined;
59
- documents: RAGIngestDocument[];
69
+ documents: {
70
+ metadata: {
71
+ [x: string]: unknown;
72
+ };
73
+ text: string;
74
+ id?: string;
75
+ title?: string;
76
+ source?: string;
77
+ format?: RAGContentFormat;
78
+ chunking?: RAGChunkingOptions;
79
+ }[];
60
80
  }>;
61
81
  export declare const prepareRAGDirectoryDocuments: (input: RAGDirectoryIngestInput) => Promise<RAGPreparedDocument[]>;
@@ -1,4 +1,11 @@
1
1
  import type { RAGHybridFusionMode, RAGHybridRetrievalMode, RAGHybridSearchOptions, RAGQueryResult } from '../../../types/ai';
2
+ type LexicalScoringCandidate = {
3
+ chunkId: string;
4
+ text: string;
5
+ title?: string;
6
+ source?: string;
7
+ metadata?: Record<string, unknown>;
8
+ };
2
9
  export declare const buildRAGLexicalHaystack: (result: {
3
10
  title?: string;
4
11
  source?: string;
@@ -11,6 +18,10 @@ export declare const scoreRAGLexicalMatch: (query: string, result: {
11
18
  chunkText: string;
12
19
  metadata?: Record<string, unknown>;
13
20
  }) => number;
21
+ export declare const rankRAGLexicalMatches: <T extends LexicalScoringCandidate>(query: string, results: T[]) => {
22
+ result: T;
23
+ score: number;
24
+ }[];
14
25
  export declare const fuseRAGQueryResults: ({ fusion, fusionConstant, lexical, lexicalWeight, vector, vectorWeight }: {
15
26
  vector?: RAGQueryResult[];
16
27
  lexical?: RAGQueryResult[];
@@ -34,3 +45,4 @@ export declare const resolveRAGHybridSearchOptions: (retrieval: RAGHybridSearchO
34
45
  mode: RAGHybridRetrievalMode;
35
46
  vectorWeight: number;
36
47
  };
48
+ export {};
package/package.json CHANGED
@@ -314,5 +314,5 @@
314
314
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts"
315
315
  },
316
316
  "types": "./dist/src/index.d.ts",
317
- "version": "0.19.0-beta.493"
317
+ "version": "0.19.0-beta.495"
318
318
  }