Nishaglobal Education logo

Prompting fundamentals: getting useful answers

The six parts of a strong prompt, before-and-after examples for real work tasks, how to iterate, and reusable templates for developers, testers, analysts and managers.

Lesson 5 of 3816 min readQuiz: 5 questions

🎯 By the end of this lesson you will be able to:

  • Write prompts using the six building blocks: role, task, context, format, constraints and examples
  • Improve a weak answer by iterating instead of starting over
  • Build a small personal library of reusable prompts for your role
In this lesson
  1. Why the prompt matters so much
  2. The six building blocks of a strong prompt
  3. Before and after
  4. Five techniques that work almost everywhere
  5. Iterate instead of starting over
  6. Starter templates for your role
  7. Key takeaways
  8. Quiz

Why the prompt matters so much

The model only knows what is in its training and in your prompt. A vague prompt forces it to guess what you want, so you get a generic answer. A clear prompt that gives the task, the context and the expected format usually gets a useful answer first time. Prompting is not a trick; it is clear communication, the same skill as briefing a new colleague.

The six building blocks of a strong prompt

RoleWho should it act as?TaskWhat exactly to doContextWhat it can't knowFormatShape of the answerConstraintsLimits and rulesExamplesShow a good outputBlue blocks (task, context, format) make the biggest difference
Not every prompt needs all six parts, but the task, the context and the format matter most.
BlockWhat to includeExample
RoleWho the model should act asYou are a senior QA engineer
TaskExactly what to do, with an action verbWrite test cases for the login page
ContextBackground it cannot knowUsers log in with email and a one-time code; we support 3 languages
FormatShape of the answerA table with columns: ID, scenario, steps, expected result
ConstraintsLimits and rulesMaximum 12 cases; include 3 negative cases; no UI wording assumptions
ExamplesOne sample of a good outputTC-01 | Valid code | ... | User sees dashboard

Before and after

A business analyst summarising interviews

Weak: Summarise these interview notes.

Strong: You are a business analyst. Summarise the five customer interview notes below for the product team. Group findings into: pain points, requested features and quotes worth sharing. For each pain point, say how many customers mentioned it. Use bullet points, under 250 words. Do not add anything that is not in the notes.

[notes pasted here]

The strong prompt gives a role, audience, structure, counting rule, length limit and a guard against invented content, so the summary is usable straight away.

A developer asking for code review

Weak: Is this code OK?

Strong: Review this TypeScript function for bugs, edge cases and readability. It runs on our checkout API under high load. List problems in order of severity, each with the line, why it matters and a suggested fix. If there are no serious problems, say so.

[code pasted here]

The strong prompt sets the criteria, the setting (high load), the format and permission to say nothing is wrong.

Five techniques that work almost everywhere

  • Give examples (often called few-shot prompting): one or two samples of the output you want are worth paragraphs of description.
  • Ask for step-by-step thinking on hard problems: for analysis or tricky logic, ask the model to work through the steps before giving its answer.
  • Separate instructions from material: put pasted documents between clear markers such as <notes> and </notes>, so the model knows what is data.
  • Ask it to ask you: "Before you start, ask me up to three questions about anything unclear."
  • Request a format you can use directly: a table, a checklist, JSON, or a Jira-ready user story.

Iterate instead of starting over

The first answer is a draft. Improve it with short, specific follow-ups rather than rewriting your whole prompt: "Make it shorter", "Use simpler words for non-technical readers", "Add two edge cases about expired codes", or "Show this as a table". When you get a result you like, save the final prompt so you can reuse it.

Starter templates for your role

Developer

"Explain what this code does, step by step, for someone new to the codebase. Then list three risks if we change it." Also: "Write unit tests for this function covering normal, edge and error cases, using [framework]."

Tester / QA

"Act as a QA engineer. From this user story and its acceptance criteria, write test cases in a table: ID, scenario, preconditions, steps, expected result. Include negative and boundary cases."

Business Analyst / PO

"Turn these meeting notes into user stories in the format As a… I want… so that…, each with three acceptance criteria in Given/When/Then form. Flag anything ambiguous as an open question."

Tech Lead / Architect

"Compare these two technical approaches for [problem] on: complexity, cost, risk, scalability and time to deliver. End with a recommendation and the main trade-off."

Project / Delivery Manager

"From these updates, write a one-page status report for senior stakeholders: overall status (RAG), key progress, top three risks with owners, and decisions needed. Plain English, no jargon."

Scrum Master / Agile

"Suggest five retrospective formats for a team that has just finished a stressful release. For each: purpose, steps and time needed."

Try it: upgrade one real prompt

  1. Take a task you did this week and write the prompt you would normally type.
  2. Rewrite it using at least four of the six building blocks.
  3. Run both and compare. Then make two short follow-up requests to improve the better one, and save the final prompt in your library.

Key takeaways

  • Prompting is clear briefing: tell the model what a new colleague would need to know.
  • Role, task, context, format, constraints and examples are the six building blocks; task, context and format matter most.
  • Examples, clear separation of material, and asking for a usable format improve almost any prompt.
  • Treat the first answer as a draft, iterate with short follow-ups, and save prompts that work.

Key terms

Prompt
The instructions and material you give a model.
Few-shot prompting
Including a few examples of the desired output in the prompt.
System prompt
Standing instructions set by an application that apply to every message in a conversation.

Check your understanding

Answer all 5 questions. Score 3 or more to complete the lesson.

  1. 1. Which three prompt blocks usually matter most?

  2. 2. What is few-shot prompting?

  3. 3. The first answer is close but too long and too technical. What is the best next step?

  4. 4. Why put pasted documents between markers like <notes> and </notes>?

  5. 5. Which prompt is strongest for a status report?

Answer all 5 questions to check.

Practise more