ep: Repair teacher outputs if num of discarded chars is too high (#54441)

Release Notes:

- N/A
This commit is contained in:
Oleksiy Syvokon authored and GitHub committed 2026-04-21 22:46:16 +03:00
1 parent d06406f7d8
commit ef9b42fac9
1 file changed
+12
+12
View File
@@ -134,6 +134,18 @@ fn build_score_feedback(example: &Example) -> Option<String> {
);
}
if score.discarded_chars.unwrap_or(0) > 80 && score.exact_lines_fp > 5 {
issues.push(
"Automated analysis detected that this prediction might be too large or speculative. \
Please review it and think if we should keep it or generate a more focused prediction. \
Examples of more focused predictions: \
- Predicting a function outline but not its body. \
- Predicting only the first logical step and not speculating about further steps.
In general, the smaller the prediction you make, the higher the chance it will be correct."
.to_string(),
);
}
if issues.is_empty() {
return None;
}