0% found this document useful (0 votes)
3 views26 pages

Module2 Notes

Module 2 focuses on Prompt Engineering, covering its definition, evolution, types, and techniques for effective communication with AI models. It emphasizes the importance of crafting specific prompts to achieve high-quality outputs and outlines a five-step framework for designing prompts. The module also highlights the growing relevance of Prompt Engineering as a career skill in the AI job market.

Uploaded by

yashusuma7779
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views26 pages

Module2 Notes

Module 2 focuses on Prompt Engineering, covering its definition, evolution, types, and techniques for effective communication with AI models. It emphasizes the importance of crafting specific prompts to achieve high-quality outputs and outlines a five-step framework for designing prompts. The module also highlights the growing relevance of Prompt Engineering as a career skill in the AI job market.

Uploaded by

yashusuma7779
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module 2: Prompt Engineering BBAIAK203 (2025–26)

MODULE 2 — NOTES

Introduction to Prompt Engineering &


Prompt Engineering Techniques

Topics Covered Reference Book

Introduction to PE Prompt Engineering: Empowering Communication (Ajantha


· Evolution Devi Vairamani & Anand Nayyar, CRC Press)
· Types of Prompts
· How PE Works
· Role in Communication
· Advantages
· Future of LLMs
· PE Techniques
· Instructions
· Zero/One/Few-Shot
· Self-Consistency

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

PART A
Introduction to Prompt Engineering
Modules: Overview · Evolution · Types · How It Works · Communication · Advantages · Future

1. Introduction to Prompt Engineering

1.1 Understanding the AI Ecosystem: AI · LLM · GenAI

Before diving into Prompt Engineering, it is essential to understand the three key terms that form its foundation.
These are often used interchangeably but are distinct concepts that sit in a nested relationship with each other.

Artificial Intelligence is the broad field of computer science that aims to build
machines capable of performing tasks that would normally require human
AI
intelligence — such as learning, reasoning, problem-solving, perception, and
language understanding. AI is the umbrella term under which all other concepts sit.

A Large Language Model (LLM) is a specific type of AI model trained on massive


amounts of text data. It learns statistical patterns in language to understand,
LLM
process, and generate human-like text. Examples: ChatGPT (OpenAI), Gemini
(Google), Claude (Anthropic), Llama 3 (Meta), Krutrim (Ola).

Generative AI (GenAI) is a branch of AI that creates new, original content — text,


GenAI images, audio, video, code — based on patterns learned from training data. GenAI
uses LLMs (for text) and diffusion models (for images) as its backbone.

Classroom Analogy: School, Teacher, Creative Writer


AI = The entire school system — many departments, many subjects.
LLM = The English language teacher — expert in understanding and writing language.
GenAI = The creative writing teacher — not only understands language but actively creates poems,
stories, essays, scripts.

India-Relevant Examples (2026): Google Maps routing (AI) · ChatGPT answering queries (LLM) · Sarvam AI
writing in Hindi/Kannada (GenAI) · Krutrim by Ola — India's own LLM · Bhashini — Government NLP for 22
Indian languages.

1.2 What is a Prompt?

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

A prompt is the input instruction, question, command, or example that you give to
Prompt an AI model to guide it toward producing a specific, desired output. It is the
primary communication channel between a human and an LLM.

A prompt can take many forms:


• A question: "What are the main causes of air pollution in Indian cities?"
• A command: "Write a professional email to a professor apologising for absence."
• A completion: "The three branches of Indian government are..."
• A conversation: "I am a student preparing for UPSC. Help me understand Article 370."

Key Principle
The quality of an AI's output is directly proportional to the quality of the prompt. A vague prompt
produces a vague answer. A specific, well-crafted prompt produces a precise, useful answer. This is the
core motivation for Prompt Engineering.

1.3 What is Prompt Engineering?

Prompt Engineering is the systematic practice of designing, refining, and


Prompt optimising prompts to guide AI language models to produce the most accurate,
Engineering relevant, and high-quality outputs for a given task. It is both a technical skill and a
communicative art.

Prompt Engineering involves:


• Clarity: Being explicit about what you want, how you want it, and for whom.
• Context: Providing background information the AI needs to generate relevant output.
• Constraints: Setting limits — word count, format, tone, audience level.
• Creativity: Using creative structures like role-play, examples, and conditional logic to unlock the AI's full
potential.

Why is Prompt Engineering a Career Skill in 2026?


India's ₹10,371 Crore IndiaAI Mission identifies Prompt Engineering as a core workforce skill. Major
companies — Infosys, TCS, Wipro, Amazon India — now list 'AI Prompt Specialist' and 'LLM
Integration Engineer' as active job roles. Salaries for Prompt Engineers range from ₹8 LPA to ₹35 LPA
in 2025–26.

2. The Evolution of Prompt Engineering

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Prompt Engineering did not emerge overnight. It evolved over six decades of research in natural language
processing, human-computer interaction, and machine learning. Understanding this evolution helps us appreciate
why modern prompting techniques work the way they do.

Year /
Milestone Description Significance for Prompting
Era

1966 ELIZA (Joseph First natural language chatbot. Used Earliest form of prompt-response
Weizenbaum, MIT) simple pattern-matching rules (ELIZA interaction. Showed that humans
effect) to simulate a therapist naturally anthropomorphise text-
conversation. based systems.

1970s SHRDLU (Terry An NLP system that could interpret Demonstrated that structured,
Winograd, Stanford) English commands to manipulate specific instructions (early prompts)
objects in a virtual 'blocks world'. produce reliable AI behaviour.
Could reason about spatial Specificity matters.
relationships.

1980s–90s Expert Systems & Rule-based AI systems using IF- Template-based prompting
ALICE / Jabberwacky THEN logic. ALICE used AIML emerged. Conditional logic in
scripts for open-ended conversation. prompts was first explored at scale.
Jabberwacky learned from interaction.

2000s Statistical NLP & Models like Madalyn and Galatea Foundation for structured prompt
Template Approaches used user input to fill predefined engineering. Proved that anchoring
templates. IBM's Watson used AI to known templates improves
structured queries to win Jeopardy accuracy.
(2011).

