RAGSearchResult class

A single retrieved chunk from vector search.

Represents a document chunk that was retrieved as relevant context. Mirrors iOS RAGSearchResult exactly.

Constructors

RAGSearchResult({required String chunkId, required String text, required double similarityScore, String? metadataJSON})
const
RAGSearchResult.fromBridge(RAGBridgeSearchResult bridge)
Create from a bridge search result.
factory

Properties

chunkId String
Unique identifier for this chunk.
final
hashCode int
The hash code for this object.
no setterinherited
metadataJSON String?
Optional JSON metadata associated with the chunk. Empty strings from the bridge are converted to null.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
similarityScore double
Cosine similarity score (0.0–1.0).
final
text String
Text content of the chunk.
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