Premium
This is an archive article published on May 29, 2023

ChatGPT can save you hours: Here are some prompt engineering basics to ace the chatbot

Looking to optimise your interactions with AI chatbots? Dive into the world of prompt engineering and unleash their true potential.

chatgpt featured express photoChatGPT is a model that interacts in a conversational way and can answer followup questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests. (Express photo)
Listen to this article
ChatGPT can save you hours: Here are some prompt engineering basics to ace the chatbot
x
00:00
1x 1.5x 1.8x

Following the launch of ChatGPT back in November, the tech industry is on a roll with successive launches of AI chatbots. These versatile tools can perform many of your daily tasks with ease and make your life easier.

But unlike humans, who can infer meaning from context and nuance, AI chatbots need to be fed instructions in precise and unambiguous language to grasp your intentions properly.

So today, we take a look at what AI prompts are and the various intricacies that go into engineering that perfect prompt.

Story continues below this ad

What exactly are prompts?

Prompts are the input that users give to AI chatbots and generative services, such as ChatGPT, Bard, and Bing. Prompts tell the chatbots what to do or what to talk about, and help them produce relevant and accurate responses.

Meanwhile, prompt engineering is the skill of designing and crafting effective prompts for different purposes and goals.

The basic principles of prompt engineering

Be as specific as possible

When crafting a prompt, the fewer details you provide, the more assumptions the AI model has to make. Including constraints in your prompt will guide the model better to produce outputs closer to what you have in mind.

Story continues below this ad

Suppose you wish to identify the sentiment of an image caption using any AI chatbot. In that case, using the prompt “Classify this caption: I love my dog very much” will not fetch the desired output. Replacing that with “Classify this caption’s sentiments as positive, neutral, or negative: I love my dog very much” will do the job better, as it’s more specific.

Provide sample outputs

Think of AI chatbots as very bright kids that need to be shown an example sometimes when your task is complex. Try to feed examples that are similar to the data you’re working with to produce better outputs.

For example, if you wish to generate a list in a certain format, say for a list of countries followed by the names of their capital cities, then try to use a prompt similar to the example below:

Story continues below this ad

Generate a numbered list of 8 countries with the highest GDP along with their capital cities. An example list item is “1. United States – Washington DC” for your reference.

chatgpt prompt engineering output example Providing examples can help you customise output from AI chatbots. (Express image)

Provide additional relevant context

Since AI models are trained on millions of documents and web pages from all over the internet, they’re prone to hallucinations and can get their facts mixed up sometimes. Therefore, limiting the scope of resources that the AI chatbot works with to generate your response can be crucial. A good method to ensure that the chatbot’s response is accurate and factually correct is to include relevant links or pages from documents as additional context in your prompts. You can ask the chatbot to refer to these prompts when generating an output.

Refine and iterate whenever necessary

Coming up with the perfect prompt can be a process of trial and error, so don’t shy away from giving it another go when your first prompt doesn’t fetch you the desired answer. Moreover, recycling prompts can also be smart in a few cases because using the same prompt twice can produce a vastly different output sometimes.

Story continues below this ad

Now that you’ve learnt the basics of prompt engineering, you should be able to use AI chatbots more efficiently and get the desired results. Remember to be specific, provide sample outputs, include relevant context, and iterate if necessary. As AI chatbot technology continues to evolve, mastering prompt engineering will empower you to leverage these powerful tools effectively, making your interactions more productive and seamless.

Zohaib is a tech enthusiast and a journalist who covers the latest trends and innovations at The Indian Express's Tech Desk. A graduate in Computer Applications, he firmly believes that technology exists to serve us and not the other way around. He is fascinated by artificial intelligence and all kinds of gizmos, and enjoys writing about how they impact our lives and society. After a day's work, he winds down by putting on the latest sci-fi flick. • Experience: 3 years • Education: Bachelor in Computer Applications • Previous experience: Android Police, Gizmochina • Social: Instagram, Twitter, LinkedIn ... Read More

Technology on smartphone reviews, in-depth reports on privacy and security, AI, and more. We aim to simplify the most complex developments and make them succinct and accessible for tech enthusiasts and all readers. Stay updated with our daily news stories, monthly gadget roundups, and special reports and features that explore the vast possibilities of AI, consumer tech, quantum computing, etc.on smartphone reviews, in-depth reports on privacy and security, AI, and more. We aim to simplify the most complex developments and make them succinct and accessible for tech enthusiasts and all readers. Stay updated with our daily news stories, monthly gadget roundups, and special reports and features that explore the vast possibilities of AI, consumer tech, quantum computing, etc.

Latest Comment
Post Comment
Read Comments
Advertisement
>
Loading Taboola...
Advertisement