2017 Transformer Vaswani et al. (Google) introduced Made large-scale language models
Architecture the Transformer model — using self- feasible. Without Transformers,
('Attention is All You attention mechanisms instead of modern LLMs like GPT-4 would
Need') RNNs. Revolutionary shift in NLP. not exist. Prompt engineering
became meaningful.

2020 GPT-3 (OpenAI, OpenAI's GPT-3 demonstrated Few-Shot and Zero-Shot Prompting
175B parameters) remarkable few-shot and zero-shot were formally established as
capabilities — performing tasks from techniques. 'Prompt Engineering' as
brief prompt examples alone. a discipline was born.

2022 ChatGPT & ChatGPT (GPT-3.5) launched Prompt Engineering became a


InstructGPT / RLHF November 2022 — 1 million users in mainstream skill. System prompts,
5 days. RLHF (Reinforcement instruction-following, and chain-of-
Learning from Human Feedback) thought emerged.
made AI follow instructions better.

2023–24 GPT-4, Gemini, Multimodal LLMs (text + image + Prompt techniques diversified:
Claude, Llama, audio). Open-source models (Llama 3, chain-of-thought, tree-of-thought,
Mistral Mistral) democratised access. India's self-consistency, RAG-based
Sarvam AI and Krutrim launched. prompting.

2025–26 Agentic AI & AI Agents use dynamic, multi-step Prompt Engineering evolves from
Autonomous prompts to take actions independently craft to science. Self-generating
Prompting (browsing, coding, booking). Auto- prompts, adaptive prompts, and
prompt generation systems emerged. agent orchestration are frontier
areas.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

India's Prompting Journey — Key Milestones


2022: Bhashini launched by Government of India for Indian language NLP across 22 languages.
2023: IIT Madras releases IndicTrans2 — state-of-art translation model for Indian languages.
2024: Krutrim AI (Ola) — India's first AI unicorn startup, specialising in Indian language LLMs.
2025: Sarvam AI's Sarvam-1 — 2B parameter model trained on Indian text corpus, supports 10
languages.
2026: IndiaAI Mission invests ₹10,371 Cr for AI compute, data, and skill development including Prompt
Engineering.

3. Types of Prompts

Prompts can be classified based on how they are written and the role they play in guiding the AI's behaviour. There
are three primary types, each serving a distinct purpose in different contexts.

3.1 Natural Language Prompts

Natural Language Prompts are written in plain, everyday human language. They are conversational and intuitive,
designed to mimic how a person would naturally ask a question or give an instruction. These are the most common
type of prompts used by everyday users.

Characteristics: Informal or semi-formal language · No special syntax required · Resembles human


conversation · May be a question, statement, or request.

Natural Language Prompt — Example 1

Prompt: Can you explain how photosynthesis works?

AI Output: Photosynthesis is the process by which plants use sunlight, water, and carbon dioxide to produce
glucose and oxygen. It occurs primarily in the chloroplasts of plant cells...

Natural Language Prompt — India Example

Prompt: Explain the importance of the Ganga river to Indian civilization in simple language.

AI Output: The Ganga (Ganges) is India's most sacred and historically significant river. It originates from the
Gangotri glacier in the Himalayas and flows 2,525 km through northern India...

Best Used For: Quick questions, explanations, summaries, creative writing, casual chat assistants, educational
Q&A tools.
Limitation: Vague natural language prompts often produce generic, unfocused outputs. The more specific your
natural language, the better the result.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

3.2 System Prompts

System Prompts are pre-written instructions or templates that define the AI model's behaviour, persona, tone,
format, and constraints before any user interaction begins. They are used by developers and businesses to configure
the AI for a specific use case.

Characteristics: Written once and applied consistently · Define the AI's role (persona) · Set rules the AI must
follow throughout the conversation · Often invisible to end users in deployed products.

System Prompt — Banking Chatbot

Prompt: You are a formal customer service agent for HDFC Bank. Always respond in professional English.
Never share any account details, OTP, or passwords. If the user appears distressed, offer to connect them to a
human agent.

AI Output: User asks: How do I reset my UPI PIN? → AI responds professionally with bank-safe steps,
never mentioning sensitive account data.

System Prompt — VTU Student Assistant

Prompt: You are an academic assistant for VTU Belagavi students. Answer only questions related to VTU
curriculum, exams, and academic rules. Always cite the relevant VTU circular or regulation when possible.
Keep answers under 150 words.

AI Output: User asks: What is the passing criteria for BETC105? → AI gives concise, VTU-specific answer
with regulation reference.

Industry Use in India: Paytm chatbot · IRCTC helpdesk bot · Flipkart seller assistant · DigiLocker FAQ agent
· Apollo 24/7 health advisory · Swiggy support agent — all use system prompts to constrain AI behaviour.

3.3 Conditional Prompts

Conditional Prompts set explicit IF-THEN logic that directs the AI to behave differently based on specific
conditions or inputs. They are essentially programming logic expressed in natural language, allowing a single
prompt to handle multiple scenarios.

Characteristics: Uses logical conditions (If X, then Y) · Can branch into multiple response paths · Often
combined with system prompts for sophisticated bots · Reduces the need for multiple separate prompts.

Conditional Prompt — E-Commerce Support

Prompt: If the user asks about order tracking, provide the tracking steps. If the user asks about returns,
explain the 7-day return policy. If the user expresses frustration or anger, apologise and offer to escalate to a
human agent.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

AI Output: Handles 3 different user intents with a single, well-designed conditional prompt — exactly how
Meesho and Amazon India route customer queries.

Conditional Prompt — Healthcare Bot

Prompt: If the user mentions chest pain or difficulty breathing, immediately advise them to call 112 (India
emergency) and do NOT provide medical advice. For general health queries, answer based on WHO and ICMR
guidelines.

AI Output: Safety-first conditional prompt used by medical apps like Practo and 1mg to prevent AI from
giving dangerous advice in emergencies.

Summary: Three Types at a Glance


• Natural Language: Conversational, intuitive, used by everyday users for Q&A and explanation.
• System: Pre-configured rules defining the AI's persona and constraints — used by developers.
• Conditional: IF-THEN logic for multi-scenario handling — used for sophisticated chatbots and
automation.

4. How Does Prompt Engineering Work?

Prompt Engineering is not a one-time action — it is an iterative, systematic process. Understanding the step-by-step
framework helps you design prompts that consistently produce high-quality outputs from any LLM.

4.1 The 5-Step Prompt Engineering Framework

Understand the Task Thoroughly

Before writing a single word, be crystal clear about what you want the AI to produce. Ask
yourself: What is the exact output I need? Who is the audience? What format should the output
STEP be in?
1
Bad: "Tell me about space."
Good: "Explain India's Chandrayaan-3 mission to a 1st year engineering student in 5 bullet
points, focusing on technical achievements."

STEP Use Precise and Simple Language


2
Avoid technical jargon unless the AI needs to operate in a technical domain. Use direct,
unambiguous language. Every word in your prompt signals something to the model.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Vague: "Create a response to the inquiry."


Precise: "Write a formal 3-sentence reply to a student asking about the VTU re-evaluation
process. Mention the official VTU portal."

Add Specific Details, Context & Constraints

Context dramatically improves AI output quality. Include: audience level, output format, length,
STEP tone, and any domain-specific constraints the AI must respect.
3
General: "Write a story."
Detailed: "Write a 200-word short story for Class 10 students about a robot helping farmers in
rural Karnataka. Use simple language. End with a positive message about technology."

Provide Examples (Few-Shot Guidance)

Showing the AI one or more example inputs and outputs dramatically guides its understanding
STEP of the pattern, format, and quality you expect. This is the foundation of Few-Shot Prompting.
4
Without Example: "Summarise this article."
With Example: "Summarise in 3 bullet points, like this: • Key finding 1 • Key finding 2 • Key
finding 3. Now summarise: [article text]"

Experiment, Iterate & Refine

Prompt Engineering is inherently iterative. Your first prompt will rarely produce the perfect
output. Test different phrasings, add or remove context, change the format, and iterate until you
STEP achieve the desired result.
5
Iteration Example: "Rephrase the previous answer in simpler language for a 1st semester
student." or "Make the response shorter and add a real Indian example."
Each iteration is a learning step — you are teaching the AI (and yourself) what the ideal output
looks like.

Step Key Action Core Question to Ask India-Relevant Example

1— Clarify goal & What exactly do I need? "Explain ISRO achievements to 1st year B.E.
Understand output students in 5 points"

2 — Precise Use clear, direct Is every word doing its job? "Write a formal email" not "Create a response to
Language language inquiry"

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

3 — Add Include context & Have I given enough "200 words, simple English, Karnataka farming
Details constraints context? context"

4 — Give Show desired Does the AI know the "Summarise like this: • Point 1 • Point 2 • Point
Examples format pattern? 3"

5 — Iterate Test, refine, Can this output be better? "Simplify this for a student who missed the
improve class"

5. Role of Prompt Engineering in Communication

Prompt Engineering fundamentally transforms how humans communicate with AI systems. It is not merely a
technical skill — it is a new form of human-computer communication that has profound implications for how we
write, think, and interact with information systems in 2026 and beyond.

5.1 Improving Specificity and Clarity

One of the primary functions of prompt engineering in communication is the elimination of ambiguity. When
humans communicate with each other, we rely on shared context, body language, tone of voice, and years of social
learning to fill in the gaps in our language. AI models do not have this shared context — every instruction must be
explicit.

Well-engineered prompts force the communicator to think precisely about what they want. This discipline of precise
communication has value beyond AI — it makes you a better writer, thinker, and professional communicator.

Ambiguous Communication Precise Communication


"Write an email about the meeting." "Write a formal email to Prof. Ravi apologising for
AI response: Generic meeting email with no missing the AI lab session on Monday. Mention
relevant details. illness. Keep it under 60 words. Professional tone."
Problem: Which meeting? To whom? What tone? AI response: Targeted, appropriate, ready to send.
When?

5.2 Increasing Creativity and Engagement

Prompt Engineering is equally a tool for unlocking AI creativity. By crafting open-ended, imaginative, and well-
contextualised prompts, communicators can generate creative content — marketing copy, story plots, design
concepts, educational material — that would take human teams hours to produce.

Creative Communication Prompt

Prompt: Write a catchy 2-line tagline for a Bengaluru tech startup called 'NammaRide' that uses AI to reduce
auto rickshaw wait times in Bengaluru. Tone: witty, modern, appealing to young urban professionals.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

AI Output: NammaRide: Where your next auto is already on the way. | AI-powered rides, Bengaluru speed.

5.3 Adapting Communication Styles

Different contexts require different communication styles. Prompt Engineering allows the same AI to switch
seamlessly between formal, casual, technical, persuasive, empathetic, and instructional tones — based entirely on
how the prompt is constructed.

Context Prompt Instruction Expected Tone India Example

Academic "Explain GST in formal Formal, technical, Suitable for law or commerce
academic English for a structured assignments
university report."

WhatsApp "Explain what happened at the Casual, short, emoji- Students sharing science news
ISRO launch in simple friendly
WhatsApp language."

Persuasive "Write a persuasive appeal for Enthusiastic, Club recruitment drive


signing up for the AI Club at motivating, call-to-
Atria Institute." action

Empathetic "A student failed an exam. Write Warm, encouraging, Peer support communication
a supportive WhatsApp message personal
from a friend."

5.4 Overcoming Language Barriers

India is a country of 22 official languages and hundreds of dialects. Prompt Engineering combined with multilingual
LLMs (especially Bhashini, IndicTrans2, and Sarvam AI) is breaking down language barriers in government
services, healthcare, agriculture, and education at an unprecedented scale.

Multilingual Communication Prompt

Prompt: Translate this government notice about PMKVY scheme benefits from English to Kannada. Keep the
language simple so a rural farmer can understand it. Avoid technical jargon.

AI Output: Kannada translation of the government notice using simple vocabulary, replacing technical terms
with everyday equivalents.

Real Impact: The Bhashini platform, powered by AI and prompt-driven translation, is helping the Government of
India deliver services in all 22 scheduled languages — reaching 500+ million citizens who do not communicate
primarily in English or Hindi.

5.5 Ethical Considerations in Communication

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

The power of Prompt Engineering also carries responsibility. How a prompt is designed can determine whether the
AI communicates fairly, accurately, and safely — or whether it produces biased, harmful, or misleading content.

Ethical Issue Problem Example Responsible Prompt Engineering Solution

Bias Amplification Prompts that assume stereotypes Include explicit instruction: 'Ensure the response is
about gender, caste, or religion unbiased and treats all communities equally.'
in outputs.

Misinformation Asking AI to write 'news articles' Use Self-Consistency anchoring with verified facts. Never
about false events. deploy without human review for news.

Manipulation Prompts designed to manipulate Include ethical guardrails: 'Never pressure the user.
users into decisions (dark Present all options neutrally.'
patterns in chatbots).

Privacy Violation Prompts that extract or generate System prompts should explicitly forbid AI from
personal information. collecting, storing, or sharing personal data.

Hallucination AI confidently presenting Use Self-Consistency Prompting to anchor AI to verified


invented facts as truth. facts. Always add disclaimer for critical domains.

6. Advantages of Prompt Engineering

Well-designed Prompt Engineering delivers measurable benefits across virtually every domain that uses AI. Here
we examine the key advantages with concrete examples, focusing on how these benefits manifest in the Indian
context in 2026.

Advantage Description India-Relevant 2026 Example

Increased Accuracy in Precisely crafted prompts dramatically Testbook & Unacademy AI tutors — specific
Q&A reduce vague, incorrect, or off-topic exam-pattern prompts reduce wrong answers in
responses. The AI has a clear target to UPSC/NEET/JEE prep by improving question
aim for. specificity.

Enhanced Creative Specific creative prompts unlock the Zoho's AI marketing suite — prompt-
Content Generation AI's full imaginative potential — engineered copy generators create A/B test
producing engaging marketing copy, variants for Indian brands in minutes, not days.
stories, scripts, and designs.

Efficient Code Technical prompts with precise GitHub Copilot and Replit used by 2M+ Indian
Generation & Debugging requirements (language, function developers. VTU students using
names, edge cases) produce working Claude/ChatGPT to debug Java and Python
code with fewer errors. assignments with structured prompts.

High-Quality Machine Context-aware translation prompts Bhashini API translates government schemes
Translation preserve meaning, tone, and cultural (PM Kisan, PMKVY, Aadhaar) into 22 Indian
nuance — far superior to word-for- languages with cultural sensitivity through
word translation. prompt-guided models.

Personalised Education Prompts can specify learning level, BYJU's and Vedantu AI tutors adapt
subject, preferred examples, and explanation complexity based on student
learning style — creating personalised prompt-guided interactions. Rural students

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

educational experiences at scale. access quality education in their native


language.

Streamlined Data Business and research prompts extract SEBI and RBI exploring AI-assisted market
Analysis key insights from large data sets — analysis. Startups using LLMs with structured
turning raw numbers into readable data prompts to generate quarterly reports
narratives. automatically.

Improved Accessibility Clear, well-structured prompts enable AI-powered accessibility tools for visually
AI to produce content in accessible impaired users using screen readers.
formats — simple language, audio Government portals using prompt-guided AI to
descriptions, large-print summaries. simplify complex legal notices.

Cost and Time Replacing repetitive manual writing Meesho and Flipkart use prompt-engineered AI
Efficiency tasks with well-engineered prompts to generate 10,000+ product descriptions per
reduces costs and speeds up day — work that would require 100+ human
workflows by 5–10x in many writers.
domains.

Quantified Impact — Why PE Matters in 2026


Healthcare: Apollo 24/7 reports 40% reduction in support ticket resolution time after implementing
prompt-engineered AI triage.
Education: Physics Wallah (PW) AI tutor reduces average doubt resolution time from 24 hours to 3
minutes using structured prompt pipelines.
E-Commerce: Amazon India uses PE-based AI to generate 80% of new product descriptions, saving
₹200 Cr annually in content costs.
Government: Bhashini platform serves 2 million translation requests daily across 22 Indian languages
through prompt-guided neural translation.

7. The Future of LLM Communication

As LLM technology continues to advance at a pace unprecedented in the history of computing, the nature of prompt
engineering itself is evolving. The future holds a landscape where the boundary between human prompting and
autonomous AI action becomes increasingly blurred.

7.1 Key Trends Shaping the Future (2026–2030)

Trend Description 2026 Real-World Indicator

Agentic AI & AI agents that receive a high-level goal OpenAI's Operator, Anthropic's Computer
Autonomous Prompting and generate their own intermediate Use, Google's Project Astra — all operational
prompts to accomplish multi-step tasks or in beta in 2025–26. Indian startup Krutrim
autonomously — browsing the web, building agentic AI for SME business
writing code, booking travel, managing automation.
schedules.

Automated Prompt AI systems that automatically generate Meta's DSPy framework and automatic
Generation and optimise prompts for specific tasks, prompt optimisers reduce manual PE work.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

removing the need for manual prompt Enterprise AI platforms offer 'prompt
crafting in standardised workflows. suggestion' features.

Adaptive & Personalised LLMs that learn user communication Claude's memory feature, ChatGPT's Custom
Prompts preferences over time and automatically Instructions — AI personalises responses
adapt prompt interpretation to that user's based on remembered user preferences across
style, vocabulary, and level of expertise. sessions.

Multimodal LLM Single prompts that simultaneously GPT-4o (voice + vision + text), Gemini 2.0
Communication handle text, images, audio, video, and Flash (multimodal), Claude 3.5 — all process
structured data — eliminating the need mixed inputs in 2025–26. Voice-first AI for
for separate specialised AI tools for each Indian rural users without typing skills.
modality.

Real-Time Language LLMs that translate with full UN-level translation quality for Indian
Translation at Scale understanding of cultural nuance, languages via Bhashini 2.0 and IndicTrans2.
idioms, and regional dialect — enabling Real-time court proceedings translation
real-time cross-language communication piloted in Karnataka (2025).
for 1.44 billion Indians.

AI-Powered Negotiation AI systems that can analyse complex AI-assisted contract negotiation tools used by
& Decision Support multi-party situations and generate Indian law firms. Government AI advisory
balanced, context-aware communication system piloted for smart city planning
strategies for negotiations, conflict decisions.
resolution, and decision-making.

Subtle Cue Future LLMs will respond to subtle GPT-5 and Claude 4 (anticipated 2026–27)
Understanding contextual cues — emotional tone, promise significantly improved implicit
implicit preferences, unstated constraints instruction following. Reduces the learning
— without the need for explicit curve for non-technical users.
prompting. Less prompting effort
required for complex tasks.

7.2 What This Means for You — The 2026 Student

The evolution of LLM communication has direct, practical implications for your career and academic journey.
Understanding these trends helps you position yourself for the AI-driven workforce.

• Prompt Engineering as a Core Skill: Just as typing and spreadsheet skills defined the 1990s workforce,
prompt engineering defines the 2026 workforce. Every profession — from medicine to law to engineering to
arts — is incorporating AI.
• From Tool Users to Tool Designers: Understanding how to design prompts moves you from being a
passive user of AI tools to an active designer of AI workflows — a significantly more valuable and
irreplaceable position.
• India's Opportunity: India's multilingual, diverse, and large population creates unique prompt engineering
challenges and opportunities. Engineers who can design prompts for Indian languages, cultural contexts, and
India-specific data problems will be in tremendous demand.
• Ethical AI Communicators: As AI becomes more powerful, society needs prompt engineers who
understand ethics, bias, and responsible communication. This is a role that requires both technical and
humanistic skills.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Thought Experiment: The Prompt Engineer of 2030


Imagine a prompt engineer in 2030 who designs communication workflows for an AI Agent managing a
smart hospital in Bengaluru. Their prompt system must: coordinate patient triage, route doctor
communications, translate between Kannada/Tamil/Telugu/Hindi/English in real time, ensure all AI
decisions are legally defensible, prevent bias in treatment recommendations, and escalate to human
doctors at the right moments. This is not science fiction — it is the logical extension of what you are
learning today.

PART B
Prompt Engineering Techniques for ChatGPT & Modern LLMs
Instructions Prompt · Zero-Shot · One-Shot · Few-Shot · Self-Consistency

8. Introduction to Prompt Engineering Techniques

Prompt Engineering Techniques are structured, repeatable approaches to designing prompts that shape how an AI
model processes and responds to inputs. Unlike basic prompt writing, these techniques apply systematic principles
to achieve higher accuracy, consistency, and control over AI outputs.

Each technique serves a specific purpose and is most effective in particular contexts. Expert prompt engineers
combine multiple techniques for complex tasks — a skill you will build throughout this module.

Technique Core Idea Primary Use Case Difficulty Level

Instructions Prompt Give the AI explicit rules about Chatbots, formal content, Beginner
HOW to respond constrained tasks

Zero-Shot Prompting Ask directly — no examples. AI Quick Q&A, common Beginner


uses training knowledge. tasks, general information

One-Shot Prompting Provide ONE example to guide Format-specific tasks, Beginner–


format/style translation, classification Intermediate

Few-Shot Prompting Provide 2–5 examples to teach a Complex classification, Intermediate


pattern niche tasks, style matching

Self-Consistency Anchor AI to verified facts to Medical, legal, exam Intermediate–


Prompting prevent hallucination content, technical docs Advanced

Chain-of-Thought Ask AI to 'think step by step' Maths, logic, multi-step Advanced


(bonus) before answering reasoning problems

Why Different Techniques for Different Tasks?

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Just as a carpenter uses different tools for different jobs (a saw for cutting, a hammer for nailing), a
prompt engineer uses different techniques for different AI tasks. Using the wrong technique is like using
a hammer to saw a plank — it will technically do something, but not what you want. The technique you
choose determines the quality, accuracy, and reliability of your AI output.

9. Instructions Prompt Technique

The Instructions Prompt Technique is the practice of embedding specific, explicit guidelines directly into the
prompt — telling the AI not just WHAT to do, but HOW to do it. These instructions constrain the model's output to
meet precise quality, format, tone, and content requirements.

An Instructions Prompt includes explicit directives about the task's execution: the
Instructions role the AI should play, the format of the response, the audience it should address,
Prompt the tone it should use, and any constraints it must respect. The AI treats these
instructions as binding rules.

9.1 The RFTAC Framework for Instructions Prompts

A complete Instructions Prompt typically contains five key components. Remember them with the acronym
RFTAC:

Component What It Defines Example

R — Role The persona or expertise "You are a senior software engineer with 10 years of Python
the AI should adopt experience."

F — Format How the response should "Respond in a numbered list of exactly 5 steps."
be structured

T — Task What the AI must do "Explain how to reverse a linked list."


precisely

A— Who the response is for "Explain this to a 1st year B.E. student who has just learned basic
Audience Python."

C— What the AI must not do "Keep the response under 150 words. Use simple English. No jargon."
Constraints or must limit

9.2 Building a Full Instructions Prompt — Step by Step

Let us build an Instructions Prompt for a real-world scenario step by step using the RFTAC framework:

Scenario: You are building a customer support chatbot for a VTU-affiliated college.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

[ROLE] You are a formal academic support agent for Atria Institute of Technology, Bengaluru.
[TASK] Answer student questions about exam schedules, re-evaluation, and fee payment.
[FORMAT] Always respond in 3–5 numbered steps. Include the official VTU portal link if relevant.
[AUDIENCE] Students who may be stressed or anxious about exams. Be calm and reassuring.
[CONSTRAINTS] Never guess about exam dates — only state confirmed information. Keep responses
under 100 words. Do not discuss personal student data.

This single, well-constructed Instructions Prompt ensures the chatbot always responds professionally, safely, and in
a student-friendly way — regardless of how the student phrases their question.

9.3 Instructions Prompt — Three Detailed Examples

Example 1 — Banking Customer Service (HDFC Bank Style)

Prompt: You are a formal customer service agent for a private bank in India. Always respond in professional
English. Answer questions about account services, loans, and digital banking. NEVER share, ask for, or
confirm OTP, passwords, or account numbers. If the user seems distressed or mentions fraud, immediately
provide RBI's helpline: 14440.

AI Output: User asks: I got an SMS about a suspicious transaction. AI responds: professionally, directs to call
14440, explains card blocking steps — never asks for card details.

Example 2 — Legal Document Generation

Prompt: You are a legal document assistant specialising in Indian contract law. Generate a Non-Disclosure
Agreement (NDA) for two Indian companies. The agreement must comply with the Indian Contract Act 1872.
Use formal legal language. Include clauses for: definition of confidential information, obligations of both
parties, term of agreement (2 years), governing law (Indian law, jurisdiction: Karnataka), and breach
consequences.

AI Output: AI generates a legally structured NDA with all required clauses, properly formatted, aligned with
Indian law — in minutes rather than hours.

Example 3 — Technical Product Review (91mobiles Style)

Prompt: You are a technology journalist writing for an Indian tech publication. Write an unbiased product
review of the OnePlus 13 smartphone (launched 2025). The review must: cover battery life, camera quality,
performance, and build quality. Word limit: 150 words. Use an unbiased, informative tone. Include a final
verdict score out of 10. Write for a technically aware Indian urban consumer aged 22–35.

AI Output: AI produces a balanced, appropriately detailed review — covering all four parameters within the
word limit, with an appropriate tone for the target reader.

9.4 Common Mistakes in Instructions Prompts


Atria Institute of Technology, Bengaluru
Module 2: Prompt Engineering BBAIAK203 (2025–26)

Mistake Example Why It Fails How to Fix

Conflicting "Be concise. Also AI cannot simultaneously "Be concise (max 100 words). Focus on
instructions explain everything in be brief and exhaustive — the three most important points only."
detail." produces confused output.

Vague "Make it good." Good means nothing "Write clearly, avoid jargon, use bullet
instructions specific to an AI — the points, aim for professional tone."
word carries no actionable
information.

Over- 10+ conflicting rules Too many restrictions Limit to 3–5 key constraints. Prioritise
constraining in one prompt confuse the model and the most critical ones.
often cause it to violate
some rules.

Missing audience "Write about climate AI defaults to a generic Add: "...for Class 12 students in rural
change." academic style — may be India who have never studied the topic."
too complex or too simple.

No format "Explain the AI produces a wall of Add: "Use 5 numbered points. Start
specified Transformer model." unformatted text that is each with a bold heading. Max 2 lines
hard to read and study per point."
from.

10. Zero, One, and Few-Shot Prompting

Zero, One, and Few-Shot Prompting are a family of techniques that differ in how much context or example
information you provide to the AI before asking it to perform a task. The number of 'shots' refers to the number of
examples included in the prompt.

In machine learning terminology, a 'shot' is a single training example. In


Shot prompting, a 'shot' is a single input-output example you include in your prompt to
demonstrate the pattern, format, or style you expect from the AI.

Classroom Analogy: The New Student


Imagine a brilliant new student joining your class halfway through the semester.
Zero-Shot: You give them the exam immediately with no preparation. They use their general knowledge.
One-Shot: You show them one solved example from the textbook before the exam.
Few-Shot: You show them 3–5 solved examples covering different problem types before the exam.
Naturally, the more good examples they see, the better they perform on structured, pattern-based tasks.

Examples
Technique How AI Responds Best For Key Limitation
Given

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Zero-Shot 0 (None) Uses training knowledge Common tasks, general Less precise for niche
entirely Q&A, simple summaries or structured tasks

One-Shot 1 Mimics the pattern of the Specific formats, May not generalise
given example translation registers, for complex patterns
simple classification

Few-Shot 2–5 Learns the underlying Complex classification, Higher token cost; too
pattern from examples style matching, niche many examples can
domains confuse

10.1 Zero-Shot Prompting — Deep Dive

Zero-Shot Prompting means asking the AI to perform a task without providing any
Zero-Shot
examples. The AI relies entirely on its pre-trained knowledge — the patterns, facts,
Prompting
and language structures it learned during training on billions of text documents.

When to use Zero-Shot: When the task is straightforward and well within the AI's training knowledge. When you
need a quick response without spending time crafting examples. When the output format is not highly specialised.
Critical tip: Even in Zero-Shot, always specify the output FORMAT. This single addition dramatically improves
output quality without needing examples.

Zero-Shot — Example 1: UPSC Preparation

Prompt: List 5 key achievements of India's ISRO between 2020 and 2025 in bullet points. Each point should
be one sentence. Write for a student preparing for UPSC General Studies Paper 3.

AI Output: • Chandrayaan-3 successfully landed near the lunar south pole (Aug 2023), making India the 4th
nation to land on the Moon... • Aditya-L1, India's first solar observatory, launched in Sept 2023... [3 more
structured, exam-relevant points]

