Version: 0.0.5 (stable)
agrag.retrieval.methods.traversal.extract_entity_ids
extract_entity_ids(results:list[SearchResult]) -> list[UUID]
Return raw entity ids from results, preserving order.
Used for BFS seeds and node-distance reranking. Keeps the first-seen id of each entity so the fusion ranking is respected. A ResolvedEntity contributes its raw member ids, since graph traversal and distance run over raw entity nodes. A resolved entity's own id names no node with the identity label that an entity traversal can start from, so seeding with it matches nothing. Chunks and other non-entity result items are skipped.
Parameters:
- results (
list[SearchResult]) – The result list to read entity ids from.
Returns:
list[UUID]– Each entity id once, in first-seen order.