Skip to main content
Version: latest

agrag.common.data_models.search_result.SearchResult

Bases: BaseModel

One retrieved item, tagged with where it came from.

Attributes:

  • item (Union[Entity, ResolvedEntity, Relation, Chunk, Community]) – The retrieved Entity, ResolvedEntity, Relation, Chunk, or Community.
  • score (float) – The method's own relevance score. Not comparable across methods until Fusion normalizes it.
  • method (str) – The name of the retrieval method that produced this result.

identity_key​

identity_key: tuple[str, UUID]

Return the (type, id) key Fusion deduplicates on.

Raises:

  • ValueError – The item has no id, so it cannot be deduplicated.

item​

item: Union[Entity, ResolvedEntity, Relation, Chunk, Community]

method​

method: str

score​

score: float