Prompting Steers a Language Model Through Instructions, Examples and Requested Reasoning

In progress

A generative AI tool creates new text, images or code from a natural-language request, the prompt. Since users can't retrain the underlying model, the prompt is their main control over the output: what it says, the examples it shows and the reasoning it asks for decide most of the quality of the answer.

What Sits Behind a Conversational Tool

  • Generative AI produces new content rather than classifying existing content.
  • A large language model (LLM) is trained on large amounts of text to learn how words and ideas relate, so it can continue a prompt with a coherent answer.
  • A conversational AI tool wraps an LLM in a chat: text in, text out, with the conversation so far as context.

Three Prompting Techniques

Technique What the prompt contains Use it when
One-shot one example of the expected input and output the format matters more than the content
Few-shot two or more examples the task has a pattern the model must pick up
Chain-of-thought a request to explain the reasoning step by step before answering the task needs several steps (calculations, comparisons)

References

Review cards

Flashcard Why is the prompt the main lever a user has over a generative AI tool's answer?

Users can't retrain the model behind the tool, so what they write (instructions, examples, requested reasoning) is what they can change.

Flashcard An answer misses the point. What works better than asking the same question again?

Rewrite the prompt: add context, name the audience and the format, or show an example. A vague request stays vague when repeated.

Quiz Which prompting technique fits a task that needs several steps, such as a calculation or a comparison?
  • One-shot
  • Few-shot
  • Chain-of-thought
  • A shorter prompt

Chain-of-thought asks the model to lay out its reasoning step by step before answering. One-shot and few-shot prompts show examples, which helps with format and patterns.