ReqLLM.RerankResponse (ReqLLM v1.29.0)

Copy Markdown View Source

Canonical reranking response for ReqLLM.

Results are ordered from most relevant to least relevant and include the original document text for convenience.

Summary

Types

result_item()

@type result_item() :: %{
  index: non_neg_integer(),
  relevance_score: float(),
  document: String.t()
}

t()

@type t() :: %ReqLLM.RerankResponse{
  id: String.t() | nil,
  meta: map() | nil,
  model: String.t() | nil,
  query: String.t(),
  results: [result_item()]
}