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

getStatistics

Last update:
May 18, 2026
Returns runtime statistics about document ingestion and query activity for this SimpleRAGService instance.

Syntax

ragService.getStatistics()

Parameters

This method takes no parameters.

Returns

Returns a Struct with the following keys:
Key
Description
totalDocumentsIngested
Total documents ingested since service creation.
totalSegmentsIngested
Total text segments embedded and stored.
totalQueriesExecuted
Total ask() and chat() calls made.
averageQueryDurationMs
Mean query round-trip time in milliseconds.
lastIngestedAt
Timestamp of the most recent ingestion.
createdAt
Timestamp when this service instance was created.

Example

stats = ragBot.getStatistics();
writeOutput("Queries executed: #stats.totalQueriesExecuted#");

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