Filter weak retrieval results and decide whether evidence is strong enough to answer.
The full prompt is available without an account.
Implement filter_chunks(chunks, min_score) that keeps chunks with score >= min_score.
- chunks is a list of dicts with "text" and "score" keys.
- Preserve the original ordering of chunks that pass the filter.
- If no chunks pass the filter, return an empty list.
- The min_score threshold is inclusive.
Read-only Python 3.12 preview. Sign in to edit and execute it.
def filter_chunks(chunks, min_score):
# TODO: keep chunks with score >= min_score
return []