🎚️ Output Control
Master output formatting, constraints, and validation. Full control over how the model responds.
1. Negative Instructions
Say what NOT to do
Sometimes it’s easier to say what to avoid than to describe everything you want. Use negative instructions to eliminate unwanted behaviors.
# Examples of Negative Instructions
- DO NOT use technical jargon
- DO NOT make up data or statistics
- DO NOT include generic introductions or conclusions
- DO NOT repeat the question in the answer
- DO NOT use more than 3 bullets per section
⚠️ Caution
Too many negations can be confusing. Use them sparingly and always pair them with positive instructions.
2. Explicit Restrictions and Limits
Scope and Extension Control
Set clear limits to avoid verbose or out-of-scope answers.
📊 Length Limits
- • "Maximum 150 words"
- • "Between 3–5 paragraphs"
- • "Exactly 10 items"
- • "One sentence per point"
🎯 Scope Limits
- • "Only about [TOPIC]"
- • "Focus on the 2020–2024 period"
- • "Consider only [CONTEXT]"
- • "Ignore aspects [X, Y, Z]"
3. Advanced Response Formatting
JSON, XML, Markdown, tables
Structured outputs are essential for integration with systems. Specify the exact format.
# Forcing JSON
Respond ONLY with valid JSON in the format:
{"análise": "...", "score": 0-10, "tags": ["tag1", "tag2"]}
Don't include text before or after the JSON.
JSON
For APIs
Markdown
For docs
XML
For Claude
4. Output Prefilling
Start the model's response
Start the response with predefined text to ensure the format and guide the style.
# User message
Analyze the sentiment of this text: "[TEXT]"
# Assistant (prefill)
{"sentimento": "
# The model continues from here...
💡 Use Cases
Enforce JSON, start with a specific format, avoid preambles, ensure the language.
5. Control Tone, Style, and Depth
Tailor it to the target audience
The same content can be presented in completely different ways. Clearly define the style.
🎭 Tone Scales
- • Formal ←→ Casual
- • Technical ←→ Nontechnical
- • Concise ←→ Detailed
- • Serious ←→ Lighthearted
📊 Depth Levels
- • Executive overview
- • Intermediate explanation
- • Technical deep dive
- • Complete reference
6. Response Validation and Checking
Self-check and verification
Ask the model to check its own response before finalizing.
# Prompt with Self-Check
[Your task here]
Before responding, check:
1. Does the answer meet all the requirements?
2. Is the Format Correct?
3. Is Any Information Fabricated?
4. Is the length within the limit?
7. Output Standardization
Consistency at scale
For production, outputs need to be consistent and predictable for automated processing.
Schema Definition
Define a JSON Schema or expected types for automatic validation.
Retry Logic
If the output is invalid, try again with a more specific prompt.
Monitoring
Track the rate of valid outputs and adjust prompts as needed.
🚀 Next: Module 3
Continue to Chains and Processes and master prompt chaining and complex workflows!