PenLeap, our in-house edtech product, generates Class 9 vocabulary drills in 7 Indian languages — English, Hindi, Bengali, Tamil, Telugu, Marathi and Gujarati. Early on, our free-generation prototype invented a Tamil "synonym" that was not a word, and a Hindi antonym that meant the opposite of what it claimed. We rebuilt the pipeline around retrieval-grounded generation and a 4-stage validator. Across 41,000 drills generated in June 2025, our human reviewers caught hallucinations in 0.7% of items — down from 11% in the first prototype. This is exactly how that pipeline works.
41,000
Drills Generated (Jun 2025)
0.7%
Hallucination Rate (from 11%)
4
Validation Stages Per Item
## The Answer in 60 Words
We never ask the model to invent vocabulary. We retrieve a verified word, its part of speech, and 2-3 attested example sentences from a curated per-language lexicon, then the model only rewrites and contextualises that grounded data into a drill. Every generated item passes a dictionary check, a back-translation check, a part-of-speech check, and a duplicate check before a student ever sees it.
## Why This Matters Now
A wrong synonym in an English drill is a bad question. A wrong synonym in a Tamil or Bengali drill, where the student's parent may not catch the error, quietly teaches the wrong thing. Multilingual language models are still weakest on low-resource Indian languages — the [code-switching ASR and NLP literature](https://arxiv.org/pdf/2104.00235) documents how Hindi, Marathi, Tamil, Telugu and Bengali have far less clean training data than English. So a model confident in English will confabulate in Telugu and sound just as confident. For an exam-prep product, that confidence is the danger. We built PenLeap on the assumption that the model lies fluently in every language, and engineered around it.
## What "Hallucinating" Actually Means in a Vocabulary Drill
🆕
Invented Word
The model outputs a string that looks like a Tamil or Telugu word but is not attested in any dictionary. Fluent morphology, zero meaning. The single most dangerous failure.
↔️
Wrong Relation
A real word, but labelled as a synonym when it is an antonym, or a near-synonym with the wrong register. Common across Hindi formal vs. colloquial pairs.
🏷️
Wrong Part of Speech
An adjective offered as a synonym for a verb. The drill is unanswerable because no option fits the sentence frame grammatically.
📚
Out-of-Syllabus Word
A correct, real word — but one a Class 9 student will never meet. Technically right, pedagogically useless, and it tanks confidence.
## The Architecture: Retrieve First, Generate Never (For Facts)
The core decision: the model is a phraser, not a knowledge source. Here is the data flow for one drill.
1
Pick a target word from the curated lexicon
Each language has a vetted word bank tagged by CBSE/state-board Class 9 frequency. The word, its part of speech, and 2-3 attested example sentences come from the lexicon — not the model. For English we seed from WordNet plus a board-aligned list; for Indian languages from IndoWordNet and human-curated additions.
2
Retrieve verified synonyms and antonyms
We pull the candidate relations from the lexicon, each with a confidence score. The model receives this as grounded context. It is explicitly told: choose only from these options, do not add new words.
3
Generate the drill stem and distractors
The model writes a fill-in-the-blank sentence at Class 9 reading level and arranges the retrieved correct answer plus 3 retrieved distractors. It rewrites; it does not retrieve facts. Output is constrained to a strict JSON schema so a malformed item is rejected at parse time.
4
Run the 4-stage validator
Every option in the item is checked against the dictionary, back-translated for meaning, verified for part of speech, and de-duplicated against the last 5,000 items. Any failure quarantines the drill for human review instead of shipping it.
## The 4 Guardrails (In Order of How Many Hallucinations They Catch)
Forcing the model to fill a strict schema and rejecting anything that fails validation is one of the [seven guardrails practitioners use to cut LLM hallucinations](https://medium.com/@Nexumo_/7-guardrails-that-reduce-llm-hallucinations-78facbb0d560). We stack four, in sequence, and log which one fires.
1. Dictionary membership (catches ~62% of bad items). Every word in the option set must exist in that language's lexicon. An invented Tamil string fails here instantly. This single check killed the majority of our prototype's failures, because invented words were the dominant mode.
2. Back-translation agreement (catches ~21%). We translate the supposed synonym back to English with an independent model and compare against the target word's English gloss using embedding similarity. If "huge" is offered as a synonym for "tiny," the back-translation disagrees and we flag it. This catches the wrong-relation class that survives the dictionary check.
3. Part-of-speech match (catches ~11%). The correct answer and the target must share a part of speech. A noun cannot be the answer to a verb-shaped blank. We run a lightweight POS tagger per language; for Indian languages we fall back to the lexicon's stored tags where the tagger is unreliable.
4. Duplicate and near-duplicate check (catches ~6%). We hash the normalised stem and embed it, then reject anything within a cosine threshold of the last 5,000 shipped items. A student grinding 50 drills should not see the same sentence twice with one word swapped.
The lesson that cost us a week: we first ran back-translation with the same model that generated the drill. It happily "confirmed" its own hallucinations. Use an independent model for the verification step, or the check is theatre.
## How We Built the Per-Language Lexicons
This is the unglamorous 70% of the work. A model is only as honest as the data you ground it in.
- Seed each language from an open lexical database — WordNet for English, IndoWordNet for Hindi, Bengali, Marathi, Tamil, Telugu and Gujarati.
- Filter to a Class 9 frequency band so out-of-syllabus words never enter the candidate pool.
- Add board-specific vocabulary our content team pulled from the last 5 years of question papers.
- Tag every entry with part of speech, register (formal/colloquial), and at least one attested example sentence.
- Have a native-speaker reviewer sign off on each language's first 2,000 entries before any generation runs.
- Store a confidence score per relation so the generator prefers high-confidence synonyms.
We treat the lexicon as the product and the model as a thin presentation layer. When PenLeap improves, it is usually because the lexicon got better, not because we swapped models. This is the same retrieval-grounded pattern our
AI and automation team ships for enterprise clients who cannot tolerate a confidently wrong answer in a regulated workflow.
## When Not to Use This Approach
Retrieval-first generation is the right call when a wrong answer is expensive — exams, medical, legal, finance. It is overkill when you want a brainstorm, a rough draft, or a creative riff, where the model's free generation is the point. If you are building a casual chat feature, do not bolt a 4-stage validator onto it; you will spend more on verification than the feature is worth and frustrate users with latency. The cost of grounding is real: each PenLeap drill costs about 3x the tokens of naive generation. We pay it because the alternative is teaching a child a word that does not exist.
## Real Example: The Telugu Antonym That Started This
In our April 2025 prototype, a Class 9 Telugu drill asked for the antonym of a common adjective and offered four options. The "correct" answer the model marked was a near-synonym, not an antonym — a subtle, fluent, completely wrong item. A reviewer in Hyderabad caught it. We pulled the logs and found the model was generating relations from its own weights, not from any source. That single item is why the back-translation guardrail exists. PenLeap now grounds every relation; the pattern is the same one we describe in our deep-dive on
generating 800 personalised Class 9 vocabulary drills with vector retrieval, which extends this engine to per-student personalisation. You can see the live product at
PenLeap.
Build note: we log which guardrail fired for every quarantined item. That log is our roadmap — when stage 2 fires a lot for one language, it means our lexicon's relations for that language need work, and we route a reviewer there.
## Frequently Asked Questions
### How does PenLeap stop the AI from inventing words in Tamil or Telugu?
It never lets the model supply vocabulary. Every word in a drill is retrieved from a curated, native-speaker-verified lexicon, and the model only writes the sentence around those words. A dictionary-membership check then rejects any option not in the lexicon, so an invented string cannot reach a student.
### What is the actual hallucination rate?
Across 41,000 drills generated in June 2025, human reviewers found hallucinations in 0.7% of items, down from 11% in our first ungrounded prototype. Those 0.7% are quarantined before shipping, so the rate students experience is effectively zero.
### Why not just use a bigger, better model?
A bigger model is more fluent in low-resource Indian languages, which makes its hallucinations harder to spot, not rarer. Fluency and factual accuracy are different axes. We saw confident, well-formed wrong answers from every model we tested, which is why we ground in data instead of trusting model scale.
### Which Indian languages does PenLeap support for Class 9 vocabulary?
English, Hindi, Bengali, Tamil, Telugu, Marathi and Gujarati. Each has its own curated lexicon and native-speaker review pass. We prioritised these seven by student demand across CBSE and state boards.
### Can you build a retrieval-grounded generator for our domain?
Yes. The pattern — retrieve verified facts, let the model only phrase them, validate before shipping — applies to any domain where a wrong answer is costly. We have shipped it for exam prep, internal knowledge bases, and regulated workflows. The first call is technical, with the engineer who would lead it.
### How long did the lexicon work take versus the model work?
Roughly 70% of the effort went into building and verifying the seven lexicons; about 30% into the generation and validation code. The model is the easy part. The honest, board-aligned word banks are the moat.
Need an AI feature that can't afford to be confidently wrong?
We build retrieval-grounded generation pipelines for Indian SMBs and edtech teams in 3-5 weeks. Typical cost: ₹6L-₹14L for a production v1 with validation and human-review tooling. Suitable if a hallucinated answer in your product would cost you trust or compliance. No slides — just your problem and our honest take. Reach us at contact@softechinfra.com.
Book a 20-min Call