Prompt Engineering - 02
What a prompt can include?
- Instruction
- Question
- Input data
- Example
Question + Instruction
How can I improve this sentence? Rewrite it to sound more professional. Sentence: "I done the work yesterday.
Question + Input Data
Question: Who scored the highest?
Input:
Alice - 85
Bob - 92
Charlie - 78
Question + Example
“The meeting, which occurred yesterday, included all department heads.”How should I rephrase sentences for clarity? Here’s an example:
Example:
Input: “The report, which was written by the team last week, was well received.”
Output: “The team’s report from last week was well received.”
Since we identified what prompt is and discussed some example prompts, Let's see what Prompt Engineering is,
What is Prompt Engineering?
Prompt engineering is the skill of writing the right instructions (called prompts) to get the best results from AI tools like ChatGPT. It's about knowing what you want and how to ask the AI in a way it understands.
When you need to create a lot of prompts, you can use templates and change them based on the data or situation. This helps you save time and stay consistent.
Different AI models can respond differently to the same prompt, so you need to understand how the model works to get the best results.
Tools that can be used for Prompt Engineering
- PromptLayer
- PromptFlow
- Agenta
- Wordflow
- PromptPerfect
and there are many more..
AI Hallucination
AI hallucination is when an AI makes up information that sounds real but is actually wrong or doesn’t make sense.
How Prompt Engineering Helps
Good prompt engineering helps reduce hallucinations by:
-
Asking clear, specific questions
-
Giving the AI enough context
-
Using examples to guide the AI
-
Adding instructions like “only answer if you're sure” or “cite real sources”
Better prompts = more accurate answers.
Chain Of Thought prompting?
Chain of Thought prompting is a way to help AI think step-by-step to get the right answer. Instead of asking for the final answer right away, we guide the AI to explain its thinking first.
This makes the AI more accurate because it breaks down the problem into smaller parts.
You can try below techniques when you ask something from AI models like chatGPT
- Ask it to be "based on accurate and reliable sources only".
- Ask it to "give the response with the reasoning".
- Ask it to "think Step by step and answer"
- ex:-
Q: A car travels at 60 miles per hour for 2.5 hours. How far does it go? Let's think step by step.
you can try not including the 'think step by step' and see the difference. - Assign a role to AI and ask
- ex:- Consider you are a movie critic and analyze Batman vs Superman movie
Comments
Post a Comment