Stop telling the model to end cells on the raw tool result - #27
Merged
Merged
Conversation
CNSeniorious000
force-pushed
the
dont-echo-raw-tool-results
branch
from
August 31, 2026 02:28
3deebc0 to
1549cf8
Compare
CNSeniorious000
marked this pull request as ready for review
August 31, 2026 03:11
There was a problem hiding this comment.
你好——我已经审阅了你的更改,整体看起来很棒!
Sourcery 评估
已批准。
帮助我变得更有用!请点击每条评论上的 👍 或 👎,我会利用这些反馈来改进审查结果。
Original comment in English
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Approved.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The block gave the model two rules that pull in opposite directions. One said a cell that is a single tool call needs no
printat all — end it withawait read(file_path=p)and the result comes back. The next said tool results consumed inside the cell never enter the conversation, so filter and aggregate in code and surface just the conclusion. The first is the cheaper habit and it is the one that gets followed, so the block was teaching the behaviour the rule below it asks the model to avoid.One sentence, deleted. The rest of that bullet is untouched — the LAST-expression-is-the-return-channel rule is right, and
print(...)for RESHAPING still reads exactly as before.How this is measured
Per cell,
consumedis the tool-result bytes it pulled in (tool/code-dispatch) andobservedis what reached the conversation (tool/result), paired oncallId. Cells are BANDED byconsumed: in the< 2Kband the median cell surfaces more than it consumed — those are cells that WRITE, whose output is text the cell generated, not a payload passed through. Only cells consuming a real payload say anything about extraction, so every number below is the 2K–20K band.What it does on its own: not much
This PR and #30 shipped together as one arm against the
codeact6baseline,gpt-5.6-terra, 4/4 VLB tasks. Dump rate = share of cells surfacing ≥ 90% of what they consumed.private_lending_33dhsa_medical_bill_liquidity_guard_30dfood_safety_dispute_33dbroadcast_exam_posture_breathing_32dWarning
z = 0.66, p = 0.51. The pair is a wash: large gains where the baseline was worst, losses of the same size where it was already decent. An earlier revision of this description reported the first row alone as a p = 0.0001 win — that was one task, and it was not representative.
The losses have a named cause: told to stop echoing the raw result, the model substitutes
print(x['result'][:12000]), which the neighbouring bullet explicitly licenses as "show a slice of something large". #34 has the slice-bound histogram. #35 and #36 are what actually move the number — the same arm plus those two reaches 20.3% on the two tasks it has finished, against 77.0% for the baseline.So the case for this PR is that the sentence is wrong — it tells the model to do the thing the next rule forbids — not that deleting it is sufficient. It is not.