ContentRetriever class
Adaptive content retrieval engine.
Selects the best retrieval strategy based on chat mode:
- Question-driven modes use search (local → semantic → FTS → document order).
- Sequential modes load all chunks in document order.
Retrieval cascade for question-driven modes:
- Local on-device vector search (Tier 3) — fastest, offline-capable
- Supabase pgvector semantic search (Tier 2) — requires network + embeddings
- Supabase full-text search (Tier 1) — keyword matching
- Document order fallback — load all chunks sequentially
Constructors
- ContentRetriever(SupabaseDatasource _supabase)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retrieveChunks(
{required String mode, String? topicId, String? userMessage, String? domainId}) → Future< List< ContentChunkModel> > -
Retrieve the most relevant content chunks for a given
mode. -
setLocalEmbedding(
LocalEmbeddingDatasource ds) → void - Set the local embedding datasource for on-device inference.
-
setLocalVectorStore(
LocalVectorStore store) → void - Set the local vector store for on-device search.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited