Teaching · Practical guide

Use AI-Generated Analogies Without Teaching the Wrong Idea

An analogy connects an unfamiliar idea with something familiar. That connection can help a learner begin, but it can also import incorrect assumptions. This lesson builds a mapping, tests its limits and returns to the technical concept before assessing understanding.

My DYAP →

Decide what the analogy needs to explain

Choose one relationship rather than an entire subject. “Explain networks using a city” is broad enough to invite misleading details. “Explain the difference between a destination address and a route” is more bounded. The narrower target makes it easier to judge whether a proposed comparison actually helps.

An analogy has a familiar source and an unfamiliar target. Its value lies in the relationship that maps between them, not in every surface detail. A parcel and a data packet may both carry destination information, but a packet is not literally a physical box. State the intended mapping in words before asking for a colourful story or image.

Research on teaching by analogy emphasises attention to learners’ prior knowledge. Do not assume a postal system, sport or cultural reference is familiar to everyone. Ask a quick question about the source concept. If it creates a second unfamiliar topic, use a different comparison or a direct example instead. An analogy is optional support, not a required ingredient in every explanation.

Make a mapping and a boundary

Create a small list of paired elements. For a library-catalogue analogy, a book’s shelf label can illustrate a reference that helps locate an item. Then identify the exact technical relationship you intend to explain. Avoid adding entertaining details that have no valid counterpart; learners may remember those details more easily than the intended relation.

For every useful similarity, ask what a learner might wrongly infer. A queue analogy can suggest that items are always served in arrival order, even when the actual system uses priorities. A brain analogy can suggest human feelings or understanding where the lesson concerns numerical computation. Naming the limit is part of teaching the concept, not a minor disclaimer at the end.

Ask AI to produce a mapping table and at least two ways the comparison could mislead. Check the target facts against your course source. The assistant may invent both the analogy and its supposed technical justification. If you cannot explain why a mapping is valid, remove it rather than trusting a confident explanation.

Worked example: a recipe and an algorithm

Target idea: an algorithm is a specified sequence of steps for solving a problem or performing a task. Familiar source: a recipe. Useful mapping: ingredients correspond loosely to inputs; ordered cooking instructions correspond to procedure; the finished dish corresponds to output. The mapping highlights that both inputs and instructions affect a result.

Use a numerical target to avoid leaving the analogy vague. Algorithm: to find the mean of three values, add the values and divide the sum by three. For 4, 7 and 10, the sum is 21 and the mean is 7. The inputs are the three values; the procedure is addition followed by division; the output is the mean.

Boundary 1: many recipes use ambiguous instructions such as “cook until done,” relying on human judgement and conditions. A computational procedure needs the relevant operations and stopping conditions specified for its implementation. Boundary 2: a recipe analogy does not mean every algorithm is a fixed linear list; algorithms may include repetition and conditional choices.

Extend carefully: a recipe instruction “if the mixture is too dry, add water” can introduce a conditional branch, but it does not define a measurable threshold. The corresponding computational task must specify the condition, such as “if the value is below 5.” This is a chance to explain the technical requirement rather than pretending the analogy is exact.

Check understanding with the actual procedure: find the mean of 2, 6 and 13. The sum is 21, so the mean is 7. Then ask why simply returning the middle input, 6, is not the same operation. This checks the algorithm directly; recalling the cooking story would not answer the question.

Use the analogy, then deliberately leave it

A productive explanation can follow four stages: name the target, introduce the familiar comparison, map the relationship, and return to the target using its own terms. Learners should eventually explain inputs, operations and output without needing the recipe. Otherwise they may remember the comparison without mastering the concept.

Invite learners to challenge the analogy. Ask which part maps well and which part breaks. This exposes assumptions that a teacher may not notice. If several learners interpret the comparison differently, revise it or replace it with a concrete example. Do not respond by adding more unrelated details to rescue the story.

Keep the language respectful and culturally usable. Avoid stereotypes about people or communities as shortcuts for technical behaviours. Offer a text explanation alongside any visual, and make clear that the picture is illustrative rather than a literal depiction of how a system works.

Practice: build and audit an analogy in 20 minutes

Minutes 0–4: choose a concept and write its accurate definition from an approved source. Minutes 4–9: ask for two possible analogies, then choose one based on the intended relationship. Minutes 9–14: write three mappings and two limits. Minutes 14–20: design a question that tests the concept without mentioning the analogy.

Example task: explain a variable as a labelled storage location, using a labelled container as a tentative analogy. A mapping might connect the label to the variable name and the stored object to the current value. A limit is that programming-language rules differ: types, references and assignment are not fully explained by a physical container. Do not extend the analogy to memory addresses or object identity unless your source supports that explanation.

A simple concept question is: “After x is assigned 3 and then reassigned 8 in this pseudocode, what value does x have?” The answer is 8 under the stated reassignment semantics. The container story can support the introduction, but the final explanation should refer to assignment and current value.

Self-review: is the source comparison genuinely familiar to the intended learners? Are the mappings accurate and the boundaries explicit? Can the final question be answered using the target concept alone? Keep the mapping and limits with the lesson so future revisions do not silently turn an illustration into a technical claim.

Reusable prompt

Select and copy this template, or customise your own using the free builder.

Explain [target concept] for [audience] using this approved definition: [text]. Suggest two familiar analogies. For the better fit, provide a precise source-to-target mapping, two misleading inferences and where the analogy stops working. Then explain the concept directly without analogy and give one worked example plus a new practice question with its answer separated. Do not add unsupported technical facts.
Open the prompt builder →

Pause · Think · Check

Test your understanding

Choose one answer per question, then check your reasoning. This is practice; scores are not saved.

1. What is essential when using an analogy?
2. Which question best checks understanding after a recipe analogy for an algorithm?

Answer every question to check your results.

Sources and further reading

Continue learning

Browse this learning track →