Prompt Talks with Chai
Welcome to the blog. In the this blog I will be sharing my learning about prompt engineering which I gained from Day2 of Gen AI cohort. What is prompt? Prompt is nothing but sets of instruction provided to LLM to perform certain task. In simple words you can relate to this by ring master training elephant in circus or imagine cooking book which provide step by step instruction to cook specific dish. I hope these example was helpful in understanding prompt. Now lets move forward and talk about types of prompt.
1. Zero Shot Prompting: In simple words zero shot prompting is you can relate to giving task to new team member without giving knowledge transfer. Yes you got it right, in zero shot prompting we straight forward instructions to LLM without proving any example.
Below prompt is an example of zero shot prompt.
Prompt→ Tell me about playwright
2. Few Shot Prompting: Few shot prompting is like travelling to unknown location with set of written piece of paper without map. Similarly in few shot prompting we provide very less example to LLM.
Below prompt is an example of few shot prompting.
Prompt→ Tell me about genre of book
Example-
Q1: Who moved my cheese book
A: Self help
Q2: Fault in our stars
A: Romantic
Q3: Mahabharat
A: Mythology
In my user persona assignment I used few shot prompting technique. Check out app and git hub link below-
Github-https://github.com/Renuka-Khirwadkar123/Gen-AI-Cohort/blob/main/chatbot.py
Application link- https://gen-ai-cohort-htxlsyqqyxdwat43hwaizu.streamlit.app/
3. Chain of thought prompting: This can be imagined as treasure hunt where clues are provided to participants to reach final destination. In chain of thought prompting we provide sufficient information to LLM for getting desired response.
Below prompt is an example of chain of thought prompting.
Prompt→ I have two snow cases which should I take first?
Example-
Step1: Get the ORT of the snowcase
Case 1 Within 5 days and Case 2 within 30 days
Step2: What is the severity of the snow case
Case1: High Case 2: Low
Response: You should solve case1 first
Self consistency prompting: Self consistency is like google map route suggestion short route, long route, highway, expressway .and map suggests best possible route of considering several factors like timetaken to reach destination, any blocker enroute etc.
Instruction prompting: Instruction prompting can be imagined as yoga instructor teaching yoga asanas to student. In this we provide step by step instruction to LLM to reach the output.
Direct answer prompting: Direct answer prompting is like quiz without MCQ. LLM follow sedhi baat no baakwas policy.
Persona Based Prompting: Persona based prompting can be understand by chachi 420 movie where kamal hassan switch between men and women. In a similar way LLM also respond like a person based on information provided.
Role Based Prompting:The simpliest way to understand role play prompting is actors in movie. For eg: In Darr movie Shahrukh played villan roles, whereas in DDLG he played romantic role. In technical words, LLM can take different roles based on prompt provided and provide appropriate user response.
Contextual Prompting: Contextual prompting is like a movie plot comedy, crime etc. In this kind of prompting we provide plot/context to the LLM for providing accurate response.
Multimodal Prompting: Multimodal prompting is process of creating LLM to iron man. By training LLM with all sorts of data like images, text, Audio, video etc.
To conclude above there are various ways of prompting available just like different gifts in santa clause bag.
That’s about prompting for now. Hope this information was insightful. Stay tuned of next blog. Thank you.




