Skip to main content

[LLM] Ask

Last updated: August 2026
Prerequisites

This keyword is available from Katalon Studio version 11.5.0+.

Enable an AI service for your account and select a provider in Katalon AI Assistant Preferences.

Description​

Send a nonblank text prompt and optional file attachments to the AI service configured for the execution. The keyword returns the AI response text.

Keyword name: ask

Attachment paths can be absolute or relative to the project folder. Supported image types are png, jpg, jpeg, webp, gif, heic, and heif. Supported file types are txt, csv, json, log, and pdf. Extension matching is case-insensitive. Each attachment must not exceed 10 MB.

The keyword applies the configured failure handling when the AI service is unavailable, a prompt is blank, an attachment is invalid, or the service returns an empty response. If execution continues after an error, the return value is null.

Parameters​

ParameterParameter TypeRequiredDescription
flowControlFailureHandlingNoSpecifies the failure handling behavior for execution errors. In the explicit failure-handling overload, this parameter comes before prompt. When omitted, the keyword uses the configured default failure handling.
promptStringYesSpecifies the nonblank question or instruction to send.
attachmentPathsString...NoSpecifies the absolute paths or paths relative to the project folder of files to attach.

Returns​

TypeDescription
StringThe AI response text, or null if failure handling allows execution to continue after an error.

Examples​

String response = LLM.ask('Summarize the purpose of a smoke test suite.')

String attachedResponse = LLM.ask('Summarize these test results.', 'Data Files/results.json')

String continuedResponse = LLM.ask(FailureHandling.CONTINUE_ON_FAILURE,
'Summarize these test results.', 'Data Files/results.json')
Was this page helpful?