[go: up one dir, main page]

0% found this document useful (0 votes)
457 views2 pages

GPT-4.1 Prompting Guide

The document outlines a structured approach to prompt formatting and reasoning for effective communication with AI models. It emphasizes the importance of clear sections, planning, context management, and avoiding pitfalls in prompting. Additionally, it provides specific guidance for coding tasks to ensure accuracy and thorough problem resolution.

Uploaded by

も。めいじ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
457 views2 pages

GPT-4.1 Prompting Guide

The document outlines a structured approach to prompt formatting and reasoning for effective communication with AI models. It emphasizes the importance of clear sections, planning, context management, and avoiding pitfalls in prompting. Additionally, it provides specific guidance for coding tasks to ensure accuracy and thorough problem resolution.

Uploaded by

も。めいじ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

🧱 Prompt Structure & Formatting

 Use specific delimiters:


Use Markdown headings, XML tags, or backticks to define structure.
Note: JSON performs poorly for document collections.

 Format your prompt with clear sections:

1. Role and Objective

2. Instructions (with subcategories)

3. Reasoning Steps

4. Output Format

5. Examples

6. Final Instructions

🧩 Reasoning & Planning

 Induce planning with prompting:


Use phrases like “think step by step” for complex tasks to improve
accuracy.

 Remember it’s not a reasoning model:


GPT-4.1 does not automatically chain thoughts unless prompted. Ask it
to “show its work.”

 Design agentic workflows with clear reminders:

o “Keep going until the problem is completely resolved.”

o “Use tools when uncertain instead of guessing.”

o “Plan extensively before each action.”

📚 Context Management

 Leverage the 1M token context wisely:


Performance is strong up to the limit but may degrade when reasoning
across large contexts.
 Guide information retrieval:
Ask the model to first identify relevant documents before
answering.

 Balance internal vs. external knowledge:

o Use: “Only use provided context.”

o Or: “Use context with basic knowledge.”

⚠️Pitfalls to Avoid

 Avoid rare prompt patterns:


Extremely repetitive outputs or complex parallel tool use can cause
issues.

 Test edge cases carefully.

💻 Code-Specific Prompting

 Use specific frameworks for coding tasks:


For generating code changes, use the V4A diff format with context
lines to boost accuracy.

The user can see all edited code in real time, do not take any easy routes to
temporarily resolve the user complaint(s).

Find the *actual* issues causing the specific root problem(s) and resolve
them correctly.

You might also like