Repository navigation
feat: deepsearchqa and widesearch - #3186
Conversation
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test 24e3700 |
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test 87361d6 |
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test b7fc406 |
|
/claude review |
| text = text.strip() | ||
| if text.startswith("```json"): | ||
| text = text[7:].removesuffix("```").strip() | ||
| result = json.loads(text)["Answer Correctness"] |
There was a problem hiding this comment.
RISK — parse_judge crashes verify() on any non-conforming judge output.
WHAT BREAKS: the only tolerated shapes are a bare JSON object or one prefixed with exactly ```json. Any of the following raises and propagates out of verify() as a 500:
- Judge prepends prose ("Here is my evaluation:\n
json…") → `startswith("json")is False →json.loads(text)raisesJSONDecodeError`. - Judge obeys the prompt's "return NULL if … empty" instruction →
json.loads("NULL")raises (and lowercasenull→None["Answer Correctness"]→TypeError). - Fenced block wrapped as generic
```instead of```json.
BLAST RADIUS: LLM judges at temp 0 still emit preamble on a nonzero fraction of calls. Each such call errors the task instead of scoring it — dropped/retried tasks in eval, hard errors in a training loop. The sibling widesearch.parse_markdown_json (app.py:68) degrades gracefully to {} for exactly this case; the two verifiers are inconsistent.
FIX: extract the JSON with a tolerant regex (as widesearch does) and, on parse failure or missing Answer Correctness, return a scored-zero response rather than raising — or explicitly document fail-loud as intended.
| target_number = float(target.rstrip("%")) / (100 if "%" in target else 1) | ||
| except ValueError: | ||
| return float(response == target) | ||
| return float(abs(response_number - target_number) <= abs(target_number) * float(criterion)) |
There was a problem hiding this comment.
NOTE — float(criterion) is outside the try and uncaught when criterion is absent.
deterministic_metric is called with pipeline.get("criterion") (line 238), which is None when a number_near column omits criterion. float(None) raises TypeError, which is outside the try/except ValueError above it, so it escapes verify() as a 500. The date_near branch guards TypeError; this branch does not. Data-dependent (upstream gold configs generally set a tolerance for number_near), but a malformed/edited eval spec crashes the whole task rather than scoring it. FIX: default the tolerance (e.g. float(criterion or 0)) or include TypeError in the guard.
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test 0b20abf |
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test aa584a4 |
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test 68faf84 |
What does this PR do?
deepsearch qa and widesearch with any harness and exa search api
Checklist
pre-commit run --all-files) (so CI lint/format/copyright pass).git commit -s) (so the DCO check passes).