Prompt engineering: observable instructions and useful contrasts
Historical revision
The original 2026-04-19 article explained prompt structure through conditional entropy and attention. This repository does not contain measurements linking its suggested wording to those internal model quantities. The revision keeps practical methods and removes unsupported causal guarantees.
Start with the task and known facts
Specify the input, required outcome and what is not known. For a configuration diagnosis, identify the loader, config path and observed symptom before asking for a change.
Make the contract inspectable
Replace “report clearly” with required fields and allowed values. Include a missing-input or unknown branch. A format validator checks the contract, not the truth of the answer.
Use a same-task contrast
Keep task and facts constant. Change the instruction responsible for one concrete failure, explain the expected difference, and state the boundary. Examples here are teaching constructions, not measured model outputs.
Route context by need
Put always-needed constraints near the action. Attach an explicit reading condition to task-specific references. Preserve a source location instead of treating a memory or summary as current proof.
Teaching-example guide · Reference-reading guide · Editorial criteria