IB COMPUTER SCIENCE | 2027 CASE STUDY | SL & HL

02.1 Text-to-image generation and prompts

Explain text-to-image generation, construct clear prompts and evaluate whether candidate images meet a creative brief for Visionary Studios.

Understand the technology

Turn a vague idea into useful visual guidance.

For May and November 2027. This introductory lesson is shared SL and HL content.

01 | TURNING WORDS INTO AN IMAGE

A designer has an idea for an advertisement but has not yet drawn it. They write: “An illustrated explorer beside a mountain lake at sunrise.” A text-to-image system uses that description to guide the production of an image.

Text-to-image generation means generating image content guided by text. The text input is called a prompt . The system computes an output using its trained model; it is not simply returning a photograph whose filename matches the sentence.

Visionary Studios could use this approach to explore concepts and advertising directions. The explorer campaign is our fictional teaching example, not an additional fact from the official case study.

02 | A PROMPT IS A CREATIVE BRIEF

A prompt communicates what the user wants the system to produce. A useful way to think about it is as a short creative brief: it identifies the subject and the visual decisions that matter to the job.

“An explorer” leaves many choices open. Is the image a portrait or a full-body view? Is the style photographic or illustrated? Where should the character appear? Leaving choices open can be useful for brainstorming, but less useful when the client has precise requirements.

The prompt should express the requirements that affect success. Adding detail simply to make the prompt longer can introduce confusion without improving the result.

03 | FROM TEXT TO NUMERICAL GUIDANCE

The model cannot use written words in the same way a person reads a design brief. A typical text-guided system converts text into numerical representations that influence generation. Many systems split text into tokens, which may represent words or parts of words, and process them with a text encoder.

An embedding is a numerical representation that can capture learned relationships. The generation system uses text representations as conditioning: information that guides which output is produced.

This is a high-level explanation. Exact components vary between systems. The prompt does not contain instructions specifying every output pixel, and ordinary generation usually keeps the learned model parameters unchanged.

04 | SUBJECT: WHAT SHOULD BE SHOWN?

The subject is the main person, object or scene. Start by making it clear. “An illustrated explorer wearing a green jacket” provides more useful direction than “something adventurous”.

Include important attributes, such as clothing or the number of main objects, but inspect whether the output follows them. A model may omit an attribute or apply it to the wrong object.

For a recurring campaign character, a description can help, but repeating the same words does not guarantee a stable identity across images. Later lessons examine character consistency and other forms of guidance.

05 | SETTING: WHERE AND WHEN?

The setting is the environment around the subject. A mountain lake, a crowded station and a futuristic city suggest very different visual contexts.

Time of day and weather can shape the scene. “Beside a mountain lake at sunrise, with light mist over the water” gives environmental cues. These cues should support the message rather than compete with the subject.

Check relationships as well as the presence of objects. An image can contain both an explorer and a lake while placing them in a way that fails the intended scene.

06 | COMPOSITION: WHERE SHOULD THINGS GO?

Composition is the arrangement of visual elements. In an advertisement, the designer may need space for a headline. “Place the explorer on the right, with a clear area on the left for a headline” expresses that layout need.

Framing concerns how the subject appears within the image, such as a close-up portrait or full-body view. A beautiful close-up would fail a brief that needs the character’s entire outfit.

Describing layout is useful guidance, but it is not precise placement control. If a strict arrangement matters, the studio may need editing or additional inputs, such as sketches, rather than relying on text alone.

07 | STYLE, LIGHTING AND MOOD

Style describes the visual treatment, such as a flat illustration, watercolour appearance or photorealistic rendering. The right style depends on the campaign; photorealism is not automatically the highest-quality choice.

Lighting describes how the scene is illuminated. Soft sunrise light and harsh overhead light can produce very different impressions. Mood describes the intended emotional effect, such as calm, energetic or mysterious.

Keep the instructions coherent. A request can intentionally mix visual ideas, but contradictory priorities make evaluation harder. Decide which qualities must be preserved and which can remain open to interpretation.

08 | A WORKED PROMPT IMPROVEMENT

Start with “An explorer near water.” This can produce many valid interpretations, but it does not communicate the campaign’s style or layout.

Try “A full-body editorial illustration of an explorer in a green jacket beside a mountain lake at sunrise. Place the explorer on the right and leave a clear area on the left for an advertising headline. Use a calm atmosphere and a restrained blue and green palette.”

Each addition serves a purpose: full-body specifies framing, the jacket adds an attribute, the lake and sunrise establish setting, the right-hand placement supports layout, and the palette supports the visual direction. This is a proposed prompt, not evidence of an actual generated result.

09 | BREAK THE PROMPT INTO DECISIONS

How the teaching prompt relates to a brief
Prompt detail Purpose What to check
Explorer in a green jacket Define subject and attribute Correct subject and clothing
Mountain lake at sunrise Establish setting and time Recognisable environment and lighting
Full-body illustration Specify framing and style Whole character visible; illustrated treatment
Subject on the right; clear area on the left Support advertising layout Usable headline space
Restrained blue and green palette Guide colour treatment Colours broadly follow the brief

