In my previous blog series, Generative AI for Beginner, we have learnt the basic concepts around AI, Generative AI, Large Language Model etc.
In this blog series, I will focus on explaining important jargons related to Generative AI. To make it super simple, I will provide an analogy, and use layman’s terms.
Note: I am publishing it as a series. Part 4 to 21 are yet to be published.
This is 1st blog in this series. The jargon is Prompt Engineering.
Side Note: I strongly recommend you to go through the previous blog series Generative AI for Beginner. It will only take 90 minutes of your time. No perquisites. You will get a crystal-clear idea on AI and generative AI.
Let’s start!
Imagine you are in a world-renowned kitchen with a highly skilled chef. The chef has an extensive knowledge of cuisines, ingredients, and cooking techniques and he can prepare any dish you desire
To get the exact meal you want, you must give the chef clear, precise instructions. If you don’t communicate properly, the chef cannot create the perfect dish for you.
The above image is generated using Microsoft Copilot
For example, if you just say — “Make me dinner.” The chef is left with a broad and vague request and has to guess your preferences. You might end up with something you like, but it’s equally possible that the dish won’t meet your expectations. It may be that you are in a mood to have chicken curry and garlic bread, but the chef prepared a world-class pasta.
Hence, to get exactly the meal you want, you must provide more details, like — “Make me a chicken curry and garlic bread.” Now, the chef has a clear understanding of your preferences and can prepare a dish that closely matches your expectations. You may further also add more context to your request. For example — “Make the dish more spicy.” or “Don’t put onion.” etc.
Similar to the above example, whenever you interact with any AI system, (say ChatGPT), you need to provide a clear prompt to get exactly the response you need.
In our analogy, the chef can only create the perfect dish if you communicate your desires effectively. Similar principle applies to AI models. The AI Models can provide perfect output only if we provide the prompt effectively.
For example, if you just give a prompt to ChatGPT (or any such text based AI model) — “Tell me a story.” Potential response could be any story, such as — “ Once upon a time, in a small village nestled between rolling hills and dense forests, there lived a young girl named Elara….”.
As shown in above image, the response is generic because the prompt lacks specifics.
However, let’s say you are looking for a bedtime story to tell your kid and your kid loves stories with animal character and you also want to add a moral to the story, then you might design your prompt such as — “Tell me a short story for kids which includes animal characters and has a nice moral at the end.”. In this case the AI model can better understand your expectation and give response which suits your need.
To summarize, we can say that — Prompt engineering is the process of designing and refining the input text (prompt) given to an AI model, to get the desired output. It involves crafting specific questions, statements, or instructions to guide the model to produce accurate and relevant responses.
Here are some examples of good and bad prompt:
Bad prompt — “Tell me something interesting.”
Result: Response includes fun facts about Octopuses.
Good prompt — “Tell me a funny story about a dog.”
Result: Response includes a funny story about dog.
Better prompt — “Tell me a hilarious story about a dog who thinks he’s a cat and tries to climb trees.”
Result: Response includes a funny story about dog as you expect.
Bad prompt — “How to deal with anger?”
Result: Response includes some theoretical tips and tricks. You may not like the tone.
Good prompt — “I am feeling very angry. Can you please help me deal with it.”
Result: Response will have empathetic tone and a personal touch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
22 | |
16 | |
12 | |
8 | |
8 | |
8 | |
7 | |
6 | |
6 |