Zero-Shot — Example 2: Medical FAQ

Prompt: List 5 early warning signs of Type-2 Diabetes in simple language suitable for a patient with no
medical background. Add a final line advising them to consult a doctor.

AI Output: 1. Feeling unusually thirsty, even after drinking water 2. Frequent urination, especially at night 3.
Unexplained weight loss... [Note: These are general signs. Please consult a doctor for proper diagnosis.]

Zero-Shot — Example 3: Code Generation

Prompt: Write a Python function named calculate_average() that takes a list of numbers as input and returns
the average. Handle the case where the list is empty by returning 0. Add docstring comments.

AI Output: def calculate_average(numbers): """Calculate the average of a list of numbers. Returns 0 for
empty list.""" if not numbers: return 0 return sum(numbers) / len(numbers)

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Zero-Shot Strengths: Fast, simple, no preparation needed. Works well for tasks LLMs are trained heavily on
(common language tasks, standard coding problems, well-known factual questions).
Zero-Shot Limitations: May produce generic outputs for specialised tasks. Cannot replicate a specific format or
style without examples. More prone to hallucination for obscure or technical topics.

10.2 One-Shot Prompting — Deep Dive

One-Shot Prompting provides exactly ONE complete example of the desired input-
One-Shot
output pair before presenting the new task. This single example teaches the AI the
Prompting
expected format, style, vocabulary, and pattern for the output.

