Package ai.vectros.types
Class RagSearchResult
java.lang.Object
ai.vectros.types.RagSearchResult
-
Method Details
-
getDocumentId
- Returns:
- The stable identifier of the matched result (a document or a record).
-
getExternalId
- Returns:
- The externalId you supplied for the source item at ingestion, if any. Null when the item was ingested without one, or when it was indexed before this field existed and hasn't been updated or reindexed since.
-
getScore
public double getScore()- Returns:
- Higher is more relevant, but the SCALE depends on the search
mode. In HYBRID mode this is a Reciprocal Rank Fusion (RRF) value: 1/(60+rank) per leg the result appears in, summed across legs — small and tightly clustered (a hit ranked top on one leg scores ~0.016; ranked top on both, ~0.033), not a 0-1 confidence. In TEXT- or SEMANTIC-only mode, this is that engine's own native score on a different scale — never compare scores across modes.
-
getTextScore
- Returns:
- The keyword relevance component of the score. Non-zero in HYBRID mode when the keyword engine contributes to the match, and in TEXT mode. In TEXT mode this is a rank-derived value reflecting the result's relative position, not a normalized BM25 magnitude — meaningful for ordering within this response, not comparable across requests or against HYBRID/SEMANTIC scores. 0 (not null) when this match came from semantic search only.
-
getSemanticScore
- Returns:
- The cosine-similarity score from semantic (vector) search, from 0 to 1. 0 (not null) when this match came from keyword search only.
-
getChunkText
- Returns:
- The specific chunk of text that matched the query — the narrowest snippet, useful for citation.
-
getContextText
- Returns:
- The wider surrounding passage supplied to the model as context — broader than
chunkTextto better ground the answer.
-
getSnippet
- Returns:
- A display-ready snippet with the matched query terms emphasized — suitable for search-result UIs.
-
getMetadata
- Returns:
- Metadata you supplied on the source document, such as its title, folder id, or custom tags.
-
getCreatedAt
- Returns:
- The result's creation timestamp, as an ISO-8601 UTC timestamp.
-
equals
-
getAdditionalProperties
-
hashCode
public int hashCode() -
toString
-
builder
-