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

ingest

Last update:
May 18, 2026
Synchronously processes all documents from the configured source, splits them into chunks, generates embeddings, and stores them in the vector store. Must be called before ask() or chat().

Syntax

ragService.ingest()

Parameters

This method takes no parameters.

Returns

Returns a Struct with the following keys:
Key
Description
totalDocuments
Total number of source documents loaded.
totalSegments
Total number of text segments created after splitting.
successfulSegments
Number of segments successfully embedded and stored.
failedSegments
Number of segments that failed during embedding or storage.
durationMs
Total ingestion time in milliseconds.
status
String status of the ingestion operation (e.g., "completed").

Example

result = ragBot.ingest();
writeOutput("Ingested: #result.successfulSegments# / #result.totalSegments# segments");

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