When to use One-Shot: When you need a very specific output format that the AI would not default to. When you
are translating into a particular register (formal government language vs casual WhatsApp). When you want to
establish a consistent style across multiple outputs.

One-Shot — Example 1: Sentiment Classification (Flipkart Reviews)

Prompt: Review: 'The product arrived quickly and the quality exceeds expectations. Excellent packaging.'
Label: POSITIVE Now classify: Review: 'The item was broken when I opened it. Complete waste of money.'

AI Output: Label: NEGATIVE [AI correctly applies the pattern from the single example]

One-Shot — Example 2: Bhashini-Style Government Translation

Prompt: English: Please submit your application form by 31st March to the District Collector's office.
Kannada: ದಯವಿಟ್ಟು ನಿಮ್ಮ ಅರ್ಜಿ ಫಾರ್ಮ್ ಅನ್ನು ಮಾರ್ಚ್ 31 ರ ಒಳಗೆ ಜಿಲ್ಲಾ ಕಲೆಕ್ಟರ್ ಕಚೇರಿಗೆ
ಸಲ್ಲಿಸಿ. Now translate: English: Your application for PMKVY scholarship has been approved.

AI Output: Kannada: ನಿಮ್ಮ PMKVY ವಿದ್ಯಾರ್ಥಿವೇತನಕ್ಕೆ ಅರ್ಜಿ ಅನುಮೋದಿಸಲಾಗಿದೆ. [Matches


the formal register of the example]

