Version: 0.0.5 (stable)
agrag.ingestion.resolve.zone_classifier.select_llm_pairs
select_llm_pairs(candidates:list[tuple[int, int, float]], *, max_pairs:int = MAX_LLM_PAIRS) -> list[tuple[int, int]]
Rank ambiguous candidates for LLM review and keep the first max_pairs.
The order is similarity, highest first. Pairs with equal similarity keep the
lower (left_index, right_index) first, so the same input always yields
the same pairs. The pairs this drops are the least similar, and the caller
must report them as undecided.
Parameters:
- candidates (
list[tuple[int, int, float]]) –(left_index, right_index, similarity)triples. - max_pairs (
int) – Maximum pairs to return.
Returns:
list[tuple[int, int]]– Index pairs in the order above, at mostmax_pairsof them.