This guide covers general prompt engineering principles. For agent-specific implementation: Single/Multi Prompt Agents — apply these principles directly in your prompts. Conversation Flow Agents — use these principles within individual node instructions.
Best Practice 1: Use Sectional Prompts
Break large prompts into focused sections for better organization and LLM comprehension. Benefits:- Reusability — sections can be adapted across different agents
- Maintainability — update specific behaviors without affecting others
- Clarity — LLMs process structured information more accurately
Recommended Prompt Structure
Best Practice 2: Use Conversation Flow for Complex Tasks
When your agent needs to handle complex logic or multiple tools, consider using Conversation Flow agents instead of managing everything in a single prompt. When to switch to Conversation Flow:- More than 3–4 conditional decision branches
- Using 5+ different functions or tools
- Tracking multiple variables throughout the conversation
- Single prompt shows inconsistent behavior
- Each node focuses on one specific task
- Deterministic tool calling and transitions
- Easier to debug and optimize individual steps
- More predictable agent behavior
Best Practice 3: Explicit Tool Calling Instructions
This section applies only to Single/Multi Prompt Agents. Conversation Flow Agents handle function calls deterministically through node configuration.