One-Shot — Example 3: VTU MCQ Generation

Prompt: Topic: Data Structures — Arrays Q: What is the time complexity of accessing an element in an array
by index? A) O(n) B) O(log n) C) O(1)* D) O(n²) Answer: C Now generate: Topic: Data Structures —
Linked Lists

AI Output: Q: What is the time complexity of inserting a node at the beginning of a singly linked list? A)
O(n²) B) O(n) C) O(log n) D) O(1)* Answer: D [AI replicates the exact VTU MCQ format]

One-Shot Strengths: Significantly improves format and style consistency over Zero-Shot. Requires only one
example — low overhead. Effective for translation, simple classification, and format-specific tasks.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

One-Shot Limitations: One example may not be sufficient for complex or multi-pattern tasks. If the example is
poorly chosen, the AI will learn the wrong pattern. Does not handle diverse sub-categories well.

10.3 Few-Shot Prompting — Deep Dive

Few-Shot Prompting provides 2–5 complete examples of input-output pairs before


Few-Shot the new task. The AI analyses the examples to identify the underlying pattern, rule,
Prompting or relationship — then applies that understanding to the new input. This is the most
powerful of the three shot techniques.

When to use Few-Shot: When the task has a complex, non-obvious pattern. When you need consistent outputs
across a large batch of inputs. When dealing with domain-specific vocabulary or classification. When one example
is clearly not enough to capture all the variation in the task.

