Class 7 · CBSE AI · Strand C — NLP, Vision, and LLMs Deep-Dive
Prompt engineering as software engineering — for Class 7
Good prompting is a craft with patterns, like few-shot examples. Why it's real engineering. For Class 7.
Class 7 · CBSE AI · Strand C — NLP, Vision, and LLMs Deep-Dive
Good prompting is a craft with patterns, like few-shot examples. Why it's real engineering. For Class 7.
Recipe writing
A recipe that just says 'make biryani' would fail — a good recipe specifies quantity, sequence, timing, heat level, and what 'done' looks like. Prompt engineering is writing a recipe for an AI: the more precisely you specify the ingredients, process, and output, the more reliably the 'dish' comes out right.
Directing a school play
Telling an actor 'just act naturally' produces chaos. A good director gives the actor their character's motivation, tone, key lines, and what to do when they forget their lines. A system prompt is the director's brief — it shapes how the AI-actor behaves throughout the entire performance.
Every Dhee Learning session for this concept follows three stages. We share the questions Dhee actually asks, so you can hear what a session sounds like.
Stage 1 — Surface
You want an AI to write a bedtime story for a 5-year-old about a lost kitten. Compare these two prompts: Prompt A: 'Write a bedtime story.' Prompt B: 'Write a calming bedtime story for a 5-year-old in 200 words. The main character is a lost kitten named Mochi who finds her way home. End with Mochi falling asleep safely. Avoid scary words.' Which is better — and list every specific improvement Prompt B makes.
Rote answer
"Prompt B is more detailed and specific."
Understood
"Each addition in Prompt B removes a decision the AI would otherwise make randomly: audience (5-year-old) sets vocabulary and complexity; 200 words prevents it going too long; naming the character creates consistency; specifying the ending prevents an open-ended sad story; 'avoid scary words' handles a failure mode directly."
Stage 2 — Reasoning
Chain-of-thought prompting means asking the AI to 'think step by step' before answering. Why would adding this instruction to a maths word problem prompt make the answer significantly more likely to be correct?
Follow-up Dhee may use: If chain-of-thought helps, why not always use it for every prompt? What would be the downside for something like 'Translate this phrase to Tamil'?
Stage 3 — Application
You're engineering a prompt for a school admin chatbot that helps students check their library book due dates. Write a system prompt (the invisible instruction the chatbot receives at the start) that handles at least four possible failure modes.
Misconception Dhee watches for: Writing a single-sentence system prompt and expecting it to handle all edge cases — prompt engineering requires explicit anticipation of failure modes, not just describing the happy path.
Dhee turns this concept into a 15-minute spoken session — asking, listening, and probing — so your child builds the idea themselves.
Good prompting is a craft with patterns, like few-shot examples. Why it's real engineering. For Class 7.
Longer prompts are always better — overly long prompts can overwhelm the model's attention, burying critical instructions under noise; concision and structure matter.
Dhee opens with a question — for example: "You want an AI to write a bedtime story for a 5-year-old about a lost kitten. Compare these two prompts: Prompt A: 'Write a bedtime story.' Prompt B: 'Write a calming bedtime story for a 5-year-old in 200 words. The main character is a lost kitten named Mochi who finds her way home. End with Mochi falling asleep safely. Avoid scary words.' Which is better — and list every specific improvement Prompt B makes." — listens to your child's answer, then probes the reasoning behind it. The session ends when the child can apply the idea to a brand-new situation, not just recall it.