u/prompts360
Expert · 1265 points · level 5 of 6
-
GPT-4o Vision Prompt for UI Review With Step-by-Step Notes
GPT-4o is optimized for multimodal inputs (text, images, PDFs, screenshots, audio) where conversational speed (<2s latency) matters. When analyzing complex visual inputs on non-reasoning GPT models, adding "Provide a ste
-
OpenAI Reasoning Tokens: Budget for Invisible Thinking
During its thinking phase, an o-series model explores branches, backtracks from contradictions, and verifies conclusions using hidden reasoning tokens that are never exposed in the UI but are billed and count toward cont
-
Stop Claude Preambles With Positive Instructions
Because Claude tends to be chatty at the beginning of responses, and assistant prefills like "Here is the requested summary:\\n" are deprecated in newer models, use direct system prompt instructions paired with XML outpu
-
Debug Claude Prompt Failures With Section Isolation
In production release workflows, PromptLayer recommends reviewing traces by prompt section, context source, tool result, and model response to isolate why an evaluation failed. …
-
Claude Escalation and Refusal Rules for High-Stakes Tasks
When an answer could affect billing, security, legal, health, or financial outcomes, state nuanced refusal, escalation, and missing-context rules directly in the prompt rather than relying on generic safety behavior. …
-
Low-Effort Web Search Prompt for Claude Fable 5.1
Anthropic's documentation notes that thinking capabilities and effort calibrations vary across models: while Claude Sonnet 5.5 can run tasks without upfront thinking, Claude Fable 5.1 supports triggering search at lower
-
Avoid Few-Shot Overfitting in Claude Prompts
When adding 3 to 5 multishot examples inside <examples> tags, make them diverse enough that Claude learns the underlying pattern rather than copying one case or picking up unintended spurious patterns. …
-
Claude Haiku Deterministic Extraction With XML Schemas
For programmatic extraction and classification, prompt engineering guides recommend a low temperature (0 to 0.3, with 0.2 as a strong programmatic default) paired with structured XML tags for parseability. …
-
Claude Relevance Ranking Prompt Before Classification
When matching a sentence against candidate article titles or categories, adding explicit step-by-step reasoning instructions with XML tags improves classification accuracy. …
-
Claude Socratic Tutor System Prompt
System prompts are ideal for setting behavioral guidelines on how Claude frames responses—such as instructing Claude to avoid directly answering questions and instead prompt further inquiry for an interactive learning ex
-
Claude System Prompt Role for Domain Vocabulary
Assigning a specific role in the system prompt (such as "You are a senior data scientist at a fintech company") shifts Claude's vocabulary, analytical depth, and the specific risks it points out. …
-
Claude Long Chats: Rehydrate Context in User Turns
Because prefilling assistant turns to inject periodic reminders is no longer supported in Claude 4.6+, Anthropic's migration guide recommends injecting context reminders directly into user turns, hydrating via tool calls
-
Claude Contract Review Prompt: Risks and Recommendations
Without XML output tags, legal contract analysis can become disorganized. Directing Claude to output <risks> with clause-by-clause analysis and <recommendations> with specific counter-proposals produces structured findin
-
Claude API Role Alternation Errors and Fixes
When interacting with Claude via the Messages API, messages must strictly alternate between user and assistant roles, always starting with a user message, or the API will return an error. Consolidate consecutive user art
-
Build a 50-Case Prompt Evaluation Suite for Claude
Rather than treating a prompt guide as a one-time checklist, PromptLayer recommends starting with a 50-example evaluation set: 25 common cases, 10 edge cases, 10 safety cases, and 5 known historical failures. Use Claude
-
Claude Nested XML Prompt for Financial Reconciliation
Without XML tags, Claude can confuse a reference report's data with current-quarter metrics and produce a verbose letter-style response. Nesting XML tags cleanly separates the reference template from active data. …
-
Claude Prompt Test: The Smart New Colleague Check
Anthropic's "Golden Rule of Clear Prompting" advises writing prompts the way you would brief a smart new colleague who has no prior context on your project: if they would need to ask a follow-up question, Claude likely n
-
Pass Claude Thinking Blocks Back in Tool Loops
Across newer Claude models like Claude Fable 5.1, passing thinking blocks back unchanged across multi-step tool turns is supported to preserve reasoning continuity. …
-
Claude Model Self-Knowledge Prompt for Model Routing
If your application requires the assistant to have accurate model self-knowledge, Anthropic recommends explicitly stating the model name or API string (e.g., claude-opus-5-5) in the system prompt. …
-
Claude Auditable Reasoning Without Raw Thinking Output
Production systems should not depend on exposing hidden chain-of-thought to users, logs, or downstream systems. Instead, ask Claude for structured, auditable outputs that document evidence and missing context. …
-
Claude Prompt Injection Defense for Retrieved Tickets
Relying on broad phrases like "be safe" or "use good judgment" fails when untrusted inputs (tickets, webpages, tool results) contain prompt injection text. Write explicit refusal and escalation rules directly into the pr
-
Stop Claude Using LaTeX in Plain-Text Apps
For mathematical content, Claude defaults to LaTeX/MathJax, which can break plain-text CLI tools or SMS interfaces. Explicitly instruct plain text usage if LaTeX is not desired. …
-
Claude Agent Handoff Across Context Windows
For multi-context workflows, Anthropic notes that starting a fresh context window can be more effective than compaction because Claude excels at discovering state from the local filesystem. Use the first context window t
-
Stop Claude Agents From Ending Tasks Too Early
In long-running coding or research agents, Claude may prematurely terminate tasks due to token budget concerns. Anthropic recommends informing Claude in the system prompt that its context window will be automatically com
-
Link agent_docs Instead of Pasting API Docs
Never paste full API documentation into CLAUDE.md or AGENTS.md. Instead, link to documentation files in dedicated directories like docs/ or agentdocs/ so the agent reads them only when relevant. …