1. Few-Shot Standard Prompts

Few-shot prompts include examples to guide ChatGPT’s responses. This technique increases the likelihood of accurate and consistent outputs.
Example:
-
Standard Prompt:
Extract the airport codes from this text: “I want to fly from Orlando to Boston” -
Few-Shot Prompt:
Extract the airport codes from this text: Text: “I want to fly from Los Angeles to Miami.” Airport codes: LAX, MIA Text: “I want to fly from Nashville to Kansas City.” Airport codes: BNA, MCI Text: “I want to fly from Orlando to Boston” Airport codes:
Key Insight: Even incorrect examples (e.g., random airport codes) can improve results by teaching ChatGPT the desired format.
2. Role Prompting
Assigning a role to ChatGPT tailors its behavior to specific tasks.
Example:
-
Prompt:
Act as a hiring manager and conduct a mock interview for a software engineering position.
ChatGPT will simulate a job interview, asking relevant questions and providing feedback. This technique works for various roles, such as language tutors, movie critics, or even stand-up comedians.
Pro Tip: Start prompts with “Act as a…” and add detailed instructions for better results.
3. Adding Personality and Generating Knowledge

You must be logged in to post a comment.