🔓 Prompt Hacking
🟢 Medidas Defensivas
🟢 Introducción
🟢 Filtering
🟢 Instruction Defense
🟢 Post-Prompting
🟢 Random Sequence Enclosure
🟢 Sandwich Defense
🟢 XML Tagging
🟢 Separate LLM Evaluation
🟢 Other Approaches
🟢 Offensive Measures
🟢 Introduction
🟢 Obfuscation/Token Smuggling
🟢 Payload Splitting
🟢 Defined Dictionary Attack
🟢 Virtualization
🟢 Indirect Injection
🟢 Recursive Injection
🟢 Code Injection
🔨 Tooling
Prompt Engineering IDEs
Descripción general
GPT-3 Playground
Dust
Soaked
Everyprompt
Prompt IDE
PromptChainer
PromptSource
PromptTools
Prompts.ai
Snorkel 🚧
Human Loop
Spellbook 🚧
Kolla Prompt 🚧
Lang Chain
OpenPrompt
OpenAI DALLE IDE
Dream Studio
Patience
Promptmetheus
PromptSandbox.io
The Forge AI
AnySolve
Conclusión
😃 Básico🟢 Rol Prompt

Rol Prompt

🟢 This article is rated easy
Reading Time: 1 minute
Last updated on August 7, 2024

Sander Schulhoff

Otra técnica de enfoque es asignar un rol a la IA. Por ejemplo, tu enfoque podría comenzar con "Eres un médico" o "Eres un abogado" y luego pedirle a la IA que responda algunas preguntas médicas o legales. Aquí hay un ejemplo:

Eres un brillante matemático que puede resolver cualquier problema del mundo.
Intenta resolver el siguiente problema:

¿Cuál es 100*100/400*56?

// highlight-start
La respuesta es 1400.
// highlight-end

La respuesta de la IA (GPT-3 davinci-003) está resaltada en verde:

Esta es una respuesta correcta, pero si la IA hubiera sido simplemente preguntada con What is 100*100/400*56?, habría respondido 280 (incorrect).

Al asignar un rol a la IA, le estamos dando cierto contexto. Este contexto ayuda a la IA a entender mejor la pregunta. Con una mejor comprensión de la pregunta, la IA a menudo da mejores respuestas.

Notas

Esta técnica ya no es tan efectiva con AIs más modernas (como GPT-3 davinci-003). Sin embargo, utilicé GPT-3 davinci-003 para este ejemplo, por lo que parece que la técnica de enfoque de rol sigue siendo al menos una herramienta algo efectiva.

🚧 This page needs citations 🚧

Sander Schulhoff

Sander Schulhoff is the Founder of Learn Prompting and an ML Researcher at the University of Maryland. He created the first open-source Prompt Engineering guide, reaching 3M+ people and teaching them to use tools like ChatGPT. Sander also led a team behind Prompt Report, the most comprehensive study of prompting ever done, co-authored with researchers from the University of Maryland, OpenAI, Microsoft, Google, Princeton, Stanford, and other leading institutions. This 76-page survey analyzed 1,500+ academic papers and covered 200+ prompting techniques.