Few-Shot — Example 1: News Article Topic Classifier

Prompt: Headline: India wins T20 World Cup 2024 → Category: Sports Headline: Budget 2026 reduces
income tax for salaried employees → Category: Finance Headline: Chandrayaan-4 launch confirmed for
December 2026 → Category: Space/Science Headline: NEET UG 2026 results declared by NTA →
Category: ???

AI Output: Category: Education [AI correctly identifies the pattern: headline → dominant topic category]

Few-Shot — Example 2: Zomato Review Sentiment with Intensity

Prompt: Review: 'Absolutely amazing! Best biryani I have ever had. Delivery was lightning fast!' →
Sentiment: Very Positive Review: 'Food was okay, nothing special. Delivery was a bit late.' → Sentiment:
Neutral Review: 'The dosa was cold and soggy. Packaging was terrible.' → Sentiment: Negative Now classify:
Review: 'Worst experience ever. The curry was spoiled and the delivery person was rude.'

AI Output: Sentiment: Very Negative [AI distinguishes between Negative and Very Negative — a 3-example
few-shot teaches the 4-level scale]

Few-Shot — Example 3: Code Bug Type Classification

Prompt: Code: print(x) [x not defined] → Bug Type: NameError Code: int('hello') → Bug Type:
ValueError Code: my_list[10] [list has 5 items] → Bug Type: IndexError Now classify: Code: result = 10 / 0

