Instiq
Chapter 4 · Prompt Engineering and Context Crafting·v1.0.0·Updated 6/14/2026·~13 min

What's changed: New GH-300 Chapter 4 (effective prompts = structure [goal/context/expected output], how Copilot determines context, zero-shot/few-shot, select by relevance; principles & flow = clarity/specificity/iteration/decomposition, input+context→response→refine loop, chat-history use and caveats [irrelevant context/window consumption/new conversation])

4.2Prompt Principles, Process Flow, and Chat History

Key points

Understand prompt-engineering principles (clarity, specificity, iteration, decomposition), the prompt process flow, and how chat history is used in Copilot Chat—its benefits and caveats.

Good prompts share common principles: (1) clarity (avoid vague words; state what you want), (2) specificity (specify language, framework, constraints, output format), (3) iteration (don’t aim for perfect in one shot; adjust based on output), and (4) decomposition (break a big ask into small steps). These underpin Section 1’s practices.

4.2.1The prompt process flow

A Chat exchange follows an iterative flow: assemble input (your prompt) + context (selection/files/history), the model responds, and you refine with the next prompt based on what you see. Even if the first response is insufficient, you can narrow it down conversationally ("change this," "add this constraint") to improve quality. This is Chapter 3’s generation flow seen from the user’s side.

Continue reading — free sign-up

You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.