AI Validate

The Artificial Intelligence Validate block is designed to compare AI-generated responses against expected outcomes. This is essential in testing environments where accuracy and consistency are paramount.

It can be applied to multiple testing scenarios, enabling mass validation and automation of tests across applications and platforms.

Fully expanded, the AI Validate block shows the following properties: 

image-20260207-124725.png

Notes:

  • The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

  • To use this block, cloud blocks must be activated for your tenant in the add-ons section of Customer Portal. Make sure this is enabled before adding the block to your flows.

  • AI accuracy is not guaranteed, as it relies on probabilities and the daily performance of OpenAI’s technology. Occasional inaccuracies may occur due to inherent limitations of the technology. For more details, please refer to OpenAI’s documentation.

Quick-start

  1. Drag AI Validate onto the canvas.

  2. Enter the generated data or response to be checked in Input.

  3. Specify the anticipated result in Expected.

  4. Connect the green input and output connectors (and optionally Not Valid for branching).

  5. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector triggers the block to start executing. The green output connector triggers when the block execution is complete. The block title (“AI Validate”) can be renamed by double-clicking it and typing in a new title.

  • Prompt: The input text to validate (typically the information supplied by your GenAI).

  • Expected: The expected or anticipated result that Prompt should match.

  • Not Valid: Triggers if Prompt does not match Expected, so you can branch the flow when validation fails.

  • Default timeout: Controls whether the block uses the flow’s default timeout or a fixed timeout. If the checkbox is selected, the timeout is 30 seconds. If the checkbox is not selected, the timeout follows the Default timeout value set in the flow settings.

  • Timeout (sec): The timeout value shown for the block (for example 30). Use this as the maximum time spent performing the validation when the block is not using the flow’s default timeout.

  • Failed: Triggers if the validation does not complete successfully within the configured timeout, so you can branch your flow (for example, log the issue, retry, or fail the case).

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.

Customer Portal Add-ons

Customer portal section to activate your cloud blocks.

Guidelines for using AI blocks

Common guidelines for prompting, generating, validating, extracting, and transforming AI-driven test data in Leapwork’s AI Blocks.