Can We Improve Educational Diagram Generation with In-Context Examples? Not if a Hallucination Spoils the Bunch
This study proposes a Rhetorical Structure Theory-based in-context learning method to improve educational diagram generation by reducing factual hallucinations and enhancing faithfulness to user context, though it acknowledges that LLM stochasticity still leads to variable quality and highlights a correlation between text complexity and hallucination rates.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: The "Overconfident Intern"
Imagine you hire a very smart, fast-talking intern (an AI) to draw diagrams for your computer science class. You give them a paragraph of text, and they immediately start drawing a flowchart or a network map.
The problem? This intern is overconfident. Sometimes, they don't just draw what you asked for; they invent facts that aren't in your text. They might add a step that doesn't exist or connect two things that have nothing to do with each other. In the paper, this is called "hallucination."
The researchers asked: Can we teach this intern to be more accurate by showing them examples of good work before they start?
The Solution: The "Rhetorical Blueprint"
The researchers tried a new method called In-Context Learning (ICL). Think of this as giving the intern a "cheat sheet" of examples before they start working.
However, just showing random examples wasn't enough. The intern might get confused by too much information. So, the researchers used a special rulebook called Rhetorical Structure Theory (RST).
The Analogy:
Imagine you are giving someone instructions to build a house.
- Standard AI: You just say, "Build a house." The AI might build a castle, a tent, or a house with no roof because it's guessing what you want.
- The RST Method: Before you ask the AI to build, you give it a blueprint of how the house is organized. You point out: "This part is the foundation (the main idea), and these are the rooms (supporting details)."
The researchers taught the AI to analyze the text like a linguist first. They asked the AI to break the text down into its "logical skeleton" (identifying the main points and how they connect) before drawing the diagram. Then, they showed the AI an example of a text that had a similar "skeleton" and how that text was turned into a perfect diagram.
The Experiment: The "Art Critic" Panel
To see if this worked, the researchers created 150 diagrams using two different AI models (GPT-4o and o3). They tested three ways of asking the AI:
- Zero-Shot: "Just draw it." (No examples).
- RST1: "Here is a text example and a diagram example. Now draw this new text."
- RST2: "Here is a text with a logical blueprint and a diagram example. Now draw this new text."
They then hired human experts (computer science teachers) to grade the diagrams on three things:
- Logic: Does the flow make sense?
- Connectivity: Are all the parts connected properly, or are there floating islands?
- Beauty: Is it messy with crossing lines, or is it clean and symmetrical?
The Results: What Worked and What Didn't
1. The "Blueprint" Helped, But Didn't Fix Everything
The method that used the "logical blueprint" (RST2) was better at keeping the AI honest. It reduced the number of times the AI made up facts that weren't in the original text. It was like the blueprint kept the intern from wandering off and building a garage when you asked for a kitchen.
2. The "Stochastic" Problem (The Coin Flip)
The paper notes that AI is stochastic, meaning it's a bit like rolling dice. Even with the same instructions, the AI might draw a great diagram today and a terrible one tomorrow. The quality varied wildly.
3. The "Bad News" About Complexity
When the text was simple, the AI did okay. But when the text was complex (like advanced computer science concepts), the AI started hallucinating more. It's like the intern gets overwhelmed by a complex request and starts making things up to fill the gaps.
4. The AI Can't Catch Its Own Mistakes
The researchers tried to have the AI "fix" its own diagrams after drawing them. Unfortunately, the AI was bad at this. It often failed to spot its own errors or introduced new ones while trying to fix the old ones. It's like asking a tired artist to critique their own painting; they often miss the obvious flaws.
5. The "Reasoning" Model Won
One of the AI models used in the study (called o3) performed significantly better than the other (GPT-4o). The paper suggests this is because the o3 model has better "reasoning" abilities—it can think through the steps more carefully before drawing, much like a student who takes a moment to think before answering a math problem.
The Bottom Line
The paper concludes that while using "logical blueprints" (RST) and examples helps reduce the AI's tendency to make things up, it doesn't solve the problem completely.
- Good news: The method makes the diagrams more faithful to the source text.
- Bad news: The AI still makes mistakes, especially with hard topics, and it can't reliably fix its own errors.
The researchers warn that because AI can still "hallucinate," we shouldn't just trust it blindly in education. Teachers and students need to double-check the diagrams, just like you would check an intern's work before handing it to a client.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.