Prompting 101: Make ChatGPT work for you

Miguel Cardoso
4 min readJul 23, 2023

--

ChatGPT, the powerful language model, is like a blank canvas waiting for your instructions! 💡 But let’s be real, prompting isn’t a piece of cake 🍰. It’s all about asking the right questions to get the answers you need. 🤔

A statue of a man sitting down and thinking

In this blog post, we’ll guide you on how to unlock the full potential of ChatGPT by crafting the perfect prompts. 🗝️ We’ll explore two key approaches: zero-shot prompting and few-shot prompting, helping you achieve remarkable results. 💪

Don’t expect ChatGPT to be a mind reader 🧠; it’s up to you to make it work for you! 🛠️ So, get ready to dive in and learn how to get the most out of ChatGPT through the art of questioning! 🚀🔍

First and foremost, what is prompting ?

Prompting is like giving a smart language buddy a special request! 🗣️🤖 You ask, it responds — thanks to being trained on vast amounts of text data, learning patterns, language structures, and even contextual nuances. 📚💡 Prompting allows us to leverage this knowledge by providing a prompt that guides the model’s behavior. So, just tell it what you need, and it’s ready to amaze you with its language skills! 🌟🚀

Understanding Zero-Shot Prompting

Zero-shot prompting is a powerful technique that allows you to get answers from ChatGPT without any specific fine-tuning for a particular task. It’s like having a universal translator that can comprehend and respond to a wide range of queries. 🌐✨

When using zero-shot prompting, you don’t need to train the model on specific data; instead, you provide a prompt and instruct the model on the desired task using natural language. This means that you can just ask anything without giving any examples of what you might actually want. For example, if you want ChatGPT to summarize a text, simply ask, “Can you summarize the following paragraph?” 📖📝

Here are some tips for effective zero-shot prompting:

Be Clear and Specific

When formulating your question, make sure your intent is clear and specific. Avoid ambiguity so that the model can better understand and respond accurately. 🎯

Use Model-Specific Keywords

Different language models may have certain keywords that trigger specific behaviors. For instance, ChatGPT may pay more attention to phrases like “Translate this to French” when you want a translation. Knowing these keywords can improve the success of your zero-shot prompts. 🗝️

Experiment and Iterate

Zero-shot prompting might require some experimentation. If you don’t get the desired response initially, don’t be discouraged! Try rephrasing the prompt or using different instructions until you get the answer you seek. 🔄🔁

Unleashing the Power of Few-Shot Prompting

While zero-shot prompting is versatile, few-shot prompting takes it a step further. With few-shot prompting, you can provide a few examples of the task you want the model to perform, allowing it to generalize from those examples. 📚

To use few-shot prompting effectively:

Offer Varied Examples

Provide diverse examples of the task you want the model to accomplish. If you want ChatGPT to write poetry in the style of a specific poet, give it a few poems from that poet as examples. This way, the model can grasp the desired style and produce relevant output. 📝🖋️

Start Simple and Refine

Begin with straightforward examples, gradually adding more complexity as needed. The model can learn from these few examples and apply that knowledge to similar but more intricate tasks. 📈💡

Make Prompts Information-Rich

Try to make your prompts information-rich, providing crucial details and context. The more information you offer, the better the model’s response is likely to be. 📑🔍 Very important!

The Art of Conversational Prompts

Aside from single-turn prompts, you can engage in a dynamic conversation with ChatGPT. To do this, you can maintain context by referencing previous responses from the model. This helps the model retain information and create more coherent and contextually appropriate replies. 🗣️💬

Remember that prompting is not just about giving instructions; it’s a dialogue. Keep the conversation flowing, and don’t be afraid to ask follow-up questions. 🔄🗨️

Ethical Considerations

Prompting, while powerful, comes with ethical responsibilities. Language models can inadvertently generate harmful or biased content. As a user, it’s crucial to be mindful of the prompts you provide to ensure the outputs are ethical, unbiased, and respectful. 🚫🧠

Conclusion: The Art of Asking the Right Questions

Asking the right questions is at the heart of effective prompting (and pretty much everything in life). To get the most out of ChatGPT, follow these tips to improve the quality of your queries:

Be Clear and Specific, Yet Flexible

When crafting your prompts, clarity is crucial. Clearly state the task or information you need from the model. However, also leave some room for flexibility, allowing the model to provide creative or alternative responses. 🧠🤔

Use Few-Shot Prompts to Guide the Model

Few-shot prompts can be incredibly helpful in steering the model’s responses in the right direction. By providing a few examples, you help the model understand the context and tailor its output accordingly. Remember to include varied and relevant examples for better results. 🌐📚

Refine and Iterate

If the initial response from ChatGPT is not satisfactory, don’t be discouraged. Instead, experiment with different phrasings, instructions, or examples. Iteratively refine your prompts until you obtain the desired outcome. Patience and persistence will pay off. 🔁💡

Utilize Conversational Prompts

Engaging in a conversation with ChatGPT can lead to more coherent and contextually appropriate responses. Refer back to the model’s previous answers to maintain continuity and context in the dialogue. 🗣️💬

Note: ChatGPT is not the only one available, there is Bard, Claude, HuggingFace Chat, among others, so try them all and make these tools work for you!

--

--

Miguel Cardoso

Innovator and problem solver at heart. Product and Software Engineer exploring AI, software architecture and product management through writing.