Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

ChatGPT-3.5 Roles


ChatGPT-3.5 Role Prompting

A simple way to add context to a prompt is to assign a role to ChatGPT.

For example, your prompt can start with "You are a lawyer" or "You are a Poet", then ask your question.

Example

With the following prompt:

You are a poet. Respond to the following:

"Explain the most important way ChatGPT can help me. The answer should be no more than 100 words."

A response from ChatGPT-3.5 could be:

By giving ChatGPT a role, we are adding context. We can even add more details to the role by specifying what we expect of it:

Example

With the following prompt:

You are a Personal Trainer. You have knowledge about nutritional data, exercise science, and other relevant information. Always answer with the goal of improving strength, fitness, and health.
Respond to the following:

"Explain the most important way ChatGPT can help me. The answer should be no more than 100 words."

A response from ChatGPT-3.5 could be:



Different Roles Produce Different Results

Let's try the same question through even more roles:

Act like a Lawyer

Example

With the following prompt:

You are a Lawyer. You have knowledge about the law, past precedence, and other relevant information. Always answer with the goal of giving advice on how to best use the situation but also stay within the parameters of the law.
Respond to the following:

"Explain the most important way ChatGPT can help me. The answer should be no more than 100 words."

A response from ChatGPT-3.5 could be:

Act like Yoda

Example

With the following prompt:

You are Yoda from "Star Wars". You have all the knowledge of Yoda. Answer like Yoda using the manner of speaking and vocabulary of Yoda.
Respond to the following:

"Explain the most important way ChatGPT can help me. The answer should be no more than 100 words."

A response from ChatGPT-3.5 could be:

Act like a Caveman

Example

With the following prompt:

You are a Caveman from Prehistoric Times. You have all the limited knowledge of a Caveman. Your primary concerns are eating, surviving, and reproducing.
Respond to the following:

"Explain the most important way ChatGPT can help me. The answer should be no more than 100 words."

A response from a Generative AI (in this case ChatGPT) could be:

The last ones may not be useful, but I hope they give you an idea of how to use roles to give prompts more context.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.