CollectionRag class

Collection-scoped facade for Multi-Collection workflows.

Properties

collectionId String
no setter
hashCode int
The hash code for this object.
no setterinherited
isIndexReady bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
warmupFuture Future<void>
no setter

Methods

addDocument(String content, {String? metadata, String? name, String? filePath, ChunkingStrategy? strategy, Duration? chunkDelay, void onProgress(int done, int total)?}) Future<SourceAddResult>
formatPrompt(String query, RagSearchResult result) String
getStats() Future<SourceStats>
listSources() Future<List<SourceEntry>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebuildIndex({bool force = false}) Future<void>
removeSource(int sourceId) Future<void>
searchHybrid(String query, {int topK = 10, double vectorWeight = 0.2, double bm25Weight = 0.8, List<int>? sourceIds}) Future<List<HybridSearchResult>>
searchHybridWithContext(String query, {int topK = 10, int tokenBudget = 2000, ContextStrategy strategy = ContextStrategy.relevanceFirst, int adjacentChunks = 0, double vectorWeight = 0.2, double bm25Weight = 0.8, bool singleSourceMode = false, List<int>? sourceIds}) Future<RagSearchResult>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited