3 ms·
You are poisoning your context making it focus on an unusual requirement contrary to most of its training data. It’s a formatter task, not an LLM task In fact
by wahnfrieden 1y ago
You are poisoning your context making it focus on an unusual requirement contrary to most of its training data. It’s a formatter task, not an LLM task
In fact you should convert your code to spaces at least before LLM sees it. It’ll improve your results by looking more like its training data.
- ameliaquining 1y agoPresumably the Go source files in the training corpus used tabs?
- withinboredom 1y agoGo uses tabs. Full stop. There is no Go code with spaces. Not if they're using the built-in formatter, anyway. In any case, this is about the diff codex is outputting, not the code I commit. With Claude, I generally don't need to run `go fmt`, but with codex, it is absolutely necessary.
- MaxLeiter 1y agoI wrote a bit about this yesterday: https://maxleiter.com/blog/rewrite-your-prompts https://maxleiter.com/blog/rewrite-your-prompts > Reason #3a: Work with the model biases, not against Another note on model biases is that you should lean into them. The tricky part with this is the only way to figure out a model's defaults is to have actual usage and careful monitoring (or have evals that let you spot it). Instead of forcing the model to behave in ways it ignores, adapt your prompts and post-processing to embrace its defaults. You'll save tokens and get better results. If the model keeps hallucinating some JSON fields, maybe you should support (or even encourage) those fields instead of trying to prompt the model against them.
- joquarky 1y agoGood advice! Reminds me of wu-wei. Cut wood with the grain, not against it. https://en.wikipedia.org/wiki/Wu_wei https://en.wikipedia.org/wiki/Wu_wei
- dboreham 1y agoObviously I'm not a $100M AI genius but haven't they tried transforming both training data and context into some normal form (whitespace neutral)?