Class: Pikuri::VectorDb::Backend::Result
- Inherits:
-
Data
- Object
- Data
- Pikuri::VectorDb::Backend::Result
- Defined in:
- lib/pikuri/vector_db/backend/result.rb
Overview
A single query hit: the matched Chunk + its score, returned in
descending-score order from a backend's #query.
chunk— the stored Chunk.score— cosine similarityFloat[-1.0, 1.0](in practice[0.0, 1.0]for the normalized vectors most embedders produce; 1.0 = exact match, 0.0 = orthogonal). But this is cosine only as returned by the backend — Tools::Search substitutes the reranker's relevance score (viaData#with) when a reranker reorders, so a surfaced score is cosine only in vector-only mode (see Tools::Search's "Which score is shown").
Tools::Search cites hits as chunk.source + chunk.text + score; id
is never surfaced, metadata carries optional deep-link extras.
Instance Attribute Summary collapse
-
#chunk ⇒ Object
readonly
Returns the value of attribute chunk.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Attribute Details
#chunk ⇒ Object (readonly)
Returns the value of attribute chunk
20 21 22 |
# File 'lib/pikuri/vector_db/backend/result.rb', line 20 def chunk @chunk end |
#score ⇒ Object (readonly)
Returns the value of attribute score
20 21 22 |
# File 'lib/pikuri/vector_db/backend/result.rb', line 20 def score @score end |