AI Literacy & Prompting Module 6 – AI at work
Brainstorming, images and creative work
Get AI ideas that really differ, choose with a rubric written first, write image prompts you can check, and handle consent, labels and ownership.
What you will learn
- Generate varied options with AI, then group them and choose with a rubric you wrote before you read them
- Write an image prompt that names its subject, setting, style, composition, aspect ratio and exact words, and check the result against it
- Decide when an AI image or voice of a real person needs consent, and when a realistic one needs a label
- Explain what makes you the author of AI-assisted creative work, and add your own context so that it stays original
Before you start
What you’ll learn · Before you start
What you will learn
- Generate varied options with AI, then group them and choose with a rubric you wrote before you read them
- Write an image prompt that names its subject, setting, style, composition, aspect ratio and exact words, and check the result against it
- Decide when an AI image or voice of a real person needs consent, and when a realistic one needs a label
- Explain what makes you the author of AI-assisted creative work, and add your own context so that it stays original
Before you start
On this page
An office team asked an AI tool for 20 names for its Diwali bake sale and had them in seconds. Read closely, the list was thinner than it looked: 8 of the names were built on the word “sweet”, and two pairs used the same words in a new order.
This lesson shows you how to get options worth choosing from and keep the choice yours. You will ask for options that really differ and measure how much they do, choose with a rubric written before you read them, write image prompts that can be checked element by element, and decide when a picture or a voice needs consent or a label, and what you own of the result.
Twenty names can hold only a few ideas
The team’s sale raises money every year for an animal shelter near the office. The first prompt was plain: “Give me 20 names for our Diwali bake sale.” A chat tool writes a name the way it writes any text, one likely piece after another (the lesson on next-token prediction shows how), so a plain request tends to come back with the likeliest names, and the likeliest names share their words.
The second prompt asked for the same 20 names in five groups of four: puns on an Indian sweet, names in Hindi, names about the shelter’s animals, names that leave out “Diwali” and “sweet”, and names easy to shout across a courtyard. Both lists below were written for this lesson to show the pattern. The program measures how alike the names in each list are: it drops the brief’s own words and the small words, then counts what is left:
Python · ideas/two_lists.py
"""How many ideas does a list of names hold?
An office team asked an AI tool for names for its Diwali bake sale, which
raises money for an animal shelter. plain.txt is the kind of list a plain
prompt returns ("Give me 20 names for our Diwali bake sale"); varied.txt is
the kind a prompt with groups and limits returns. Both lists were written for
this lesson.
Each name is reduced to its own words: the brief's words (Diwali, bake, sale)
and small words (of, and, for ...) are left out, and a plural "s" is dropped.
Then the program counts how often each word recurs, how many names use one of
the three most common words, which names repeat the same words in a new order,
and how many different words the names start with.
"""
import re
from collections import Counter
from pathlib import Path
BRIEF = {"diwali", "bake", "bakes", "sale"}
SMALL = {"a", "and", "aur", "for", "of", "the", "them", "you"}
def words(name):
out = []
for w in re.findall(r"[a-z]+", name.lower()):
if w in BRIEF or w in SMALL:
continue
if len(w) > 3 and w.endswith("s") and not w.endswith("ss"):
w = w[:-1]
out.append(w)
return out
def report(title, names):
lists = [words(n) for n in names]
counts = Counter(w for ws in lists for w in dict.fromkeys(ws))
top = {w for w, _ in counts.most_common(3)}
with_top = sum(1 for ws in lists if top & set(ws))
first_seen, repeats = {}, []
for name, ws in zip(names, lists):
key = frozenset(ws)
if key in first_seen:
repeats.append((first_seen[key], name))
else:
first_seen[key] = name
starts = {ws[0] for ws in lists if ws}
used = [f"{w} {c}" for w, c in counts.most_common() if c > 1]
print(f"{title}: {len(names)} names")
print(f" words used more than once: {', '.join(used) or 'none'}")
print(f" names with one of the 3 commonest words: {with_top} of {len(names)}")
print(f" same words in a new order: {len(repeats)}")
for a, b in repeats:
print(f" {a} = {b}")
print(f" different first words: {len(starts)} of {len(names)}")
here = Path(__file__).parent
for n, (title, file) in enumerate([("Plain prompt", "plain.txt"), ("Prompt with groups and limits", "varied.txt")]):
if n:
print()
text = (here / file).read_text(encoding="utf-8")
report(title, [line.strip() for line in text.splitlines() if line.strip()]) Output
Plain prompt: 20 names
words used more than once: sweet 8, light 4, treat 4, diya 3, delight 3, mithai 3, festival 2, magic 2
names with one of the 3 commonest words: 12 of 20
same words in a new order: 2
Sweet Treats of Diwali = Diwali Sweet Treats
Mithai Magic = Magic of Mithai
different first words: 11 of 20
Prompt with groups and limits: 20 names
words used more than once: laddoo 2, tail 2, sweet 2
names with one of the 3 commonest words: 6 of 20
same words in a new order: 0
different first words: 20 of 20
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 two_lists.py
ideas/plain.txt
Sweet Diwali Bake Sale
Sweet Lights Bake Sale
Sweet Treats of Diwali
Diwali Sweet Treats
Sweet Diya Delights
Sweet Festival Bakes
Sweets for a Cause
Sweet Celebrations
Diya Delights
Diya Bakes
Diwali Delights
Festival of Lights Bake Sale
Lights and Bites
Mithai Magic
Mithai Mela
Magic of Mithai
Festive Treats
Treats of Light
Bake a Difference
Diwali Bake Bazaar ideas/varied.txt
Laddoo You Love
Barfi Bonanza
Jalebi Jamboree
Gulab Jamun Jam
Meetha Mela
Roshni Rasoi
Mithaas Bazaar
Diye aur Dosti
Paws and Pedas
Treats for Tails
Whiskers and Sweets
Bake Them Home
Lamps, Laddoos and Labradors
Saturday Sugar Rush
Crumbs for a Cause
The Kindness Counter
Cake Stop
Sweet Spot
Tail Waggers' Tiffin
Big Bake Day In the plain list, “sweet” appears in 8 names, and 12 of the 20 use one of its three commonest words; the names start with only 11 different words. The grouped list starts with 20 different words, and its commonest word appears twice. The count is rough, but it measures the thing that matters: ideas, not names.
The pattern has been measured. In an experiment with 293 writers, stories written with ideas from an AI tool were rated more creative and better written than stories written alone, most of all for the less creative writers, but they were also more similar to each other (Doshi and Hauser). NIST names the risk homogenization: NIST's name for generative AI output that is more uniform than it should be, such as the same phrasing and structure in text after text, which makes writing generic and can skew decisions. More in “Writing and editing with AI”: outputs that are “overly uniform”, such as “repetitive aesthetic styles and reduced content diversity” (NIST AI 600-1, section 2.6). Ask for difference on purpose:
| Ask for | For example | What it changes |
|---|---|---|
| Named groups | “Five groups of four: puns, Hindi names, the animals …” | Each group pulls the list somewhere new |
| Your own limits | “Three words or fewer, easy to say in Hindi and English” | Names that fit your banner and your people |
| Options that break an assumption | “Names that do not use ‘sweet’ or ‘Diwali’” | The likeliest words are off the table |
| Your own ideas first | Write five before you prompt | Your ideas are on the list before the AI’s can anchor you |
Taking the first list as the brainstorm
Wrong: ask once, read 20 fluent names and pick one. Right: count the ideas in the list, then ask again in named groups and with your own limits. A list that reads well can still hold only a handful of ideas.
Checkpoint
Check: Asking for options that differ
Choose with a rubric you wrote before you read the list
A long list makes choosing harder, not easier, and a fluent name is easy to mistake for a good one. So the team wrote its rubric: A short list of the criteria you will judge options by, each with its weight or its pass mark, written before you look at the options so that the most fluent option does not decide for you. before anyone read a list: a name earns 2 points if it says the event is a food sale, 2 if it points to the shelter, 1 if it fits the banner in three words or fewer, and 1 if it is easy to say in Hindi and in English. One rule rules a name out whatever its score: it must not already be used nearby. Criteria written after you have read the options can end up describing the one you already like. Step through how the list becomes one name:
The drawing shows the whole scene; its 8 steps are listed below.
Every step as text
- The rubric comes first. Before anyone reads a list, the team writes what a good name must do: say it is a food sale, point to the shelter, fit the banner in three words or fewer, and be easy to say in Hindi and English. A name already used nearby is out.
- A plain request. The first prompt asks for 20 names and nothing else. The list comes back at once and reads well, which is not the same as holding 20 ideas.
- Too alike. Grouped by idea, the list is thin: 8 names use the word sweet, 12 use one of its three commonest words, and two pairs are the same words in a new order. The team goes back and asks again.
- Groups and limits. The second prompt asks for five groups of four: puns on an Indian sweet, Hindi names, names about the animals, names without Diwali or sweet, and names easy to shout across a courtyard.
- Twenty different starts. The new list starts with 20 different words, and its commonest word appears only twice. Now there is something to choose from.
- A shortlist. The team keeps six names that could meet the rubric and fills in the two judgements words cannot show: is it easy to say, and is it already used nearby?
- The rubric decides. Paws and Pedas and Treats for Tails both score 6 of 6, but a pet shop on the main road already uses Treats for Tails, so the rule rules it out.
- Make it theirs. The team writes two taglines for the winner and tries the name on five colleagues who did not choose it. The AI widened the options; the team chose and shaped the name.
Asking the AI which option is best
Wrong: paste the shortlist back and ask the tool to choose. Its answer will be fluent and confident, and it tends to agree with whatever your question leans towards (the lesson on sycophancy shows why). Right: score the shortlist against your rubric, and use the AI for what it is good at, such as more taglines for the winner.
The program scores the shortlist. It counts what words can show, such as a food word, an animal word and the length; the two judgements that need people, whether a name is easy to say and whether it is already used nearby, are columns the team filled in:
Python · ideas/score.py
"""Score a shortlist of names against a rubric written before the list.
The team wrote its rubric first: a name earns 2 points if it says the event
is a food sale, 2 if it points to the animal shelter, 1 if it has three words
or fewer (it must fit the banner) and 1 if it is easy to say in Hindi and in
English. A name already used nearby is out, whatever its score. The program
scores what words can show; the two judgements that need people (easy to say,
used nearby) are columns of shortlist.csv, filled in by the team. The
shortlist and the judgements were written for this lesson.
"""
import csv
import re
from pathlib import Path
FOOD = {"bake", "barfi", "cake", "laddoo", "meetha", "peda", "tiffin", "treat"}
SHELTER = {"home", "labrador", "paw", "tail", "wagger", "whisker"}
def stems(name):
out = []
for w in re.findall(r"[a-z]+", name.lower()):
if len(w) > 3 and w.endswith("s"):
w = w[:-1]
out.append(w)
return out
def score(row):
ws = stems(row["name"])
parts = {
"food": 2 if FOOD & set(ws) else 0,
"shelter": 2 if SHELTER & set(ws) else 0,
"short": 1 if len(row["name"].split()) <= 3 else 0,
"say": 1 if row["easy to say in Hindi and English"] == "yes" else 0,
}
return parts, sum(parts.values())
here = Path(__file__).parent
with open(here / "shortlist.csv", encoding="utf-8", newline="") as f:
rows = list(csv.DictReader(f))
print("Rubric: food sale 2, shelter 2, three words or fewer 1, easy to say 1;")
print("a name already used nearby is out.\n")
print(f"{'name':<22}{'food':>5}{'shelter':>8}{'short':>6}{'say':>4}{'total':>6}")
results = []
for row in rows:
parts, total = score(row)
used = row["already used nearby"]
results.append((total, used == "no", row["name"]))
print(f"{row['name']:<22}{parts['food']:>5}{parts['shelter']:>8}{parts['short']:>6}{parts['say']:>4}{total:>6}")
if used != "no":
print(f"{'':<22}out: {used.removeprefix('yes: ')}")
best = max((r for r in results if r[1]), key=lambda r: r[0])
print(f"\nChosen: {best[2]}, {best[0]} of 6.") Output
Rubric: food sale 2, shelter 2, three words or fewer 1, easy to say 1;
a name already used nearby is out.
name food shelter short say total
Paws and Pedas 2 2 1 1 6
Treats for Tails 2 2 1 1 6
out: a pet shop on the main road uses it
Bake Them Home 2 2 1 0 5
Tail Waggers' Tiffin 2 2 1 0 5
Meetha Mela 2 0 1 1 4
Barfi Bonanza 2 0 1 1 4
Chosen: Paws and Pedas, 6 of 6.
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 score.py
ideas/shortlist.csv
name,easy to say in Hindi and English,already used nearby
Paws and Pedas,yes,no
Treats for Tails,yes,yes: a pet shop on the main road uses it
Bake Them Home,no,no
Tail Waggers' Tiffin,no,no
Meetha Mela,yes,no
Barfi Bonanza,yes,no Two names tie at 6 of 6, and the rule settles it: a pet shop on the main road already uses Treats for Tails, a fact no AI list could have checked for the team. Paws and Pedas wins, and the work goes on from there: two taglines, and a test on five colleagues who did not choose it.
Key idea
Use AI for range and keep the choice: count the ideas, not the names, and score the shortlist against a rubric you wrote before you read it.
Checkpoint
Check: Choosing with a rubric written first
An image prompt is a specification you can check
“A nice festive poster for our bake sale” gives an image tool nothing to be held to, so whatever comes back cannot be called wrong. A prompt that works like a specification names each element in words that a finished image can be checked against, yes or no:
| Element | Vague | Checkable |
|---|---|---|
| Subject | “some animals and sweets” | “one dog and one cat beside a table of pedas, five diyas” |
| Setting | “festive” | “an office courtyard at dusk, lights in the trees” |
| Style | “nice and colourful” | “flat illustration in warm orange and deep blue” |
| Composition | “centred” | “everything in the lower two thirds, empty space at the top” |
| Aspect ratio | (none) | “4:5, portrait” |
| Exact words | “with the details” | The words in double quotes, exactly: “Paws and Pedas, Saturday 4 pm, Block C courtyard” |
| Leave out | (none) | “real people, logos and any other text” |
The aspect ratio: The proportion of an image's width to its height, written width:height. A 4:5 portrait poster that is 1,080 pixels wide is 1,350 pixels tall. is width to height: a 4:5 poster suits a phone screen, while a square 1:1 image in a 4:5 space either loses its sides or leaves bars above and below it. The counts and the words matter most, because image tools slip on exactly those. A study of how such models draw letters begins with the finding that they “struggle to reliably produce well-formed visual text” (Liu and others). In GenEval, a test of open image models, the best model for each task placed two objects in the asked-for positions in only 15 % of the images, gave two objects their two asked-for colours in 35 % and drew the asked-for number of objects in 66 % (Ghosh and others). Newer tools may do better; the elements are still the ones to check. Follow one poster from the prompt to the notice board:
The drawing shows the whole scene; its 7 steps are listed below.
Every step as text
- A specification. The prompt names the subject with counts (one dog, one cat, five diyas), the setting, the style, the composition, the aspect ratio of 4:5, the exact words in quotes, and what to leave out.
- A few versions. The tool makes four versions. The team picks the one whose picture is closest to the brief and checks it before anyone admires it.
- Element by element. The check finds four slips: Pedas printed as Pedes and Block as Blok, four diyas instead of five, a square image instead of 4:5, and a line of made-up letters under the cat.
- Back to the prompt. The count and the size go back into the prompt: five diyas, 4:5. The made-up letters broke "no other text", which the prompt already asked for, so the next version is checked for that first.
- The words by hand. Image tools often misspell words, so the team asks for empty space at the top and types the words there in a design tool, where every letter is the one they typed.
- A label when it looks real. A flat illustration of a dog and a cat looks like what it is, a drawing. Had the poster been photo-realistic, it would carry a note that AI made it, and keep its provenance data.
- On the notice board. The poster goes up with every element checked. The tool drew the picture; the specification and the checks made it the poster the team asked for.
The program does the checking step. A person types what the generated image shows, and the program compares it with the brief element by element, and the words letter by letter:
"""Check a generated poster against the brief it was made from.
A person looks at the image and types what it shows: the words as printed,
how many of each thing there are, its size in pixels, its style and anything
extra. The program compares that with the brief, element by element, and the
words letter by letter. The brief and what the image showed were written for
this lesson; the slips are the kinds image tools make.
"""
from math import gcd
BRIEF = {
"text": "Paws and Pedas, Saturday 4 pm, Block C courtyard",
"counts": {"dog": 1, "cat": 1, "diya": 5},
"ratio": (4, 5),
"style": "flat illustration",
}
SEEN = {
"text": "Paws and Pedes, Saturday 4 pm, Blok C courtyard",
"counts": {"dog": 1, "cat": 1, "diya": 4},
"size": (1024, 1024),
"style": "flat illustration",
"extra": "a line of made-up letters under the cat",
}
checks = []
def verdict(name, ok):
checks.append(ok)
print(f"{name}: {'ok' if ok else 'FIX'}")
wanted = [w.strip(",") for w in BRIEF["text"].split()]
printed = [w.strip(",") for w in SEEN["text"].split()]
wrong = [f"{a} printed as {b}" for a, b in zip(wanted, printed) if a != b]
verdict("text", not wrong and len(wanted) == len(printed))
print(f" brief: {BRIEF['text']}")
print(f" in image: {SEEN['text']}")
if wrong:
print(f" {'; '.join(wrong)}")
off = [f"{thing}: {n} in the brief, {SEEN['counts'].get(thing, 0)} in the image"
for thing, n in BRIEF["counts"].items() if SEEN["counts"].get(thing, 0) != n]
verdict("counts", not off)
for line in off:
print(f" {line}")
w, h = SEEN["size"]
g = gcd(w, h)
rw, rh = BRIEF["ratio"]
verdict("aspect ratio", (w // g, h // g) == (rw, rh))
print(f" brief {rw}:{rh}; the image is {w} x {h}, which is {w // g}:{h // g}")
print(f" at 1080 pixels wide, {rw}:{rh} is 1080 x {1080 * rh // rw}")
verdict("style", SEEN["style"] == BRIEF["style"])
verdict("nothing extra", not SEEN.get("extra"))
if SEEN.get("extra"):
print(f" the brief allows no other text; the image has {SEEN['extra']}")
print(f"\n{checks.count(False)} of {len(checks)} checks need a fix before the poster is used.") Output
text: FIX brief: Paws and Pedas, Saturday 4 pm, Block C courtyard in image: Paws and Pedes, Saturday 4 pm, Blok C courtyard Pedas printed as Pedes; Block printed as Blok counts: FIX diya: 5 in the brief, 4 in the image aspect ratio: FIX brief 4:5; the image is 1024 x 1024, which is 1:1 at 1080 pixels wide, 4:5 is 1080 x 1350 style: ok nothing extra: FIX the brief allows no other text; the image has a line of made-up letters under the cat 4 of 5 checks need a fix before the poster is used.
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 check_poster.py
Four of the five checks fail, and a quick look would miss most of the slips: two misspelt words, four diyas instead of five, a square image instead of 4:5, and made-up letters under the cat. The counts and the ratio go back into the prompt; the words are safest typed by hand.
Leave space for the words, then type them yourself
Ask for empty space where the words will go, and add them in a design tool afterwards. Every letter is then the one you typed, and you can still change the time without making the picture again.
Checkpoint
Check: Image prompts as specifications
Real faces and voices need consent, and realistic fakes need a label
Someone suggests a better poster: the managing director, made with an image tool from his photo on the firm’s website, smiling behind the table with a tray of pedas. He has not been asked. A realistic image of a real person shows them doing something they never did, and a voice clip has them saying something they never said. Whether it is kind, funny or for a good cause, it is still made without the person’s agreement, and viewers cannot tell it from a photo.
Two rules follow. Ask the person before you make a realistic image or voice of them, explain how it will be used, and keep their yes in writing. And when a realistic image, video or recording will be seen by others, say that AI made it, so that nobody takes it for a real photo; a flat drawing of a dog and a cat needs no such note, because it looks like what it is. Answer three questions about an image of your own:
Answer the questions above: the table then marks what fits your case and says why the rest does not.
| Choice | Fair to the person | Honest with viewers | Effort |
|---|---|---|---|
| Make it and use it What people see: the image as the tool made it | Mixed fine with no real person in it; unfair to anyone shown who was not asked | Mixed fine for a drawing; misleading when it looks like a real photo | Good nothing more to do |
| Make it with a label What people see: a visible note that AI made it | Mixed a label tells the viewers, not the person shown | Good viewers know AI made it | Good one line on the image or in the post |
| Ask the person first What people see: the person's written yes, then the image | Good the person agreed to how they are shown | Mixed a realistic result still needs a label | Mixed explain the use, then keep the yes in writing |
| Use no real person What people see: a drawing, an animal or a made-up face | Good nobody real is shown | Good a drawing looks like what it is | Mixed a new prompt, and a new check |
| Do not make it What people see: another idea, or a real photo | Good nobody is shown | Good nothing to mislead anyone with | Poor the idea is dropped |
How the answers decide
- “Does the image or voice clip show a real, recognisable person?” Yes, and they have not agreed: rules out Make it and use it and Make it with a label. Do not show a recognisable person doing or saying what they never did without their agreement, and a label does not change that. Ask first, or leave them out.
- “Does the image or voice clip show a real, recognisable person?” No real person: rules out Ask the person first. No real person is shown, so there is nobody to ask. The other questions still decide whether it needs a label.
- “Could a viewer take it for a real photo, video or recording?” Yes, it looks real and “Will it be shared beyond the people who asked for it?” Yes, it will be posted or printed: rules out Make it and use it and adds a caveat to Ask the person first. A realistic image or recording that others will see says that AI made it, even when the person agreed, so that nobody takes it for a real photo.
- “Could a viewer take it for a real photo, video or recording?” Yes, it looks real and “Will it be shared beyond the people who asked for it?” No, it is a draft for the team: adds a caveat to Make it and use it. A draft can travel: mark the file as made with AI before it goes round the team, so that it is never taken for a photo later.
- “Does the image or voice clip show a real, recognisable person?” Yes, and they agreed in writing and “Could a viewer take it for a real photo, video or recording?” No, it is clearly a drawing: adds a caveat to Make it and use it. Keep the yes in writing, and show the person the drawing before it is used: they agreed to an idea, not yet to this picture.
- “Does the image or voice clip show a real, recognisable person?” No real person and “Could a viewer take it for a real photo, video or recording?” No, it is clearly a drawing: A drawing with no real person in it can be used as it is. Check its words, counts and size like any other image.
Who must label realistic fakes in India
India’s IT Rules, as amended by G.S.R. 120(E), put the duties on platforms rather than on each person who makes a picture. A platform that offers tools for realistic synthetic audio, images or video must take reasonable steps to stop its users making such content when it would deceive people about a real person or event, must mark everything else it makes with a prominent label and, where it can, a lasting provenance mark, and must not let anyone remove them. The biggest social media platforms also ask whoever uploads a post whether it is synthetic, and check the answer. Ordinary edits, and illustrations made for documents, presentations and teaching, are left out unless the result is a false document.
Labels and provenance data travel with some files and are stripped from others; the lesson on deepfakes shows what they prove and what they do not, and where to report a fake of yourself.
Image Metadata Viewer See the metadata an image carries, including any tag that says how it was made.Checkpoint
Check: Consent and labels for real people
A prompt alone does not make you the author
The poster works, and the team wants to print the picture on mugs for next year’s sale. Is it theirs? The U.S. Copyright Office studied the question for American law and concluded that “prompts alone do not provide sufficient human control” over what the system makes, so typing a prompt does not make you its author. What a person adds can still be protected: their own expression that can be seen in the output, their creative selection, coordination or arrangement of it, and their creative changes to it, judged case by case (U.S. Copyright Office). Other countries decide for themselves, and each tool’s terms say what you may do with its output, so read them before anything is sold.
| What the team contributed | What the Office’s report says about it |
|---|---|
| A detailed prompt, nothing else | Not enough to make them authors of the image |
| A sketch of their own, still visible in the result | Their sketch stays theirs |
| Their own layout of several images and their typed words | The selection and arrangement can be theirs |
| Their own repainting of parts of the image | Their changes can be theirs |
The same contributions are what keep the work original. A prompt anyone could write gives a picture anyone could get; the team’s own sketch, the real courtyard, the shelter’s actual cat and the words in their own type make the poster theirs in both senses.
Key idea
Your own expression is what you own and what makes the work yours: add your sketch, your layout, your edits and your local details instead of relying on the prompt.
Checkpoint
Check: Authorship and originality
Practise: write a poster prompt you can check
The exercise gives you the first image prompt someone wrote for the bake sale poster: vague in every line, and with a person in it who has not agreed. Turn it into a specification. The sample tests check what a specification can be checked for: each element on its own line, the counts in the subject, no one who has not agreed, a named style and a composition that says where things go, the ratio 4:5, the exact words in double quotes, and what to leave out. They cannot tell whether the picture will be a good one; that judgement stays yours.
Exercise · Easy · JavaScript
Turn a vague image prompt into a specification you can check
An office team needs a poster for its Diwali bake sale, which raises money for an animal shelter. poster.mjs holds the first image prompt someone wrote, between two backticks, one element per line. The office, the sale and the people were written for this exercise.
The brief for the poster:
- one dog and one cat beside a table of sweets, with five diyas;
- an outdoor setting at dusk, in a style you name (for example a flat illustration);
- empty space at the top for the words, which must read exactly: Paws and Pedas, Saturday 4 pm, Block C courtyard;
- a portrait poster for phones, with the aspect ratio 4:5;
- no real people, no logos and no other text. The team's manager, Mr Iyer, has not agreed to appear in any image.
Edit the text after each label so that every element can be checked against the result. Keep the seven labels and the backticks.
The sample tests check what a specification can be checked for: each element on its own line, the counts in the subject, no person who has not agreed, a named style and a composition that says where things go, the ratio 4:5, the exact words in double quotes, and what to leave out. They cannot tell whether the picture will be a good one.
Starter code · poster.mjs
// The first image prompt for the poster. Edit the text after each label; keep the labels and the backticks.
export const prompt = `Subject: our manager Mr Iyer holding a tray of sweets, with some animals
Setting: festive
Style: nice and colourful
Composition: centred
Aspect ratio:
Text: paws and pedas saturday 4pm block c
Leave out:`; The sample tests · poster.test.mjs
import { test, assert } from 'mysmartcopilot:test';
import { prompt } from './poster.mjs';
// What a specification can be checked for. Each line is read on its own: "Label: the text after it".
const LABELS = ['Subject', 'Setting', 'Style', 'Composition', 'Aspect ratio', 'Text', 'Leave out'];
const text = () => String(prompt);
const line = (label) => {
const m = new RegExp(`^${label}:(.*)$`, 'mi').exec(text());
return m ? m[1].trim() : '';
};
const words = (s) => s.split(/\s+/).filter(Boolean).length;
test('every element has its own line', () => {
for (const label of LABELS) assert.ok(new RegExp(`^${label}:`, 'mi').test(text()), `keep the line that starts "${label}:"`);
});
test('the subject gives the counts', () => {
const s = line('Subject');
assert.ok(/\b(one|1) dog\b/i.test(s), 'say how many dogs: one dog');
assert.ok(/\b(one|1) cat\b/i.test(s), 'say how many cats: one cat');
assert.ok(/\b(five|5) diyas\b/i.test(s), 'say how many diyas: five diyas');
});
test('no person who has not agreed', () => {
// Naming him under "Leave out" is fine: the other lines describe what the picture shows.
const shown = LABELS.filter((label) => label !== 'Leave out').map(line).join('\n');
assert.ok(!/iyer|manager/i.test(shown), 'Mr Iyer has not agreed to appear: take him out of the picture');
});
test('the setting, the style and the composition can be checked', () => {
assert.ok(words(line('Setting')) >= 4, 'describe the setting in at least four words, such as "an office courtyard at dusk"');
assert.ok(words(line('Style')) >= 2 && !/\bnice\b/i.test(line('Style')), 'name a style, such as "flat illustration", instead of "nice"');
assert.ok(/\b(top|bottom|left|right|thirds?|space)\b/i.test(line('Composition')), 'say where things go and where the words will sit');
});
test('the aspect ratio is 4:5', () => {
assert.ok(/^4\s*:\s*5\b/.test(line('Aspect ratio')), 'give the ratio as width:height: 4:5');
});
test('the words are exact, in double quotes', () => {
assert.ok(line('Text').includes('"Paws and Pedas, Saturday 4 pm, Block C courtyard"'), 'copy the exact words, in double quotes: "Paws and Pedas, Saturday 4 pm, Block C courtyard"');
});
test('it says what to leave out', () => {
const s = line('Leave out');
assert.ok(/real (people|persons?|faces?)/i.test(s), 'leave out real people');
assert.ok(/logos?/i.test(s), 'leave out logos');
assert.ok(/other (text|words|letters)/i.test(s), 'leave out any other text');
}); A hint
Read each line and ask: could someone hold the finished image up against it and say yes or no? "Nice and colourful" and "festive" cannot be checked; "flat illustration" and "an office courtyard at dusk" can. Put numbers in the subject, the ratio as width:height, and the words in double quotes, copied exactly. Then take out the person who has not agreed.
Results of the sample tests
| Test | Result | Details |
|---|
What your code printed
The sample tests run on this device, in your browser (QuickJS): nothing is sent to mysmartcopilot.com. The first run downloads JavaScript (about 0.6 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.
Then test yourself on ideas, rubrics, image prompts, consent and authorship. The questions start with whichever has given you most trouble so far:
Practice that adapts to you
Practise this lesson
15 questions about 5 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.
Interview questions
Warm-up (fresher to mid-level): Why should you write your selection criteria before you ask an AI tool for ideas?
Because a list of ideas changes what you look for. Read 20 fluent options first and the criteria you write afterwards tend to describe the option you already like, or the one that sounds most polished. Written first, a rubric says what the idea must do in your situation: for a bake sale name, say that it is a food sale, point to the cause, fit the banner and be easy to say for the people who will use it, plus any rule that rules an option out, such as a name already used nearby. Then every option is scored the same way, a tie is settled by the rule rather than by taste, and you can explain the choice to others. The AI widens the options; the rubric keeps the decision yours and your reasons visible.
Two workplace questions build on this lesson:
Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.
-
Fresher to mid
Marketing wants a realistic AI image of the company's founder lighting a diya, for a Diwali greeting to every customer. The founder is travelling and has not seen the idea. What would you check and decide before it goes out?
-
Mid to senior
Your team now starts every campaign from AI ideas, and its last three campaigns looked much like its competitors'. How would you change the way the team generates and chooses ideas?
Key takeaways
- A list of 20 AI names can hold only a few ideas: count the words they share, then ask in named groups, with your own limits and for options that break an assumption.
- Write the rubric before you read any list, score the shortlist against it, and let a rule settle a tie; never ask the AI to pick the winner.
- Write an image prompt as a specification of seven elements, and check the result element by element: the counts, the ratio and the words are where image tools slip.
- Ask a real person before you make a realistic image or voice of them, and say that AI made any realistic image that others will see.
- A prompt alone does not make you the author; your own sketch, layout, edits and local details are what you own and what make the work original.
Terms in this lesson
- aspect ratio
- The proportion of an image's width to its height, written width:height. A 4:5 portrait poster that is 1,080 pixels wide is 1,350 pixels tall.
- rubric
- A short list of the criteria you will judge options by, each with its weight or its pass mark, written before you look at the options so that the most fluent option does not decide for you.
References
- Generative AI enhances individual creativity but reduces the collective diversity of novel content (Science Advances (Doshi and Hauser))
- Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1) (National Institute of Standards and Technology)
- Character-Aware Models Improve Visual Text Rendering (ACL (Liu and others))
- GenEval: An Object-Focused Framework for Evaluating Text-to-Image Alignment (arXiv (Ghosh, Hajishirzi and Schmidt))
- The Information Technology (Intermediary Guidelines and Digital Media Ethics Code) Rules, 2021, as amended by G.S.R. 120(E) (Ministry of Electronics and Information Technology, Government of India)
- Copyright and Artificial Intelligence, Part 2: Copyrightability (U.S. Copyright Office)
Related tools
Report a problem with this lesson
Kept only in this browser. Your Learn progress