Class SemanticSearchResult

java.lang.Object
sk.iway.iwcm.rag.search.SemanticSearchResult

public class SemanticSearchResult extends Object
Result from semantic search: a source ID with its best retrieval and local ranking scores.
  • Constructor Details

    • SemanticSearchResult

      public SemanticSearchResult()
    • SemanticSearchResult

      public SemanticSearchResult(VectorSearchResult chunk)
      Initializes source scores from one candidate chunk.
      Parameters:
      chunk - candidate supplying the source ID, retrieval score, and optional rerank score
    • SemanticSearchResult

      public SemanticSearchResult(Long docId, Double similarity)
  • Method Details

    • getRankingScore

      public double getRankingScore()
      Returns the score used to order results without changing the original similarity.
    • getDocId

      public Long getDocId()
    • getSimilarity

      public Double getSimilarity()
    • getRerankScore

      public Double getRerankScore()
    • setDocId

      public void setDocId(Long docId)
    • setSimilarity

      public void setSimilarity(Double similarity)
    • setRerankScore

      public void setRerankScore(Double rerankScore)