smartyfy.mrindigi.com

AI Foundations for Students | 008. Examples, Formats and Constraints

AI Foundations for Students · Lesson 08 of 36

Module 2: Prompting and Learning

In this lesson

Learning goal: Specify demonstrations and output structures without treating examples as evidence.

Examples demonstrate a pattern

An instruction describes what to do; an example shows one way the result should look. Suppose a helper must convert fictional club notices into a consistent format. An example could pair “Drama, Monday, Room 3” with “Club: Drama; Day: Monday; Place: Room 3.” A second example with a missing room can demonstrate the output “Place: not stated.” This teaches a useful boundary as well as a format.

Examples in a prompt are not independent evidence that a factual claim is true. A made-up example about a club remains made up. If you provide a sample citation, clearly label it as a format example and avoid a realistic but nonexistent source that someone might mistake for research. Good examples are relevant, varied and correct for the intended task. A misleading demonstration can encourage the wrong pattern.

Define the output structure

A format is a way to organize information. A short labeled list can be easier to inspect than a flowing paragraph. For our club task, use four fields: Club, Day, Place and Source. Keeping the fields stable helps a reviewer compare input and output. But filling every field is not more important than honesty. If the place is missing, “not stated” is better than an invented room.

Choose the format for the reader. A wide table can be awkward on a small screen or when read aloud. A diagram that relies only on red and green may be inaccessible to some readers. A compact list with clear labels may work better. A format should help reveal the meaning and evidence, not merely make the answer look finished.

Constraints can conflict

Consider the instruction “Explain every detail in exactly five words.” Completeness and extreme brevity may conflict. Or consider “Use only the supplied text, and name the organizer,” when the text never names one. The appropriate response is to identify the conflict or missing information, not silently break an important requirement.

Distinguish required constraints from preferences. Required: use only the source and preserve the dates accurately. Preferred: use a friendly tone and about forty words. If a strict word limit would force an unclear or misleading answer, revise the design or ask which requirement takes priority. Avoid rewarding a model for obeying a surface rule while failing the actual learning goal.

Test whether the pattern transfers

A useful demonstration should work beyond the exact example. Give one ordinary notice, one with missing information and one with an unusual but valid ordering. This reveals whether the helper understands the field meanings or merely copies positions. For example, “Room 8 hosts the music club on Friday” expresses the same fields in a different order.

Do not put your final test answers inside the demonstration and then claim success on those same answers. That tests copying, not transfer to new cases. Keep a few unseen examples for later checking. In a paper simulation, one student writes the examples and a partner transforms new notices. Record when the instructions are unclear instead of blaming the partner for every mismatch. The goal is a dependable specification, not a perfect-looking score.

Worked practice

Worked exercise 1: Design a missing-field example

Task: Use the fictional input “Art club meets Thursday.” Provide a model output with Club, Day, Place and Source fields.

Worked solution: “Club: Art; Day: Thursday; Place: not stated; Source: supplied example notice.” The room field deliberately remains unknown. The source label identifies the actual supplied notice rather than inventing a website. This demonstration makes the no-invention behavior concrete and helps the helper handle incomplete input consistently.

Worked exercise 2: Resolve a conflict

Task: A source says only “The garden club meets Monday.” The task demands a complete leader biography using only that source. What should the helper do?

Worked solution: State that the source contains no leader name or biography, so the requested biography cannot be produced within the source boundary. Offer to summarize the available meeting detail or request an approved source about the leader. The source constraint has not been satisfied by creating a plausible person and writing about them.

Worked exercise 3: Test a reordered input

Task: The new notice says “On Friday in Room 8, the music club meets.” Fill the same four fields and explain the check.

Worked solution: “Club: Music; Day: Friday; Place: Room 8; Source: supplied test notice.” Verify each field by finding the corresponding phrase, regardless of its position in the sentence. This case tests meaning-based extraction more effectively than another input in exactly the demonstration’s order. It is still only one paper test, not proof of universal reliability.

Check your understanding

MCQ 1: What is the main role of a format example?

  1. Prove all its facts are real
  2. Show the desired response pattern
  3. Replace a source check
  4. Guarantee the model was retrained
Check the answer and explanation

Answer: B. Examples can demonstrate structure or behavior without establishing factual truth.

MCQ 2: A required field is absent from the source. What belongs there?

  1. A plausible guess
  2. A copied value from another example
  3. An explicit missing-information label
  4. The most common answer
Check the answer and explanation

Answer: C. An honest label preserves the evidence boundary.

MCQ 3: Which instruction pair may conflict?

  1. Use short sentences and define terms
  2. Cite the source and preserve dates
  3. Use labels and include a title
  4. Use only this text and add facts it never gives
Check the answer and explanation

Answer: D. The added facts cannot be supported by the supplied text alone.

MCQ 4: Which is a stronger transfer test?

  1. A valid new notice with reordered information
  2. The demonstration copied exactly
  3. The answer included in the prompt
  4. The same input with a different font
Check the answer and explanation

Answer: A. A genuinely new arrangement tests whether the rule generalizes.

MCQ 5: Why might a labeled list be preferable to a wide table?

  1. A list verifies each field against the source automatically
  2. It can be easier on small screens or when read aloud
  3. A list can omit the field labels because order alone is sufficient
  4. A list always preserves relationships better than any table
Check the answer and explanation

Answer: B. Format should be chosen for usability and access, not appearance alone.

Sources and further reading

  • OpenAI: Prompt engineering: General use of clear instructions, relevant context and input-output examples; no product access required. Verified 11 October 2026.