Skip to main content
Back to module
Digital Literacy for Tech & STEM Work · Working with AI and Online Tools

Asking AI good questions

Reading31mLesson 3 of 3 in this module

Write specific prompts with context, a clear task and a format, then verify the output before you use it.

Why it matters

The quality of an AI assistant's answer depends heavily on the question. A vague prompt gets a generic, often unhelpful reply; a specific one gets something you can actually use. Writing a good prompt is the same skill as writing a good question for a colleague, a forum or a support ticket: say what you are trying to do, what you have, and what you need back. And because AI tools can be wrong, every good prompt is followed by a check.

The core idea: context, task, format, constraints

A useful prompt usually includes four parts:

  1. Context: who you are and the situation. "I'm a beginner learning Python for lab data." "This is for a maintenance report read by supervisors."
  2. Task: exactly what you want. "Explain", "Draft", "Find the bug", "Compare", "Summarise in five bullet points".
  3. Format: how you want it back. A table, a checklist, numbered steps, code with comments, under 150 words.
  4. Constraints: limits and requirements. "Use only the standard library." "Plain English, no jargon." "Do not change the function names." "Say if you are unsure."

Giving an example of the output you want is one of the most effective additions.

Worked example 1: from vague to specific

Vague:

fix my code

Specific:

I'm learning Python. This function should return the average of a list of
numbers, but it crashes on an empty list with ZeroDivisionError.

def average(values):
    return sum(values) / len(values)

Please:
1. Explain in two sentences why it crashes.
2. Show a fixed version that returns None for an empty list.
3. Give two test cases I can run to check it.
Keep the same function name.

The second prompt gives the assistant the code, the error, the goal and the format. You will likely get a short explanation, a fix such as:

def average(values):
    if not values:
        return None
    return sum(values) / len(values)

and tests you can run yourself, which is the verification step.

Worked example 2: a writing task

Context: I'm an electrical apprentice writing a short update for my supervisor.
Task: Turn these notes into a clear, polite message.
Format: 3 short paragraphs, under 120 words.
Constraints: Keep all times and room numbers exactly as written; do not add
technical claims that are not in my notes.

Notes: panel B3 labels done, room 214 outlet not working, reported to J at 10:40,
need ladder for 2nd floor tomorrow

The constraint "do not add technical claims" matters: AI tools tend to fill gaps with plausible details. Then you read the draft and check every fact against your notes before you send it.

Iterate, don't start over

Treat the first answer as a draft. Follow up:

  • "Shorter, and use bullet points."
  • "Explain step 3 as if I've never used a terminal."
  • "What assumptions did you make?"
  • "What could go wrong with this approach?"
  • "Show me where in the official documentation this is described."

Asking the assistant to list its assumptions or to say when it is unsure often surfaces weak spots.

Verify the output

Before you use any AI output:

  • Code: read it, look up unfamiliar functions in the official docs, and run it with tests on safe data.
  • Facts and numbers: check them against a primary source. Check that any links or references exist.
  • Writing: make sure every claim is true and the tone is right; it goes out under your name.
  • Safety, legal, medical, licensing: use the official source; AI can only point you towards it.

Using AI responsibly

  • Never paste secrets (passwords, API keys, access tokens) or personal, customer, patient or confidential data into a tool your organisation has not approved for that data.
  • Follow course and workplace rules on AI use, and be honest about how you used it.
  • Keep learning: ask for hints or explanations rather than full solutions when you are practising.

Common mistakes

  • One-line prompts with no context, then blaming the tool.
  • Asking several unrelated questions in one prompt.
  • Leading questions ("This is correct, right?") that invite agreement.
  • Accepting the first answer without follow-up or checks.
  • Pasting confidential data to "give context".

Quick recap

  • Good prompts give context, a precise task, a format and constraints, ideally with an example.
  • Iterate with follow-ups instead of starting over.
  • Verify everything: run code, check facts against primary sources, reread writing.
  • Protect data and follow the AI rules where you study and work.

Try it

Open the Do tab to write, improve and verify a prompt of your own.

Also in this lesson: