Builds a rerank prompt with title + flattened properties + excerpt for each candidate, calls Claude, parses JSON, sorts by score descending, takes top N. On any failure (LLM error, missing JSON, parse error, non-list shape), falls back to candidates in input order with null relevance/snippet. 4 tests: ordering, limit, parse-error fallback, exception fallback. 26 passing total. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12 KiB
12 KiB