promptdojo_

AI wrote retrieve(scored, k=3) that takes the top-3 candidates regardless of how low their scores go. The test query has zero relevant chunks in the corpus, so the top-3 returns three garbage chunks the model would treat as real.

Add a threshold filter (>= 0.5) BEFORE the slice. The function should return an empty list when nothing clears the bar.

Expected output:

[]
The break is on line 10 — but read the whole snippet first.

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.