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> -
addDocumentFromFile(
String filePath, {String? metadata, String? name, ChunkingStrategy? strategy, Duration? chunkDelay, void onProgress(int done, int total)?}) → Future< SourceAddResult> -
addDocumentUtf8(
Uint8List bytes, {String? metadata, String? name, ChunkingStrategy? strategy, Duration? chunkDelay, void onProgress(int done, int total)?}) → Future< SourceAddResult> -
assembleContext(
{required SearchHandle searchHandle, int tokenBudget = 2000, ContextStrategy strategy = ContextStrategy.relevanceFirst, String separator = '\n\n---\n\n', bool singleSourceMode = false}) → Future< AssembledContextV2> -
deriveContextBudgetForPromptV2(
{required int fullPromptBudget, required String query, String? systemInstruction, bool useStrictMode = true, int safetyMarginTokens = 0, int? fixedPromptOverheadTokens}) → Future< int> -
formatPrompt(
String query, RagSearchResult result) → String -
getChunkExcerpts(
{required SearchHandle searchHandle, required List< int> chunkIds, required int maxBytes}) → Future<List< ChunkExcerptResult> > -
getStats(
) → Future< SourceStats> -
hydrateChunks(
{required SearchHandle searchHandle, required List< int> chunkIds}) → Future<List< ChunkSearchResult> > -
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> -
search(
String query, {int topK = 10, int tokenBudget = 2000, ContextStrategy strategy = ContextStrategy.relevanceFirst, int adjacentChunks = 0, bool singleSourceMode = false, List< int> ? sourceIds}) → Future<RagSearchResult> -
searchHybrid(
String query, {int topK = 10, double vectorWeight = kDefaultVectorWeight, double bm25Weight = kDefaultBm25Weight, List< int> ? sourceIds}) → Future<List< HybridSearchResult> > -
searchHybridWithContext(
String query, {int topK = 10, int tokenBudget = 2000, ContextStrategy strategy = ContextStrategy.relevanceFirst, int adjacentChunks = 0, double vectorWeight = kDefaultVectorWeight, double bm25Weight = kDefaultBm25Weight, bool singleSourceMode = false, List< int> ? sourceIds}) → Future<RagSearchResult> -
searchMeta(
String query, {int topK = 10, double vectorWeight = kDefaultVectorWeight, double bm25Weight = kDefaultBm25Weight, List< int> ? sourceIds, int adjacentChunks = 0}) → Future<SearchMetaResult> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited