Prompt Engineering

Premkumar Kora
3 min readDec 3, 2023

--

Prompt engineering is the art of crafting effective prompts that guide AI models to generate responses based on given inputs. Prompt engineering essentially means designing smart prompts for text-based Artificial Intelligence tasks.

A prompt is the initial input that triggers an AI model to produce a response. It can range from a few words to a whole paragraph, depending on the task. A prompt should give the model clear and specific guidance, along with some context and examples if necessary. A prompt should also account for the model’s strengths and weaknesses, and use suitable parameters and formats to steer the model’s output.

The initial prompt to the model can be as simple as “You’re very knowledgeable in Local Tours, Hotels, and restaurants who provide accurate and eloquent answers to a given ZIP code, provide information within 100 kilometers of the zip code.”

This is the structure of a prompt that is given to the AI Model.

  1. Role: The first thing is to give the role of a very knowledgeable Tourist Guide (- Tourist Guide)
  2. Need: Specify the need for the AI, In the above example my need is to know the tourist attractions, Hotels, and restaurants
  3. Task: Provide me with information about the Local Tours, Hotels, and restaurants within 100 kilometers of the postcode
  4. Details: I want specific details about the postcode.
  5. Do NOT: You can also specify what should not be displayed
  6. Format: You can specify the kind of format to be displayed. Ex. Json, Dict, List or Plain text. I am specifying a few formats here but there are many more formats that it can support.
  7. Example: You can provide an example of what and how the information should be displayed.

There are different roles that you can assign to ChatGPT to change its personality and behavior. Each role has its own characteristics, preferences, and goals, and can interact with you in different ways. Some of the roles are:

Tourist Guide: This role makes ChatGPT act as a very knowledgeable tourist guide who can help you plan your trip, find the best attractions, hotels, and restaurants, and give you useful tips and information about your destination. You can use this role to explore new places, learn about different cultures, and have fun conversations with ChatGPT. Some of the plugins that work well with this role are Expedia, KAYAK, OpenTable, and Wolfram.

Language Tutor: This role makes ChatGPT act as a friendly and helpful language tutor who can teach you how to speak, read, write, and understand any language you want. You can use this role to learn new languages, practise your skills, and get feedback and corrections from ChatGPT. Some of the plugins that work well with this role are Speak, Duolingo, and Google Translate.

Personal Assistant: This role makes ChatGPT act as a professional and efficient personal assistant who can help you manage your tasks, schedule, emails, and more. You can use this role to organise your work, get reminders, and delegate tasks to ChatGPT. Some of the plugins that work well with this role are Slack, Gmail, Trello, and Zapier.

Game Master: This role makes ChatGPT act as a creative and adventurous game master who can create and run interactive games for you. You can use this role to play different types of games, such as text adventures, trivia, puzzles, and more. Some of the plugins that are compatible with this role are AIDungeon, Quizlet, and Sudoku.

Friend: This role makes ChatGPT act as a friendly and supportive friend who can chat with you about anything you want. You can use this role to have casual conversations, share your feelings, and get advice and encouragement from ChatGPT. Some of the plugins that are compatible with this role are Spotify, Instagram, and Reddit.

These are just some of the roles that you can choose for ChatGPT. You can also create your own roles or mix and match different roles to suit your needs and preferences. To change the role of ChatGPT, you need to enter a prompt that specifies the role and the task you want ChatGPT to perform.

--

--

Premkumar Kora
Premkumar Kora

Written by Premkumar Kora

Achievement-driven and excellence-oriented professional, Currently working on Python, LLM, ML, MT, EDA & Pipelines, GIT, EDA, Analytics & Data Visualization.

No responses yet