Skip to main content

agrag.common.data_models.vector_record.VectorHit

Bases: BaseModel

One search result: a matched id, its score, and its stored payload.

Returned by both VectorStore.search/hybrid_search and GraphStore.vector_search, so a caller cannot tell which store produced a given hit.

Attributes:

  • id (UUID) – The id of the matched record.
  • score (float) – The match score. Higher means a closer match, regardless of which distance metric the collection uses.
  • payload (dict[str, Any]) – The payload stored with the matched record.

id​

id: UUID

payload​

payload: dict[str, Any]

score​

score: float