A good prompt makes evaluation easier because the important decisions are visible. However, checking compliance still requires inspecting the output.

10 | PROMPTS ARE GUIDANCE, NOT GUARANTEES

A generator can misunderstand an instruction, ignore a detail or produce an awkward relationship between objects. Some outputs may have distorted anatomy, inconsistent reflections or unwanted visual details.

Counting, exact placement and written text can also require careful checking. Capabilities vary between models, so avoid claiming that all systems always fail or always succeed on these tasks.

For final campaign assets, the studio should review accuracy, layout and style. It may be more reliable to add exact logos or headline text in an editing application where the designer has direct control.

11 | WHAT ABOUT NEGATIVE PROMPTS?

Some systems provide a separate negative prompt field for content or qualities the user wants to discourage. Its availability and behaviour depend on the application and model.

It is not a universal “delete this” command. An ordinary instruction such as “no red jacket” is also not guaranteed to work as a strict logical exclusion. The system may not handle negation as the designer expects.

Describe the desired result positively where possible, such as “a green jacket”, then inspect the output. If the application offers negative conditioning, test it using that application’s supported controls rather than copying unexplained syntax from another service.

12 | CHANGE ONE THING TO LEARN SOMETHING

Suppose the subject appears too small. Instead of changing the style, setting and composition together, first revise the framing instruction. This helps the designer understand which change may have affected the result.

A controlled comparison keeps relevant conditions similar while investigating a particular change. Record the model version, prompt and generation settings. Where supported, a consistent seed can reduce one source of variation, but it does not guarantee identical results across systems.

Use repeated samples. One successful revision could be a lucky result. The aim is to gather useful evidence, not claim a causal rule from a single image pair.

13 | REVIEW, REVISE AND RECORD

Prompt development is an iterative process. Generate candidates, check them against the brief, identify a mismatch and make a reasoned revision. Keep the original prompt so that the comparison is traceable.

Specify

State the visual requirements.

Generate and inspect

Check candidates against those requirements.

Revise and record

Change a relevant instruction and document the result.

Repeated prompting is normally repeated generation, not retraining. If the studio changes model parameters through further learning, that is a different process.

14 | USE A SIMPLE REVIEW RUBRIC

A rubric states how outputs will be judged. For the fictional explorer brief, reviewers could assess subject and attributes, setting, framing, layout and style. Agree the criteria before comparing systems.

For each criterion, a classroom scale could use 0 for not met, 1 for partly met and 2 for met. With five criteria, the total would be out of 10. These are invented teaching scores, not an official IB or company rubric.

A total can help organise evidence, but a critical failure may still reject an image. A score of 8/10 is not automatically acceptable if the required headline area is unusable. Keep notes explaining the judgement.

15 | KNOW WHEN TEXT ALONE IS NOT ENOUGH

Text is convenient for communicating broad ideas, but some requirements need stronger control. A client may supply a precise layout sketch, product reference or region map. These can guide generation in ways that a paragraph may not reliably achieve.

The next lesson examines conditional inputs such as labels, sketches and segmentation maps. These approaches extend the available guidance; they do not remove the need to evaluate outputs.

For Visionary Studios, choosing an input method should follow the task. Open exploration might benefit from a short prompt; a tightly constrained advertisement may require a more controlled workflow.

16 | APPLY IT TO THE CASE STUDY

Text-to-image generation could help Visionary Studios translate descriptions into candidate concepts quickly. Its value depends on how many candidates become usable work and how much editing they require.

Explain: A composition instruction could help the studio reserve space for advertising text because it communicates the intended arrangement. However, the model may not follow the layout precisely, therefore the designer should inspect the result and use editing or additional guidance when required.

Do not invent claims about the company’s existing software, costs or measured productivity. Describe a proposed trial and identify the evidence needed.

17 | BUILD AND CRITIQUE YOUR OWN PROMPT

Write a prompt for our fictional explorer campaign. Include the subject, setting, composition and style. Underline each phrase and explain which requirement it communicates.

Now identify one phrase that might be ambiguous. Rewrite it, then propose a controlled comparison and a review rubric. You can complete the task on paper without an account or paid image generator.

Reveal a possible response

“A full-body editorial illustration of an explorer in a green jacket beside a mountain lake at sunrise, on the right of the image, with a clear left-hand area for a headline.” Compare this with a version that omits the layout instruction, keeping the model and other settings recorded and similar. Generate several samples and inspect whether the left-hand area is usable.

Do not judge the comparison only by attractiveness. Record layout compliance, character features, defects and editing needed.

Read alongside the text-to-image section of the official 2027 booklet. The worked prompt, rubric and explorer campaign are independent classroom examples.

CHECK YOUR UNDERSTANDING | WHAT DOES THIS PROMPT PHRASE CONTROL?

Match each prompt phrase to its main role in the creative brief. Some details can interact; choose the most direct role here.