‹ All articles
AI-DLC

Rewrite a vague prompt with role, context, task and format

Turn a one-line AI request into a clear prompt using the four parts Google, Anthropic and OpenAI all describe, then test it on real work in under an hour.

Most weak AI answers start with a weak request. "Write a test plan" or "summarise this" gives the model almost nothing to work with, so it fills the gaps with guesses.

Today you will take one vague prompt from your own work and rewrite it using four parts that the big model vendors describe in their guides: role, context, task and format. It takes under an hour, and you will usually see the difference in the very first answer.

What the vendor guides say

Google's Workspace guide "Prompting best practices" names four components of a good prompt: persona, task, context and format. Persona is the expertise to draw on, task is what you want help with, context is the background, and format is how the result should look.

Its own example asks the model to act as a seasoned advertising writer and create a concise tagline for a new washing machine. It then adds format limits: active voice and no more than six words.

Anthropic's Claude documentation suggests treating the model like a brilliant but new employee who lacks context on your norms and workflows. Its test is simple: show your prompt to a colleague with little context on the task, and if they would be confused, the model will be too.

On role, Anthropic recommends setting it in the system prompt and notes that "even a single sentence makes a difference." It also advises explaining why a rule exists, because the model can generalise from the reason. Its example: instead of only banning ellipses, say the reply will be read aloud by a text-to-speech engine that cannot pronounce them.

OpenAI's help-centre guide makes the same point with a before-and-after. "Write a poem about OpenAI" is less effective than a request that names the length, the tone and the exact subject. It also prefers precise limits, such as a 3 to 5 sentence paragraph, over vague ones like "fairly short".

Google's Gemini API guide, last updated 13 October 2026, advises placing the persona in the system instruction or at the very start of the prompt for Gemini 3, stating the response format, and including a few examples. Anthropic suggests three to five examples for best results.

Two tips run through all of these guides. Say what you want instead of only what you don't want. And give the model the background you would give a new teammate.

The four parts in plain words

Role. One sentence on whose expertise to use, such as "You are a senior QA lead for a banking app."

Context. The background the model cannot know: who the audience is, what is already decided, what the constraints are, and why they matter.

Task. The single job, stated as an action with a clear finish line.

Format. The shape of the answer: length, structure and tone, written as what to do rather than what to avoid.

Three examples from everyday work

These are illustrative scenarios, not case studies.

Example: A fresher in testing types "Write test cases for login." The rewrite adds a role (QA engineer for a mobile banking app), context (OTP login, three failed attempts lock the account, Android and iOS), the task (write 10 test cases covering positive, negative and lockout paths) and a format (a table with ID, steps, expected result and priority).

Example: A program manager asks "Summarise this status report." The rewrite says the readers are a steering committee with five minutes, the project is two weeks late on one dependency, and the output should be three short paragraphs: status, top risk with owner, and the one decision needed.

Example: A developer asks "Explain this error." The rewrite pastes the stack trace between clear markers, names the framework and version, says what was already tried, and asks for the likely cause first, then one fix to test.

How AI-DLC helps

AWS describes the AI-Driven Development Life Cycle (AI-DLC) as a method where AI creates a plan, asks clarifying questions, and implements only after humans validate it. Critical decisions stay with people, because they hold the business context.

In the Inception phase, AI turns business intent into requirements, stories and units of work, and the whole team checks its questions and proposals together in Mob Elaboration. Construction follows with Mob Construction, and work moves in short cycles called bolts, measured in hours or days rather than weeks.

That clarifying-question step is the four-part prompt in reverse. When the AI asks who the users are, what the constraints are and what done looks like, it is collecting the role, context, task and format that a vague request left out. Practising today's rewrite makes you faster at answering those questions and better at spotting when an AI plan rests on a guess.

AWS's open-source AI-DLC workflows show this in practice. A session starts with a one-line intent such as "/aidlc Build a REST API for inventory management", then the agent asks clarifying questions, records the answers in a question file, and asks you to approve or request changes before it moves on.

Worked example: from one line to a usable prompt

Illustrative scenario: a mid-career tester needs a test strategy for a new chatbot feature.

Step 1. Write the vague version you would normally type: "Give me a test strategy for our chatbot."

Step 2. Add the role: "You are a QA lead who has tested customer-support chatbots."

Step 3. Add the context: the bot answers billing questions for a telecom company, uses the company's help articles, must never ask for passwords, and launches in four weeks with two testers. Add the reason for the password rule so the model understands the risk.

Step 4. State the task: draft a one-page test strategy covering accuracy, refusals, tone and handover to a human agent.

Step 5. Set the format: five short sections with a heading each, under 400 words, and one open question for the product owner at the end. Run both versions and compare.

Try it (under an hour)

Anthropic's open-source interactive tutorial has nine chapters plus an appendix, including Being Clear and Direct, Assigning Roles, and Formatting Output. A Google Sheets version is also offered.

https://github.com/anthropics/prompt-eng-interactive-tutorial

Step 1. Pick one real prompt you used this week that gave a weak answer. Save the original prompt and the answer.

Step 2. Read chapters 2 and 3 of the tutorial, on being clear and on assigning roles.

Step 3. Rewrite your prompt with one line each for role, context, task and format. Add the reason behind any rule.

Step 4. Run the old and new prompts in the same chat assistant. Note what changed: accuracy, length, structure, or fewer follow-up questions.

Step 5. Apply the colleague test: share the new prompt with a teammate and ask whether they could do the task from it alone.

Your next step

🌱 Fresher: Rewrite one assignment or practice question using the four parts and keep the before-and-after pair. It makes a small, honest portfolio example.

🚀 Mid-career: Turn your best rewrite into a team template for a task you repeat every week, such as test cases or status summaries.

🧭 Senior: Ask your team to bring one vague prompt to a review and rewrite it together, the way Mob Elaboration reviews AI questions as a group.

Sources

Google Workspace, "Prompting best practices", undated guide, accessed 17 Nov 2026

https://services.google.com/fh/files/misc/prompting_best_practices.pdf

Anthropic, "Prompting best practices", Claude Platform Docs, undated, accessed 17 Nov 2026

https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices

OpenAI Help Center, "Best practices for prompt engineering with the OpenAI API", accessed 17 Nov 2026

https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-the-openai-api

Google AI for Developers, "Prompt design strategies", last updated 13 Oct 2026

https://ai.google.dev/gemini-api/docs/prompting-strategies

AWS DevOps Blog, "AI-Driven Development Life Cycle: Reimagining Software Engineering", Raja SP, 31 Jul 2025

https://aws.amazon.com/blogs/devops/ai-driven-development-life-cycle/

AWS Labs, "AI-DLC Workflows: Getting started", accessed 17 Nov 2026

https://awslabs.github.io/aidlc-workflows/guide/01-getting-started/

Continue exploringBack to the reading room ›