AI Output: Bug Type: ZeroDivisionError [AI correctly maps the new code to a Python exception type using
the established pattern]

10.4 Golden Rules for Shot Prompting

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Rule Explanation Example of Violation

Keep examples All examples must follow the same structure Mixing bullet points and free text in
consistent in format (Input: ... → Output: ...) different examples confuses the AI

Use diverse examples Examples should cover the range of cases the 3 'positive' examples for sentiment analysis
AI will encounter, not just one type — AI learns to always say positive

Quality over quantity 3 excellent, representative examples beat 10 10 poorly formatted examples with
mediocre ones incorrect labels will teach the AI wrong
patterns

Match examples to If the real task has edge cases, include an edge Forgetting to include a 'neutral' example in
real task complexity case in your examples sentiment analysis → AI only predicts
positive/negative

Stay within token Very long examples consume the model's 5 full-paragraph examples for a task that
limits context window, leaving less room for the only needs one-line outputs is wasteful and
actual task confusing

11. Self-Consistency Prompting

Self-Consistency Prompting is a sophisticated technique used to anchor the AI's response to a set of verified, pre-
established facts — ensuring the model's output remains factually coherent and logically consistent with the
information you provide. It is the primary tool for preventing AI hallucination in high-stakes domains.

A Self-Consistency Prompt embeds key verified facts, rules, data, or constraints


Self-Consistency directly into the prompt — before the question is asked. The AI is instructed
Prompting (explicitly or implicitly) to base its response only on the anchored information,
preventing it from inventing or contradicting the provided facts.

11.1 The Hallucination Problem — Why Self-Consistency Matters

AI Hallucination refers to the phenomenon where an LLM confidently generates factually incorrect, fabricated, or
logically inconsistent information. Unlike a human who says 'I don't know,' an LLM will often invent a plausible-
sounding answer when it lacks reliable information.

Domain Hallucination Example Consequence

Medical AI states an incorrect drug dosage with Patient safety risk — potentially life-threatening
complete confidence advice

Legal AI cites a non-existent court case or law Legal advice based on fabricated precedent —
section potential case loss

Education AI quotes wrong statistics for an exam answer Student scores zero — incorrect information
presented as fact

Finance AI gives wrong tax rate or scheme eligibility Financial decision made on incorrect data

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

criteria

Technical AI generates code using a function that does Code fails to run — debugging time wasted
not exist in the library

11.2 How Self-Consistency Prompting Works

The Self-Consistency technique follows a structured approach. You first research and verify the key facts relevant to
your topic, then embed those facts as anchors in your prompt, and finally ask your question — directing the AI to
base its answer only on the provided information.

Step 1: Identify Key Facts


Research and gather verified, authoritative facts about the topic. Use reliable sources: NCERT, WHO,
ISRO website, RBI circulars, government portals, peer-reviewed papers. Date your facts — knowledge
becomes outdated.

Step 2: Embed Facts as Anchors


Include the verified facts at the beginning of your prompt, clearly labelled as ANCHOR or GIVEN
FACTS or CONTEXT. The AI treats this as its 'reference book' for the response.

Step 3: Write the Question


After the anchors, write your specific question or task. Use phrases like: 'Based ONLY on the above
information...' or 'Using the facts provided above...' to reinforce the constraint.

Step 4: Verify the Output


Read the AI's response and check it against your anchored facts. A well-designed self-consistency prompt
should produce a response that is entirely traceable back to your provided information.

11.3 Self-Consistency — Three Detailed Examples

Example 1: Environmental Studies Essay (VTU Context)

ANCHORS PROVIDED:
• Earth's average temperature has risen 1.2°C since 1880 (IPCC Sixth Assessment Report, 2023)
• India ranks 7th most vulnerable nation to climate change (Germanwatch Global Climate Risk Index
2024)
• India's Nationally Determined Contribution (NDC) targets 50% non-fossil fuel electricity by 2030
PROMPT: Based ONLY on the facts provided above, write a 150-word paragraph on the impact of
climate change on Indian agriculture for a B.E. Environmental Studies assignment.

WHY IT WORKS: The AI cannot invent wrong temperature figures or wrong country rankings. Every
factual claim it makes is traceable to your anchored sources. This produces a defensible, academically
sound response.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Example 2: UPSC/Law Exam Preparation

ANCHORS PROVIDED:
• Article 21 of the Indian Constitution: 'No person shall be deprived of his life or personal liberty except
according to procedure established by law.'
• Maneka Gandhi vs Union of India (1978): Supreme Court expanded Article 21 to include the right to
live with dignity and the right to travel abroad.
• K.S. Puttaswamy vs Union of India (2017): Right to Privacy declared a fundamental right under Article
21.
PROMPT: Using ONLY the information anchored above, explain the evolution of Article 21 and its
current scope in 200 words. This is for a UPSC General Studies Paper 2 answer.

WHY IT WORKS: The AI cannot cite a non-existent case or give a wrong year. Your anchored facts
become the AI's sole reference — producing a legally accurate, exam-appropriate answer every time.

Example 3: VTU Grading System Chatbot

ANCHORS PROVIDED:
• VTU Grading Scale (2024): O = 90–100, A+ = 80–89, A = 70–79, B+ = 60–69, B = 55–59, C = 50–54,
P = 40–49, F = Below 40
• Minimum pass marks: 40 out of 100 in theory; 18 out of 30 in Internal Assessment
PROMPT: A student scored 67 marks in BETC105. Using ONLY the VTU grading scale provided
above, tell the student their grade and whether they have passed. Do NOT use any other grading scale.

WHY IT WORKS: Without anchoring, the AI might apply the wrong university's grading scale.
Anchoring the VTU-specific scale ensures the chatbot gives accurate, institution-specific information.

11.4 Key Features and When to Use

Feature Description

Incorporates Key The prompt includes verified facts, official data, laws, or standards as non-negotiable
Information reference points for the AI.

