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, QueryValue]) – The retrieved Entity, ResolvedEntity, Relation, Chunk, or Community, or scalar query value. - 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. - parent (
Chunk | None) – The parent chunk of a child chunk result, so a caller can show the larger passage.Nonefor every other 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, QueryValue]
method
method: str
parent
parent: Chunk | None = None
score
score: float