Quick Overview
Prompts are instructions you give to control how AI behaves and what it produces. Every time you use “AI Prompt” mode in field configuration or set up agent steps, you’re writing prompts that tell Lindy exactly what to do. Good prompts make the difference between agents that work reliably and ones that produce unpredictable results. You’ll use them throughout Lindy - from simple field instructions like “write a friendly email subject line” to complex agent behaviors like “analyze customer sentiment and route to the appropriate department.”Where to Prompt in Lindy
Lindy provides three key areas where you can add prompts, each serving a specific purpose in your automation workflow.1. Agent-Level Settings
These are overarching instructions that Lindy keeps in mind throughout the entire automation process. They’re added as a prefix to every LLM call made by this agent.
Agent-level prompts are perfect for setting personality, tone, domain expertise, and consistent behavior patterns across all actions.
2. Action Parameters
Specific instructions for completing particular fields within actions. These provide precise control over individual steps in your workflow.
3. AI Agent Actions
When next steps are uncertain or highly variable, AI Agents use broad guidelines and skills to determine the best course of action.
Core Prompting Principles
Be Direct and Specific
Skip pleasantries and ambiguous language. Your agent executes direct commands most effectively.- ✅ Effective
- ❌ Ineffective
Use Action-Oriented Language
Prefer imperative verbs (“do”) over passive suggestions (“don’t”).- ✅ Active
- ❌ Passive
Define Clear Personas
Give your agent a clear role and expertise level for consistent responses.Step-by-Step Instructions
Break down complex tasks into simple, sequential steps, guiding your agent through each part of the process.Advanced Prompting Techniques
1. Chain of Thought (CoT)
Guide your agent through complex reasoning by breaking down the thinking process.2. Few-Shot Examples
Provide examples to demonstrate the exact format and style you want.3. Output Formatting
Specify exact output structure for consistent, parseable results.4. Constraints and Boundaries
Set clear limits to prevent unwanted behaviors.5. Context Injection
Reference available data and previous interactions.6. Conditional Logic
Build prompts that adapt based on input conditions.7. Error Handling
Anticipate edge cases and provide fallback instructions.Essential Prompting Elements
Keywords and Phrases
Incorporate essential words to emphasize important aspects and priorities:- “Your task is…”
- “You MUST…”
- “It is crucial that…”
- “You will be penalized if…”
Use Delimiters Effectively
Delimiters organize information and reduce ambiguity:- Triple quotes:
"""example text""" - Triple backticks:
```example text``` - Triple dashes:
---example text--- - XML-like tags:
<example>example text</example> - Hashtags:
###example text###
Consistency is Key
Instruct Lindy to maintain the flow and style of writing from previous steps in the workflow or examples you have added to the prompt. This ensures a cohesive output across the entire process.Clear Formatting
Separate instructions with line breaks for clarity. This visual organization helps Lindy process information more effectively.Enhance Specificity
Provide complete information for tasks that require detailed responses or actions. Context is crucial for accurate results.Edit for Clarity
Every word matters! Proofread your prompts for grammar, punctuation, and vocabulary to ensure they are clear and consistent. Ambiguity can lead to unexpected results.- ✅ Clear
- ❌ Ambiguous
Best Practices
Start with simple prompts and iterate
Start with simple prompts and iterate
Begin with basic instructions and add complexity as you test. Monitor agent behavior and refine based on actual outputs.
Use consistent terminology
Use consistent terminology
Define key terms once and use them consistently. If you call it “customer” in one place, don’t switch to “client” elsewhere.
Test with edge cases
Test with edge cases
Try unusual inputs, empty fields, and unexpected formats. Build prompts that handle these gracefully.
Leverage available context
Leverage available context
Reference trigger data, previous actions, and knowledge base content. The more context, the better the response.
Version and document changes
Version and document changes
Keep track of prompt iterations and why changes were made. This helps troubleshooting and team collaboration.
Troubleshooting
Agent provides inconsistent responses
Agent provides inconsistent responses
- Add more specific examples
- Define clearer boundaries and constraints
- Check for conflicting instructions between agent-level and action-level prompts
Output format varies
Output format varies
- Use structured formats (JSON, markdown)
- Provide exact templates to follow
- Add validation rules for critical fields
Agent misses important information
Agent misses important information
- Make extraction instructions more explicit
- Add fallback searches for alternative formats
- Use step-by-step extraction logic
Responses are too verbose or too brief
Responses are too verbose or too brief
- Set specific word/character limits
- Provide length examples
- Use “concise” or “detailed” qualifiers appropriately
Agent doesn't follow conditional logic
Agent doesn't follow conditional logic
- Simplify conditions to be mutually exclusive
- Use clear if-then-else structures
- Test each condition path separately
Remember that prompts in action parameters override agent-level prompts for that specific field. Ensure they complement rather than contradict each other.