Guides Logical Flow By anchoring the facts, the AI's reasoning chain is constrained to stay logically
consistent with the provided information throughout its response.

Balances Detail and The technique anchors critical facts but gives the AI freedom to explain, elaborate, and
Flexibility express — the AI's language ability is still used, but its factual claims are controlled.

Prevents Hallucination The single most effective technique to prevent AI from inventing statistics, citing non-
existent laws, or contradicting established scientific consensus.

Use Self-Consistency When... Avoid Over-Relying When...

Medical, legal, or safety-critical content is involved The task is creative writing where flexibility is valuable

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

Exam answers must align with specific syllabus facts The task is brainstorming or idea generation

Technical documentation must match specific standards The topic changes too quickly for any anchors to remain
current

Statistical data must be cited accurately You do not have time to verify the anchored facts
themselves

Official government or regulatory information is required The task is a casual conversation or general Q&A

12. Combining Techniques — The Expert's Toolkit

Expert prompt engineers rarely rely on a single technique in isolation. For complex, production-grade tasks,
combining multiple techniques into a single, layered prompt produces results far superior to any individual
technique. This is sometimes called 'prompt stacking' or 'mega-prompting.'

The Combination Principle


Think of prompt techniques as musical instruments. A flute alone is beautiful. A full orchestra is
transcendent. Instructions define the rules. Few-Shot sets the style. Self-Consistency anchors the facts.
Combined, they produce AI output that is accurate, well-formatted, domain-appropriate, and
hallucination-resistant.

12.1 Full Combination Example: VTU Exam Question Generator

[INSTRUCTIONS — Role & Constraints]


You are a VTU question paper setter for BETC105 (Introduction to AI and Applications). Generate
MCQs strictly following VTU pattern: 4 options per question, exactly ONE correct answer (marked with
*), no negative marking.

[SELF-CONSISTENCY — Anchored Facts]


ANCHOR: Syllabus = Module 2 of BETC105 — Prompt Engineering only. Bloom's taxonomy level =
Remember and Understand only. Difficulty = Easy to Medium. Source = VTU-approved textbook.

[FEW-SHOT — Examples]
Q: What is a prompt? A) A database query B) The input instruction given to an AI* C) The AI's output
D) A training dataset Ans: B
Q: Zero-Shot prompting means... A) Zero training examples B) Zero output tokens C) No examples
given in the prompt* D) Zero accuracy

[TASK]
Generate 5 more MCQs on the topic: Types of Prompts (Natural Language, System, Conditional).

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

This layered prompt combines Instructions (role + format), Self-Consistency (syllabus anchor), and Few-Shot
(pattern examples) to produce perfectly formatted, syllabus-accurate VTU questions — reliably, every time.

12.2 Quick Stacking Guide

Your Goal Recommended Technique Stack

Quick factual Q&A Zero-Shot + format instruction

Consistent output format Instructions + One-Shot

Pattern learning for batch tasks Few-Shot + Instructions

Factually critical content Self-Consistency + Instructions


(medical/legal/exam)

Enterprise-grade AI output Instructions + Few-Shot + Self-Consistency (Full Stack)

Creative content with style guidance Instructions (tone/audience) + One-Shot (style example)

Multilingual translation pipeline Instructions (register) + Few-Shot (language pair examples)

13. Module 2 — Quick Reference Summary

Topic Key Concept Remember This

Prompt Engineering Designing, refining, optimising prompts Better prompt = better output. Always.
for best AI output

AI vs LLM vs GenAI AI is the umbrella, LLM is the language School → English Teacher → Creative
specialist, GenAI creates content Writing Teacher

Evolution 1966 (ELIZA) → 2017 (Transformer) → Transformers made modern LLMs possible
2022 (ChatGPT) → 2026 (Agents)

Natural Language Conversational, plain language prompts Intuitive but vague without specifics
Prompts

System Prompts Pre-set AI persona, rules, and constraints Used by every commercial chatbot in
production

Conditional Prompts IF-THEN logic for multi-scenario Route different user needs with one smart
handling prompt

5-Step Framework Understand → Precise → Specific → Treat PE as iterative — first draft is never
Examples → Iterate best

Role in Communication Clarity, creativity, adaptation, PE is a communication discipline, not just a


multilingual, ethics tech skill

Instructions Technique RFTAC: Role, Format, Task, Audience, What the AI should be, do, and avoid
Constraints

Zero-Shot No examples. AI uses training knowledge. Fast and simple. Specify output format
Specify format. always.

Atria Institute of Technology, Bengaluru


Module 2: Prompt Engineering BBAIAK203 (2025–26)

One-Shot 1 example. AI mimics pattern. Good for One clear example outperforms vague
specific formats. instructions.

Few-Shot 2–5 examples. AI learns the pattern. Best Diverse examples > many similar ones. 3–5
accuracy. sweet spot.

Self-Consistency Anchor verified facts. Prevent Your facts + Your question + 'Answer
hallucination. ONLY on these facts'

Combining Techniques Instructions + Few-Shot + Self- Expert PE = intelligent technique stacking


Consistency = bulletproof

Final Thought — The Prompt Engineer's Mindset


Prompt Engineering is ultimately the art of clear thinking expressed through language. The discipline of
writing an excellent prompt forces you to know exactly what you want, understand your audience, respect
constraints, and iterate toward quality. These are skills that transcend AI — they make you a better
thinker, writer, and communicator in every domain.
As AI systems become more powerful and autonomous, the humans who understand how to
communicate with them precisely and responsibly will be the most valuable professionals in any field.
That journey begins with what you have learned in Module 2.

References and Further Reading

1. Textbook: Ajantha Devi Vairamani and Anand Nayyar, Prompt Engineering: Empowering Communication,
1st Edition, CRC Press, Taylor & Francis Group
2. VTU Syllabus: BETC105/205 — Introduction to AI and Applications, VTU Belagavi BOS (CS/IS), 2024
3. Paper: Vaswani et al. (2017). 'Attention Is All You Need.' NeurIPS — foundational Transformer
architecture paper.
4. Paper: Brown et al. (2020). 'Language Models are Few-Shot Learners.' OpenAI — GPT-3 and few-shot
prompting.
5. Online: Anthropic Prompt Engineering Guide — [Link]/en/docs/build-with-claude/prompt-
engineering/overview
6. Online: OpenAI Prompt Engineering Guide — [Link]/docs/guides/prompt-engineering
7. India AI: IndiaAI Mission Overview — [Link] · Bhashini Platform — [Link] · Sarvam
AI — [Link]
8. Practice Tools: [Link] · [Link] · [Link] · [Link] · [Link]

Atria Institute of Technology, Bengaluru

You might also like