Skip to content

Commit 65dca28

Browse files
committed
feat(rag): add BM25 sparse index and hybrid dense+sparse search with RRF fusion
1 parent e4c5379 commit 65dca28

6 files changed

Lines changed: 1327 additions & 0 deletions

File tree

src/rag/index.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export {
143143
type HydeConfig,
144144
type HydeLlmCaller,
145145
type HydeRetrievalResult,
146+
type HydeMultiRetrievalResult,
146147
DEFAULT_HYDE_CONFIG,
147148
resolveHydeConfig,
148149
} from './HydeRetriever.js';
@@ -213,6 +214,36 @@ export type {
213214
MultimodalIndexerConfig,
214215
} from './multimodal/index.js';
215216

217+
// ============================================================================
218+
// Hybrid Search (BM25 + Dense)
219+
// ============================================================================
220+
221+
export { BM25Index, type BM25Config, type BM25Document, type BM25Result, type BM25Stats } from './search/index.js';
222+
export { HybridSearcher, type HybridSearcherConfig, type HybridResult } from './search/index.js';
223+
224+
// ============================================================================
225+
// Semantic Chunking
226+
// ============================================================================
227+
228+
export {
229+
SemanticChunker,
230+
type SemanticChunkerConfig,
231+
type SemanticChunk,
232+
type BoundaryType,
233+
} from './chunking/index.js';
234+
235+
// ============================================================================
236+
// RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval)
237+
// ============================================================================
238+
239+
export {
240+
RaptorTree,
241+
type RaptorTreeConfig,
242+
type RaptorInputChunk,
243+
type RaptorTreeStats,
244+
type RaptorResult,
245+
} from './raptor/index.js';
246+
216247
// ============================================================================
217248
// Vector Math Utilities
218249
// ============================================================================

0 commit comments

Comments
 (0)