RAGResult class
The result of a RAG query.
Contains the generated answer, retrieved chunks, and timing metrics.
Mirrors iOS RAGResult exactly.
Constructors
-
RAGResult({required String answer, required List<
RAGSearchResult> retrievedChunks, String? contextUsed, required double retrievalTimeMs, required double generationTimeMs, required double totalTimeMs}) -
const
- RAGResult.fromBridge(RAGBridgeResult bridge)
-
Create from a bridge result.
factory
Properties
- answer → String
-
The generated answer text.
final
- contextUsed → String?
-
The full context text sent to the LLM.
Null if context was empty.
final
- generationTimeMs → double
-
Time taken for LLM generation in milliseconds.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- retrievalTimeMs → double
-
Time taken for the retrieval phase in milliseconds.
final
-
retrievedChunks
→ List<
RAGSearchResult> -
The document chunks retrieved and used as context.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalTimeMs → double
-
Total query time in milliseconds.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited