Why Prompts Matter
AI Action is powerful, but its effectiveness depends entirely on how you communicate your intent. A vague prompt leads to unpredictable behavior. A well-crafted prompt leads to reliable, repeatable automation. This guide introduces the PRECISE framework — a mental model for writing effective prompts. Not every prompt needs all seven elements, but understanding each lever helps you diagnose issues and improve results.The PRECISE Framework
Think of PRECISE as diagnostic levers, not a checklist. When something isn’t working, identify which lever to adjust.
P — Position
Ground the element in its UI context. When the agent clicks the wrong element or can’t find the right one, add positional context to disambiguate.R — Route
Specify the interaction method. When the default interaction doesn’t work, explicitly state how to interact with the element.right clickvsleft clickdouble clickpress Enter after entering the valuehover over(for tooltips or dropdowns)drag and drop
E — Effect
Describe what should change after the action. When the agent doesn’t wait for UI changes or moves on too quickly, describe the expected outcome.C — Constraints
Set boundaries on what should NOT happen. When the agent overshoots, repeats actions, or continues beyond the intended scope, add explicit limits.ONCE only, not more than thatdon't click submit after fillingdon't close the modaldon't navigate away from this page
I — Interval
Provide wait expectations for async operations. When actions fail due to loading states, animations, or network requests, add timing guidance.S — Specifics
Use exact values, properly formatted. When inputs are misinterpreted or malformed, be explicit about the exact data.- Use single quotes around literal values:
'value' - Use expressions for dynamic data:
{{random.email()}} - Be explicit about date formats, number formats, etc.
E — End State
Define how to verify success. When you need confirmation that the action worked before proceeding, ask for explicit verification.Quick Diagnostic Guide
Use this table to quickly identify which PRECISE lever to adjust:| If the agent… | Adjust this lever |
|---|---|
| Clicks the wrong element | Position |
| Uses wrong click type or misses keystrokes | Route |
| Doesn’t wait for UI changes | Effect |
| Does too much or repeats actions | Constraints |
| Fails on loading/animation | Interval |
| Enters wrong or malformed data | Specifics |
| Moves on without confirming success | End State |
Batching Related Actions
When multiple actions are logically connected, batch them in a single prompt with clear sequencing.- Create → Verify → Delete flows
- Form fill → Submit → Verify success
- Navigate → Interact → Assert
Complete Examples
Example 1: Context Menu Interaction
- Position: “first folder in the content section”
- Route: “Right click”
- Effect: “to open the context menu”
- Constraints: “ONCE only”
Example 2: Form with Dynamic Behavior
- Position: “in the test plans page”
- Effect: “to open the test plan creation modal”
- Specifics: exact values in quotes
- Route: “press Enter after entering”
- Interval: “may take 1-2 sec”
- Constraints: “Don’t click the create button”
Example 3: Full CRUD Flow
- Position: “on the environments page”, “in the sidebar list”
- Effect: “to open the environment creation modal”
- Specifics:
'{{random.firstName()}}' - End State: “Verify the environment appears”, “Verify removed”
- Interval: “Wait 2-3 seconds”
- Route: “Right click”
Example 4: Scroll with Constraints
- Constraints: “ONCE only, not more than that”
Example 5: Submit with Wait
- Effect: “will close the modal”
- Interval: “3-5 seconds”
- Constraints: “don’t reopen it”
Common Patterns
Pattern: Create and Verify
Pattern: Delete with Confirmation
Pattern: Filter and Select
Pattern: Multi-Input Form
Tips for Success
Start simple, add complexity
Start simple, add complexity
Begin with the basic action. If it fails, progressively add PRECISE elements until it works reliably.
Use the execution logs
Use the execution logs
When a prompt fails, check the AI’s execution logs to understand what it did and why. This reveals which PRECISE lever needs adjustment.
Be explicit about transitions
Be explicit about transitions
UI state changes (modal opens, page navigates, drawer slides in) are common failure points. Always describe what should happen after an action.
Quote your values
Quote your values
Using single quotes around values (
'value') makes it clear what the exact input should be, preventing interpretation errors.Constraints prevent overreach
Constraints prevent overreach
If the agent does more than expected, add explicit “don’t” statements. The agent follows instructions literally — boundaries prevent runaway behavior.

