Whatever message this page gives is out now! Go check it out!

ask

Last update:
May 18, 2026
Poses a single stateless question to the RAG service. No conversation history is maintained between calls. Use chat() when conversational context is required.

Syntax

ragService.ask(message)

Parameters

Parameter
Type
Required
Description
message
String
Required
The question or prompt to send to the AI model.

Returns

Returns a Struct with the following keys:
Key
Description
answer
String. The AI-generated answer.
sources
Array of source metadata Structs. Each Struct includes fileName and score.
durationMs
Numeric. Query round-trip time in milliseconds.

Example

response = ragBot.ask("How do I configure SSL certificates?");
writeOutput(response.answer);

// Inspect source documents
for (src in response.sources) {
    writeOutput("Source: #src.fileName# (score: #src.score#)");
}

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page