Page 72 - CyberSecurityEssentialsEnglish
P. 72

few-shot prompting we give several examples that help the system infer the pattern, which
         is particularly useful in classification, field extraction, and setting a tone [7].
         Do not multiply examples without reason. An example consumes space in the context, and

         it  may  carry  incidental  detail  into  the  output.  Choose  varied  examples  that  cover  the
         important cases, and show what to do when information is missing. If you are classifying

         messages, do not display only the easy cases. Add a mixed or unclear message and state the
         correct category or the escalation policy.

         TABLE 2-6: ZERO-SHOT, ONE-SHOT, AND FEW-SHOT PROMPTING

             Approach         What it provides              When it helps                   The risk

                            Instructions with no         General and simple           The format may be
             Zero-shot
                                   example.                      tasks.             interpreted differently.

                                                         Clarifying a specific            It may copy
             One-shot         A single example.
                                                          structure or tone.          unintended detail.


                                Several varied        Classification, extraction,  Poor examples repeat
             Few-shot
                                  examples.               and consistency.          the error and the bias.


         Practical Patterns by Task Type
         TABLE 2-7: HOW PROMPTING DIFFERS BY TASK TYPE

                  Task               What matters in the prompt                   Verification question

                                  Purpose, audience, sources, order of           Is every figure and claim
            Summarization
                                   priority, what may not be inferred.            present in the source?

                               Prior knowledge, terminology, an example,        Was the concept simplified
              Explanation
                                  a question that tests understanding.           without being distorted?

                                Objective, relationship, fixed facts, tone,      Was a promise or a date
                 Email
                                           the action required.                 added that does not exist?

                               Fields, types, a policy for missing values, a      Is every value tied to a
               Extraction
                                            correct example.                       location in the text?

                                Objective, resources, timing, constraints,    Is the plan executable, or a list
                Planning
                                         measures, assumptions.                         of wishes?

                                 Audience, approved terminology, how             Did the text preserve the
              Translation      literal the wording should be, names, text        meaning and the named
                                                direction.                               entities?

                               Criteria, weights, missing data, no hiding of    Does the recommendation
              Comparison
                                                trade-offs.                     actually follow the criteria?





         71
   67   68   69   70   71   72   73   74   75   76   77