Instiq
Chapter 3 · Techniques to improve generative AI model output·v1.0.0·Updated 6/15/2026·~14 min

What's changed: Created Generative AI Leader Chapter 3 (Domain 3 "Techniques to improve output": prompt engineering = good prompts/zero-shot-few-shot/persona/step-by-step/temperature; grounding, RAG, fine-tuning = RAG/embeddings-vector search/fine-tuning/function calling-tools/evaluation).

3.1Prompt engineering

Key points

Understand prompt techniques that improve output quality: the basics of giving clear instructions, context, and an expected output format; zero-shot vs few-shot (no examples vs examples); assigning a role (persona); prompting step-by-step reasoning; and tuning output randomness with temperature.

Generative AI output quality depends heavily on how good the prompt (instruction) is. Prompt engineering is the craft of shaping prompts to get the desired result. Even without changing the model, improving the prompt alone can greatly boost accuracy and usefulness.

3.1.1Basics of a good prompt

A good prompt includes (1) a clear, specific instruction, (2) needed context, and (3) the expected output format (bullets, table, word count). Assigning the model a role (persona) (e.g., "You are an experienced legal counsel") helps elicit on-target answers. For complex problems, prompting step-by-step reasoning ("think it through step by step") can improve accuracy.

3.1.2Zero-shot and few-shot

TechniqueWhat it isWhen to use
Zero-shotGive only the instruction, no examplesSimple, general tasks
Few-shotProvide a few input/output examplesTasks needing a specific format/pattern

Giving only the instruction with no examples is zero-shot; providing a few input/output examples to teach the expected format or pattern is few-shot. Few-shot helps when you want consistent format or style. Output randomness (diversity) is tuned with temperature: lower gives steady, consistent output; higher gives diverse, creative output (lower for fact-focused tasks, higher for brainstorming).

Exam point

Common: technique → term. E.g., "instruction only, no examples" = zero-shot; "provide a few examples" = few-shot; "assign a role" = persona; "prompt step-by-step" = step-by-step reasoning; "tune output randomness" = temperature (low=steady/high=creative). Improving quality via prompts = prompt engineering.

Warning

Watch the mix-ups: (1) zero-shot (no examples) vs few-shot (with examples). (2) Temperature: higher = more diverse/creative, lower = more consistent/steady (lower for fact-focused). (3) Prompt improvement is the simplest way to boost quality without changing the model.

Diagram of prompt engineering: good prompt basics (clear instruction + context + output format), zero-shot vs few-shot, and temperature to tune output randomness.
Prompts that improve output quality

3.1.3Section summary

  • Good prompt = clear instruction + context + output format; persona and step-by-step reasoning also help
  • Zero-shot (no examples) / few-shot (with examples); use few-shot for consistent format
  • Temperature = output randomness; low = steady, high = creative

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. What is shaping prompts to get the desired result and improve output quality without changing the model called?

Q2. Which prompt technique provides a few input/output examples to enforce a format or pattern?

Q3. Which prompt technique gives only the instruction with no examples?

Q4. Which parameter tunes output randomness—lower for consistent/steady, higher for diverse/creative?

Q5. Which combination best lists elements a good prompt should include?

Q6. For a business task that prioritizes factual accuracy, which temperature setting is appropriate?

Check your understandingPractice questions for Chapter 3: Techniques to improve generative AI model output