AAI101 · Introduction to AI and Prompt Engineering · Unit 5
Prompt Engineering
Unit Scope & Exam Weightage: Prompt Engineering is the hands-on unit: what a prompt is, why the same model gives very different answers to different wording, and how to control that with clarity, context, specificity, role assignment and format instructions. It covers zero-shot, few-shot, chain-of-thought and role prompting, prompts for summarisation/explanation/code/report/brainstorming/translation, branch-specific prompts, and tool awareness. The two 2026-27 model papers carry 8 clusters worth 32 marks — the highest-tied unit in the paper — including 7m questions on summarisation and explanation, 5m applications of translation and domain-specific prompting, and repeated 2m questions on prompting techniques, format instruction and zero-shot prompting.
Front Page: Importance-Wise Topic Roadmap (2026-27 Model Papers)
| Priority | Topic (Exact Syllabus) | PYQs Asked | Marks Weightage | Tag |
|---|---|---|---|---|
| 1 | Prompt for different tasks — summarisation | 1 (2026-27 MP-S1) |
7m × 1 | High-Yield 7m |
| 2 | explanation | 1 (2026-27 MP-S2) |
7m × 1 | High-Yield 7m |
| 3 | translation | 1 (2026-27 MP-S1) |
5m × 1 | Application |
| 4 | Domain-specific prompting — students write prompts relevant to their own branch (CE, ME, BT, AG, etc.) | 1 (2026-27 MP-S2) |
5m × 1 | Application |
| 5 | Prompting techniques: | 2 (MP-S1, MP-S2) |
2m × 2 | Repeated Short |
| 6 | format instruction | 1 (2026-27 MP-S1) |
2m × 1 | Short |
| 7 | Zero-shot prompting — direct question | 1 (2026-27 MP-S2) |
2m × 1 | Short |
| 8 | What is a prompt — the instruction you give to an AI model, Why prompt quality matters — same AI, very different results with different prompts, Principles of good prompting — clarity, context, specificity, role assignment | 0 direct | — | Core Concept / Predicted |
| 9 | Few-shot prompting — give examples in the prompt, Chain-of-thought prompting — ask AI to think step by step, Role prompting — 'Act as a civil engineer and...', code generation, report writing, brainstorming | Integrated in #1–4 | — | Technique Bank |
| 10 | AI tools for engineers — GitHub Copilot (code), Grammarly (writing), Consensus (research), Wolfram Alpha, Canva AI, Notion AI Hands-on Practice (every lecture), Graded prompt assignment | 0 direct | — | Tool Awareness |
2-Hour Last-Night Survival Checklist:
- Prompt anatomy (memorise five slots): Role + Task + Context/Input + Format + Constraint. Example: "Act as a civil engineer. Summarise the inspection note in 5 bullet points, each under 12 words, using plain language for a site supervisor."
- Four techniques with one trigger phrase each: zero-shot = direct question with no example; few-shot = 2–3 worked input→output pairs; chain-of-thought = "think step by step, show each step"; role = "Act as a mechanical engineer…". Write a one-line example for every technique.
- Summarisation 7m answer: define → mechanism (identify key points, compress, preserve facts) → show a weak prompt vs improved prompt → give a worked 6-line note reduced to 3 bullets → state why the improved one is better.
- Translation 5m answer: state the rule (preserve meaning, terms and units; specify target language/audience), show source → term glossary → translated output, and report one correction made after review.
- Domain-specific 5m answer: write an actual branch prompt (CE crack report, ME maintenance schedule, AG spray plan) and compare with generic prompting: generic gives broad text, domain-specific uses the branch vocabulary and constraints.
1. What is a prompt and why prompt quality matters
Prompt (2 Marks): a prompt is the instruction, question or context given to an AI model to obtain an output. It may contain a role, the task itself, background data, examples and a required output format.
1.1 Same AI, Very Different Results
Weak prompt: "Tell me about concrete."
Improved prompt: "Act as a civil engineer. In 150 words, explain what M30 concrete grade means for a site supervisor, include the 28-day cube strength in MPa, and end with one quality-check point."
| Aspect | Weak prompt | Improved prompt |
|---|---|---|
| Role | None | Civil engineer |
| Specificity | Vague "tell me about" | Grade, audience, word count |
| Format | None | 150 words + one quality-check point |
| Likely output | Long generic essay | Focused, usable site explanation |
Why this happens: an LLM predicts the next likely token. A vague prompt leaves billions of possible continuations; constraints narrow the probability distribution toward the answer the user actually needs.
Examiner Tip: Always show a before/after pair. "Prompt quality matters because the model follows the instructions given" alone earns 1 mark; the pair plus the reason earns full marks.
2. Principles of good prompting — clarity, context, specificity, role assignment, format instruction
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '16px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart TD
A["ROLE<br/>who should answer"] --> B["TASK<br/>exact verb: summarise / compare / list"]
B --> C["CONTEXT<br/>data, assumptions, audience"]
C --> D["FORMAT INSTRUCTION<br/>table / bullets / JSON / word limit"]
D --> E["CONSTRAINT<br/>what to avoid, how to verify"]
E --> F["OUTPUT → CHECK → REFINE PROMPT"]
| Principle | Meaning | Engineering example |
|---|---|---|
| clarity | One unambiguous request, active verb | "List three causes of bearing overheating", not "say something about bearings" |
| context | Supply the necessary background | "The motor runs 12 h/day at 60°C ambient" |
| specificity | Numbers, units, scope, audience | "For a final-year CE student, in 100 words…" |
| role assignment | Ask the model to answer as an expert | "Act as a civil engineer and…" |
| format instruction | State exactly how the answer should look | "Return a 3-column table: cause |
format instruction (2 Marks): the part of a prompt that tells the AI how to present its answer — number of items, structure (table, bullets, code block), length, language and style. It does not change the underlying question; it controls the shape and usability of the response.
Examples: "Return exactly 5 bullets, each ≤12 words"; "Output a Markdown table with columns Symptom, Likely Cause, Test"; "Give Python code only, with no explanation"; "Answer in Hindi, under 80 words."
After-Topic PYQ (
2026-27 Model Paper (Set 1), 2 Marks): "Define format instruction and state its role in Prompt Engineering."
Answer: A format instruction specifies the output structure and limits (bullets, table, word count, language). Its role is to make the response directly usable — comparable across runs, easy to grade and easy to paste into a report — without changing the task being asked.
3. Prompting techniques: zero-shot, few-shot, chain-of-thought, role prompting
Prompting techniques: (2 Marks) repeatable ways of structuring a prompt to improve an LLM response: zero-shot (no example), few-shot (examples supplied), chain-of-thought (explicit step-by-step reasoning) and role prompting (expert persona).
3.1 Zero-shot prompting — direct question
Zero-shot prompting (2 Marks): asking the model to perform a task directly, without giving any worked example in the prompt. Example: "Classify this sensor note as urgent or routine: 'Crack widened to 3 mm at support.'"
3.2 Few-shot prompting — give examples in the prompt
Classify each note as URGENT or ROUTINE.
Note: "Crack width 0.2 mm, unchanged" → ROUTINE
Note: "Crack width 3 mm, increasing" → URGENT
Note: "Slight rust at railing, no section loss" → ROUTINE
Note: "Strain 61 με against baseline 42 με" →
The model completes the last line with URGENT by copying the demonstrated pattern.
3.3 Chain-of-thought prompting — ask AI to think step by step
Add: "Think step by step. Show the given data, the relation you use, the calculation, and then the final answer." This reduces skipped steps in arithmetic or diagnostic tasks. For a safety question, require "state assumptions before concluding".
3.4 Role prompting — 'Act as a civil engineer and…'
"Act as a civil engineer reviewing a site note. Identify the structural risk, cite the observation that supports it, and recommend an action within 24 hours." Role prompting narrows vocabulary and level of detail to the intended profession.
| Technique | When to use | Typical failure if misused |
|---|---|---|
| Zero-shot | Simple, well-defined tasks | Ambiguous output style |
| Few-shot | Consistent format/classification needed | Examples contain an error the model copies |
| Chain-of-thought | Multi-step reasoning/numericals | Long reasoning may still contain a false step — verify |
| Role | Domain-specific tone and depth | Role alone cannot supply missing facts |
Examiner Tip: A 2m question on "Prompting techniques:" should name at least three techniques and give one example phrase for each. A 7m answer adds the table and says which technique suits which task.
4. Prompt for different tasks
Prompt for different tasks — summarisation (7 Marks): asking a model to shorten a source while retaining its essential facts, decisions and numbers. The prompt must state the source, the audience, the length and what must not be lost.
4.1 summarisation — Worked Before/After
Source (6 lines): "Site note, 12 May. Beam B2 inspected. A diagonal crack of width 0.8 mm was observed near the left support. The crack length is about 120 mm. No spalling is visible. Strain gauge SG-4 reads 61 µε against a 42 µε baseline. Two anchor bolts show surface rust. Load testing is scheduled for Friday. The engineer recommends a follow-up survey within 7 days."
Weak prompt: "Summarise this."
Improved prompt: "Act as a civil engineer. Summarise the site note for a site supervisor in exactly 3 bullets of at most 12 words each. Keep all numerical values and the recommended action."
Output:
- Beam B2: 0.8 mm × 120 mm diagonal crack near left support.
- SG-4 strain 61 µε vs 42 µε baseline; two bolts rusted.
- Load test Friday; follow-up survey within 7 days.
Mechanism: identify key entities (beam, crack, readings, action) → drop repetition → preserve numbers and deadlines → compress wording to the requested length.
4.2 explanation
Prompt: "Explain why a transformer overheats, step by step, for a final-year EE student: list the physical cause, the measurable sign, and one protective action." Output should be ordered; ask for assumptions first.
4.3 code generation
Prompt: "Write a Python function stress_ok(stress, allowable) returning True when stress ≤ allowable and stress ≥ 0. Include one doctest. Output code only." Always review generated code for boundary conditions.
4.4 report writing and brainstorming
Report writing: "Draft a 1-page lab report structure for a concrete cube test with headings Aim, Apparatus, Procedure, Observations, Result, Precaution. Do not invent readings."
brainstorming: "List 10 low-cost ways to reduce laboratory water use; group them by engineering branch."
4.5 translation
Prompt: "Translate this safety notice from English to Hindi. Keep technical terms (crack, strain gauge, PPE) in parentheses in English. Use formal instructions, under 80 words." Preserve meaning, units, numbers and tone; never let the tool reinterpret safety requirements.
5. Domain-specific prompting — students write prompts relevant to their own branch (CE, ME, BT, AG, etc.)
Domain-specific prompting: writing a prompt that includes the vocabulary, data types, standards and decision constraints of a particular engineering branch, instead of asking a general question.
| Branch | Domain-specific prompt (ready to use) | Expected output |
|---|---|---|
| CE | "Act as a structural engineer. Given strain 61 µε vs 42 µε baseline and a 0.8 mm crack, list three possible causes with the evidence for each and one immediate action. Use a 3-column table." | Prioritised diagnosis table |
| ME | "Act as a maintenance planner. Given vibration RMS 3.7 mm/s against a 3.0 mm/s alarm, write a 4-step work order with the test that confirms each step." | Actionable maintenance order |
| BT | "Act as a biotech researcher. Compare two candidate molecules by binding score, toxicity flag and synthetic feasibility; return a ranked table and state one uncertainty." | Ranked shortlist |
| AG | "Act as an agronomist. Given soil moisture 18% and a leaf image showing brown spots, propose an irrigation and spray plan for one week with reasons." | Field plan |
| ECE | "Act as an electronics engineer. Given a board image with a bulged capacitor, list the likely failure mechanism and the measurement that verifies it." | Diagnostic checklist |
| CSE | "Act as a software reviewer. Review this Python function for null inputs and off-by-one errors; output numbered findings only." | Review findings |
Generic vs domain-specific: "Explain cracking" gives textbook prose; the CE prompt above uses measured values and requests an evidence table, so the answer can be checked against the site data.
Examiner Tip: In a 5m answer, include at least one numeric input in the prompt and state the expected output format. That is what distinguishes domain-specific prompting from ordinary role prompting.
6. AI tools for engineers and hands-on practice
| Tool | Purpose | Proper student use |
|---|---|---|
| GitHub Copilot (code) | Suggests code and tests from comments | Review logic, security and licence before accepting |
| Grammarly (writing) | Grammar and clarity checking | Keep technical meaning; reject changes that alter results |
| Consensus (research) | Finds and summarises research evidence | Open the cited paper; do not trust the summary alone |
| Wolfram Alpha | Computation and unit conversion | Cross-check the numerical result by hand |
| Canva AI | Design layouts and images | Disclose generated visuals |
| Notion AI | Notes, summaries, study plans | Verify dates and technical claims |
6.1 Hands-on Practice (every lecture): Students write prompts, compare outputs, refine and improve
Iteration loop: write prompt → run → compare against a checklist (correct facts? required format? right length?) → add missing context or format line → rerun → save the final prompt with its output. The syllabus calls this Notion AI Hands-on Practice (every lecture): Students write prompts, compare outputs, refine and improve; the tool name is illustrative — the assessed skill is the revision cycle and the recorded reason for each change.
6.2 Graded prompt assignment: write 5 prompts for an engineering problem from their own branch
Required set: (a) zero-shot; (b) few-shot; (c) chain-of-thought; (d) role prompting; (e) format-specific prompt. Submit prompt + AI response + evaluation of output quality. An additional reflection task asks the student to document one academic task completed with AI, what was verified/corrected and why, and one possible bias, privacy or integrity concern.
Examiner Tip / career link: Prompt engineering is already a job role, and engineers who can communicate precisely with AI have a measurable career advantage. In an exam, connect the claim to a skill: specifying role, context and format, then verifying the result.
7. Assignments, career context and teaching-learning methodology
7.1 Suggested assignments / practice tasks (syllabus wording)
The syllabus states Suggested Assignments / Practice Tasks but not limited to Assignment Task Assignment 1 (Unit I) Research task — no AI tool interaction required. The tasks below keep its wording while adding the exam skill each one tests.
| Assignment | Task wording from the syllabus | What to submit / what it tests |
|---|---|---|
| 1 (Unit I) | Find 3 real AI applications in your engineering branch. For each: name the product/system, what data it uses, and what it predicts or generates. | Submit as a one-page note (250– 300 words). Tests AI-awareness without tool use. |
| 2 (Unit II) | Concept-check task: Pick one real ML-based system relevant to your branch (e.g., a recommendation engine, a defect detector, a chatbot). Identify: (a) Is it supervised, unsupervised, or reinforcement learning? (b) What could cause it to overfit or underfit? (c) Sketch a simple diagram showing its inputs, a basic neuron/layer concept, and output. | Submit as a half-page note (200–250 words) with diagram. |
| 3 (Unit III) | Hands-on task — direct AI interaction required: Interact with any free LLM (ChatGPT/Gemini/Claude), Ask it a question related to your branch, Identify one correct and one incorrect (hallucinated) response, Explain why the hallucination occurred (150–200 words), with screenshots of both responses. | Tests verification and disclosure; attach both outputs. |
| 4 (Unit IV) | Group case study: Each group (3–4 students) picks one AI application in their domain, prepares a 2-minute presentation covering: problem → data → AI solution → impact. | Submit slides/notes plus a 1-page group summary handout. |
| 5 (Unit V) | Write 5 prompts for an engineering problem from your branch using: (a) Zero-shot (b) Few-shot (c) Chain-ofthought (d) Role prompting (e) Format-specific prompt. | Submit the prompt + AI response + your evaluation of the output quality as a single document (2–3 pages). |
| 6 (Unit V) | Use an AI tool to help complete one academic task (summarise a topic, generate a study plan, explain a concept, translate a text). Document the prompt used, output received, and how you verified/corrected it. | In a 200–300 word reflection, address: (a) what you changed or verified and why, and (b) one way AI use in this task could raise a bias, privacy, or academic-integrity concern. |
Assignment headers (verbatim, for quick revision): Assignment 2 (Unit II) Concept-check task; Assignment 3 (Unit III) Hands-on task — direct AI interaction required; Assignment 4 (Unit IV) Group case study: Each group (3–4 students) picks one AI application in their domain; Assignment 5 (Unit V) Write 5 prompts for an engineering problem from your branch using: (a) Zero-shot (b) Few-shot (c) Chain-ofthought (d) Role prompting (e) Format-specific prompt; Assignment 6 (Unit V) Use an AI tool to help complete one academic task (summarise a topic, generate a study plan, explain a concept, translate a text).
7.2 Career context
The syllabus describes the field in these words: Prompt Engineering is already a job role (avg. salary $100K+ globally) and Every engineer who can communicate well with AI has a significant career advantage. Treat the salary figure as the syllabus's illustrative wording, not a verified current market quote; the durable skill is specifying role, context, format and constraints, then checking the output.
7.3 Teaching-learning methodology
Teaching-Learning Methodology Every lecture begins with a real-world AI example — a news article, a product demo, or a live tool interaction. No heavy mathematics or programming — concepts are taught through analogies, diagrams, videos, and demonstrations. Unit V (Prompt Engineering) is entirely hands-on — students bring their laptops/phones and write prompts live in class. Group activities, branch-specific case studies, and AI tool explorations keep every session engaging. Teachers are encouraged to use AI tools themselves in class to demonstrate live prompting and critical evaluation of AI outputs.
Examiner Tip: For a career or methodology question, name one concrete classroom action (live prompt, before/after comparison, screenshot-based verification). That converts a slogan into an assessable answer.
Solved Exam-Ready Questions (Verbatim Model-Paper Wording)
Solved Q1 (2026-27 Model Paper (Set 1), 2 Marks)
Q: "Define format instruction and state its role in Prompt Engineering."
Solution:
- Definition: A format instruction tells the AI how to present the answer — e.g., "exactly 3 bullets", "table with columns Cause | Evidence | Fix", "code only", "under 80 words in Hindi".
- Role: It converts a free-form response into a predictable, gradeable artefact and reduces irrelevant text, while leaving the actual task unchanged.
Solved Q2 (2026-27 Model Paper (Set 1), 2 Marks)
Q: "Define Prompting techniques: and state its role in Prompt Engineering."
Solution:
- Definition: Prompting techniques are structured strategies — zero-shot, few-shot, chain-of-thought and role prompting — for phrasing instructions so the model produces a more reliable answer.
- Role: They give the user control over style, reasoning depth and domain vocabulary; for example, few-shot fixes output format and chain-of-thought makes intermediate steps visible for checking.
Solved Q3 (2026-27 Model Paper (Set 1), 7 Marks)
Q: "Explain Prompt for different tasks — summarisation with its definition, mechanism, and one worked application from Prompt Engineering."
Solution:
- Definition (1m): A summarisation prompt asks the model to compress a source to its essential facts, decisions and numbers for a stated audience.
- Mechanism (2m): model identifies key entities → removes repetition → preserves numbers and actions → enforces the requested length/format.
- Worked application (3m): use the six-line bridge site note in Section 4.1. Improved prompt: "Act as a civil engineer. Summarise for a site supervisor in exactly 3 bullets of at most 12 words; keep all numerical values and the recommended action." Output: (i) 0.8 mm × 120 mm crack near left support; (ii) SG-4 61 µε vs 42 µε, two rusted bolts; (iii) load test Friday, survey within 7 days.
- Result (1m): The constrained prompt kept every safety-critical number; "Summarise this" would likely omit them.
Solved Q4 (2026-27 Model Paper (Set 1), 5 Marks)
Q: "Apply translation to an examination problem from Prompt Engineering: state the rule, show the working, and report the result."
Solution:
- Rule: A translation prompt must specify source text, target language, audience/tone, preservation of technical terms, numbers and units, and a length limit. Meaning and safety requirements outrank literary style.
- Working: Source: "Crack width 3 mm; do not load the beam until the engineer approves." Prompt: "Translate to Hindi. Keep 'crack' and 'engineer' in parentheses in English, retain '3 mm', use formal instruction, under 40 words." Draft output checked for the number, the negation ("do not load") and the term parentheses; a draft that omitted "do not" is rejected.
- Result: Correct Hindi instruction with "3 mm" and the prohibition intact — the model was directed to preserve safety-critical content rather than paraphrase it.
Solved Q5 (2026-27 Model Paper (Set 2), 2 Marks)
Q: "List the two scored features of Prompting techniques: expected in Prompt Engineering."
Solution:
- They are repeatable prompt structures (zero-shot, few-shot, chain-of-thought, role) that change how an LLM interprets a task.
- Each technique has a distinct purpose: few-shot stabilises format, chain-of-thought exposes reasoning, role sets expertise, zero-shot is fastest for simple tasks.
Solved Q6 (2026-27 Model Paper (Set 2), 2 Marks)
Q: "List the two scored features of Zero-shot prompting — direct question expected in Prompt Engineering."
Solution:
- No worked examples are supplied; the task is stated directly in the prompt.
- It is quick and useful for simple, unambiguous tasks but gives less control over output style than few-shot prompting.
Solved Q7 (2026-27 Model Paper (Set 2), 7 Marks)
Q: "Derive or outline explanation step by step, include a suitable comparison, and state the examiner result for Prompt Engineering."
Solution:
- Step 1 — Name the task: ask for an explanation, not a summary ("Explain why a transformer overheats").
- Step 2 — Set the audience: "for a final-year EE student" fixes vocabulary depth.
- Step 3 — Demand structure: "list cause → measurable sign → protective action" prevents a wandering answer.
- Step 4 — Add reasoning instruction: "think step by step; state assumptions first" (chain-of-thought).
- Step 5 — Add format/constraint: "numbered list, 3 items, no invented values".
- Comparison: an explanation prompt requires causal links and reasoning; a summarisation prompt only compresses existing text. Few-shot helps format, chain-of-thought helps causal steps.
- Examiner result: A step-structured explanation prompt yields a checkable, ordered answer; the user still verifies each technical claim.
Solved Q8 (2026-27 Model Paper (Set 2), 5 Marks)
Q: "Compare the use of Domain-specific prompting — students write prompts relevant to their own branch (CE, ME, BT, AG, etc.) with one neighbouring idea in Prompt Engineering, then solve a short case."
Solution:
- Comparison: Domain-specific prompting supplies branch data, vocabulary and decision constraints; neighbouring idea "role prompting" only supplies a persona ("Act as a civil engineer"). A role alone does not include the measured strain or the required table, so the answer can stay generic.
- Short case: ME student asks (a) "Act as a maintenance engineer. Vibration RMS is 3.7 mm/s against a 3.0 mm/s alarm and bearing temperature is 72°C. Give a 4-step work order with a confirming test for each step." (b) "Act as a maintenance engineer. My bearing is warm. What should I do?" Output (a) names the deviation, recommends shutdown window, lubrication check, spectrum analysis and alignment check; output (b) is generic advice.
- Result: Including branch data and format converts a persona prompt into an actionable engineering output; always verify the recommended tests against the lab or site procedure.
Practice Questions (Self-Test)
- (2 Marks) Write one zero-shot and one few-shot prompt for classifying a motor note as urgent/routine.
- (2 Marks) Give two examples of a format instruction.
- (5 Marks) Write a domain-specific prompt for an AG student with soil moisture data and state the expected output format.
- (5 Marks) Improve the prompt "Explain cracks" by adding role, context, specificity, format and constraint.
- (7 Marks) Summarise a six-line site note of your choice into three bullets using a constrained prompt, and explain why the constraints matter.
- (7 Marks — Predicted) Write five prompts (zero-shot, few-shot, chain-of-thought, role, format-specific) for one engineering problem from your branch and state how you would evaluate each response.