Page 83 - CyberSecurityEssentialsEnglish
P. 83

use more deterministic settings if the tool allows. Prompt engineering is not a test of the
         text alone; it is a test of how the prompt interacts with the model, its settings, and the data.


           ↻ Try it yourself: a single-change experiment
           Choose a weak prompt. Record the first output, identify the single largest defect, then
           change one element only. Evaluate the second version against the same list. Write one
           line: what did you learn about the task or about the model?






































                               FIGURE 2-6: DIAGNOSE THE CAUSE BEFORE YOU REWRITE THE PROMPT

         What to notice: Rewriting is one remedy among five. Naming the cause first prevents the
         same edit being applied to every kind of failure.

         Source: Prepared by the author.

           ● Remember: Section summary
           • Key idea: Improvement comes from diagnosis, so change the one factor that explains
           the defect.
           • Practical decision: Name the largest defect, change a single element, then compare the

           two versions against the same list.
           • Mistake to avoid: Rewriting the whole prompt after every output, which hides what
           actually caused the change.

         2.9 Prompting Reasoning Models and Structured Outputs
           ◆ Key idea: a reasoning model needs a clear end point, not a longer
           instruction.

           Models built for reasoning already work through steps internally, so repeating an


         82
   78   79   80   81   82   83   84   85   86   87   88