Many blocks in Jsonify, such as Extract Data, Explore Content, Find Links, and Interact with Page, rely on your natural language instructions to guide the AI Agent. The quality of these instructions directly impacts the performance, accuracy, and reliability of your workflows. This page provides best practices for crafting effective AI prompts.

General Principles for AI Instructions

  1. Be Specific and Unambiguous:

    • Avoid vague terms. Instead of “Get the important details,” specify which details: “Extract the product name, price, and SKU.”
    • Clearly identify target elements. Instead of “Click the button,” use “Click the button labeled ‘Add to Cart’.”
  2. Provide Sufficient Context:

    • Briefly tell the AI what kind of page it’s on or what the overall goal is, if it helps clarify the task.
    • Example for Extract Data: “You are on a product detail page. Extract the following specifications.”
  3. Use Simple and Direct Language:

    • AI understands straightforward language best. Avoid complex sentence structures, jargon (unless it’s specific to the domain and the AI would know it), or colloquialisms.
    • Keep instructions concise but complete.
  4. One Clear Task per Instruction (Usually):

    • For blocks like Interact with Page (when used step-by-step), each line should represent one distinct action.
    • For Extract Data attributes, each “Description” should clearly define one piece of information.

Tips for Specific Block Types

Extract Data

This is often the most instruction-heavy block.

  • NAME Column: Use clear, unique, and descriptive names for your data fields (e.g., product_price, author_name). These become your JSON keys or column headers.
  • EXAMPLE VALUE OR A LONGER DESCRIPTION Column: This is critical!
    • Be Very Descriptive: Explain what the data is and where/how to find it if there’s ambiguity.
    • Provide Concrete Examples: E.g., for review_date, write: The date the review was published, e.g., "March 15, 2024" or "2 days ago". Extract in YYYY-MM-DD format if possible.
    • Indicate Data Type (Implicitly or Explicitly): E.g., “Extract the rating as a number out of 5.”
    • Specify Format if Necessary: E.g., “Extract the phone number including the country code.”
  • “Add additional instructions and guidance…” Field:
    • Global Rules: “Translate all extracted text to English.”
    • Handling Missing Data: “If a rating is not found, leave the rating_stars field empty.”
    • Negative Constraints: “Do not extract prices from the ‘Customers also bought’ section.”
    • Disambiguation: “If multiple dates are present, extract the ‘last updated’ date.”

Explore Content

  • Crafting the Goal:
    • Clearly state the type of information or page(s) you’re looking for.
    • Example: “Find all pages on this site that discuss pricing plans for enterprise customers.”
    • If exploring search results: “From these Google search results, identify and open the official company website for {{company_name}}.”
  • Describing Target Links:
    • Use anchor text: Find the link with text 'Download PDF'
    • Use URL patterns: Find all links that contain '/product-details/'
    • Combine with context: In the main product grid, find the link for each product image.

Interact with Page

  • Step-by-Step Actions:
    • Clearly identify the element: click on the button with text 'Next Page', type {{user_query}} into the search bar with placeholder 'Search articles...'
    • Be explicit about the action: click, type, select 'Option A' from dropdown 'Category'
  • Goal-Oriented Tasks (if using increased steps):
    • Clearly state the desired outcome on the page: Complete the login form with username {{username}} and password {{password}} and submit it.

Iterative Refinement: The Key to Success

It’s rare to get AI instructions perfect on the first try.

  1. Test with a Small Sample: Run your workflow on one or a few examples.
  2. Analyze Results: Carefully examine what the AI extracted or how it behaved.
    • Did it miss information?
    • Did it extract the wrong information?
    • Did it interact with the wrong element?
  3. Refine Your Instructions: Based on the analysis, make your instructions more specific, add examples, or clarify ambiguities.
    • If it’s too broad, add constraints.
    • If it’s too narrow and misses valid cases, generalize slightly or add alternative descriptions.
  4. Repeat: Continue testing and refining until you achieve the desired accuracy and reliability.

Using Variables in Instructions

Remember you can use {{variable_name}} (from an Apply Variables block or previous Extract Data outputs) within your instructions to make them dynamic and reusable across different inputs.

  • Example for Extract Data: Extract the shipping cost for the product named {{product_name}}.
  • Example for Interact with Page: type {{city_name}} into the 'City' input field.

Conclusion

Writing effective instructions for AI is a skill that blends clarity, precision, and an understanding of how the AI “thinks.” By following these principles and embracing an iterative approach, you can significantly enhance the power and accuracy of your Jsonify automations.