Interface ScoringModel
- All Known Implementing Classes:
- CohereScoringModel, JinaScoringModel, OnnxScoringModel, VertexAiScoringModel, VoyageAiScoringModel, WatsonxScoringModel
public interface ScoringModel
Represents a model capable of scoring a text against a query.
Useful for identifying the most relevant texts when scoring multiple texts against the same query.
The scoring model can be employed for re-ranking purposes.
Useful for identifying the most relevant texts when scoring multiple texts against the same query.
The scoring model can be employed for re-ranking purposes.
- 
Method SummaryModifier and TypeMethodDescriptionscore(TextSegment segment, String query) Scores a givenTextSegmentagainst a given query.Scores a given text against a given query.scoreAll(List<TextSegment> segments, String query) Scores all providedTextSegments against a given query.
- 
Method Details- 
score
- 
scoreScores a givenTextSegmentagainst a given query.- Parameters:
- segment- The- TextSegmentto be scored.
- query- The query against which to score the segment.
- Returns:
- the score.
 
- 
scoreAllScores all providedTextSegments against a given query.- Parameters:
- segments- The list of- TextSegments to score.
- query- The query against which to score the segments.
- Returns:
- the list of scores. The order of scores corresponds to the order of TextSegments.
 
 
-