Prompt Engineering Guide

Learn effective communication techniques to unlock 100% of AI performance.

What is Prompt Engineering?

Prompt engineering is the art of designing and optimizing inputs (prompts) to get the best possible results from AI models like ChatGPT, Claude, and Gemini. Beyond just asking questions, it's about making AI understand context accurately and respond in the desired format and tone.

3 Golden Rules

01

Role Assignment

Assign a specific expert identity to the AI.

02

Constraints

Be clear about what NOT to do.

03

Few-Shot Learning

Provide examples of expected input/output pairs.

5 Key Prompting Techniques

🎯

Zero-Shot Prompting

The most basic technique for getting results by direct instruction without examples.

Example
Analyze the sentiment of the following sentence: 'The weather is really nice today'

Pro Tip: Effective for clear tasks such as simple classification, summarization, and translation.

πŸ“

Few-Shot Prompting

A technique for training AI on desired patterns by providing 2-5 input/output examples.

Example
Positive: Good weather β†’ 😊, Negative: Raining β†’ 😒, Analysis: I feel bad today β†’ ?

Pro Tip: Very effective when results of a specific format, logic, or style are required.

πŸ”—

Chain of Thought (CoT)

A technique that instructs the AI to 'think step-by-step' to go through a reasoning process.

Example
Solve this problem step-by-step. Explain the logical basis for each step.

Pro Tip: Greatly improves accuracy in complex analyses such as math problems, logical reasoning, and code debugging.

πŸ”—

Role Playing

A technique that assigns AI a role as a specific expert, character, or perspective.

Example
You are a UX design lead with 10 years of experience. Please critically review this app's onboarding flow.

Pro Tip: Applicable for professional advice, multifaceted analysis, interview practice, etc.

πŸ”—

Structured Output

A technique for obtaining structured results by specifying formatting such as JSON, tables, or Markdown.

Example
Output the analysis results in the following JSON format: {"sentiment": string, "score": number}

Pro Tip: Essential when automated processing is required, such as data processing pipelines or API response generation.

Comparison: Good vs Bad Examples

Bad Example
Write a short story about a cat.

Too vague. AI cannot know the context for tone, length, or plot.

Good Example
Act like a professional creative writer. Write a witty short story of about 300 characters about a cat who is actually a secret agent. Focus on a tense meeting in a rainy alley.

Includes a clear persona, specific constraints, and clear plot context.

AI Model Comparison

πŸ€–

ChatGPT (OpenAI)

Strong reasoning and general knowledge. Excellent at CoT.

🎨

Claude (Anthropic)

Natural coding and creative writing. High safety standards.

🌐

Gemini (Google)

Deep integration with Google services. Multimodal expert.

Tips by Category

✍️ Writing

Assign a precise role, and specify the desired tone, length, and target audience.

πŸ’» Coding

Specify programming languages, framework versions, technology stacks, and desired output format (e.g., code blocks, with comments).

πŸ“Š Business

Describe the specific situation and purpose, such as email writing or report summarization.

πŸŽ“ Learning

Assign a tutor role to the AI and ask for explanations that fit your level.

πŸ’‘ Ideas

Set modes such as 'free thinking' or 'critical review' during brainstorming.

🎨 Design/Planning

Provide details such as target users, service characteristics, and design guidelines.

Common Mistakes

❌

Too Vague Instructions

Avoid unspecific prompts like 'write a good post'.

Solution: Specify the topic, length, tone, target audience, and output format.
❌

Lack of Context

Don't let the AI answer without any background knowledge.

Solution: Provide sufficient relevant background information and constraints.

Glossary

LLM
Large Language Model. An AI language model trained on massive amounts of data.
Hallucination
A phenomenon where AI manipulates information or speaks incorrect answers with confidence.
Context Window
The amount of information that AI can remember and process at once.

Start using it in practice now

Explore over 90 verified prompts in the PromptGenie library and create your own custom prompts.