Member-only story
Prompt Engineering for Generative AI
3 min readMay 26, 2024
Generative AI and Large language models are in the peak these days, you can see them everywhere, changing businesses, careers, lifes, … and as someone who live in this era, learning how to use it is crucial. Prompt engineering is the art of asking the right question to get the best output from an LLM.
if you are not a Medium premium member, you can read it for free here.
Prompt design
There is no best way to design the prompts but there some methods you can use to shape the model’s response.
- Zero-shot prompting: As the name might suggests, in this method you just add a prompt with no additional data and LLM giving you an answer. For example when you ask a question and usually the LLM give you a comprehensive response, Ex. “What is prompt design?”
- One-shot prompting: In this method, you give the LLM a single example of the task or question that is being asked. For example if you want the LLM write a short story, you might give it a single example. For example in ChatGPT, you can influenced the way the model produces response, by give an example like this:
The color of sky is… To answer the prompts like
…