adm_ai_job_automations_api
This document contains the API documentation for the adm_ai_job_automations_api package.
Functions and Procedures
Section titled “Functions and Procedures”sync_all_rag_collections
Section titled “sync_all_rag_collections”Synchronizes RAG collection files for all active RAG collections. Iterates over each collection and calls adm_ai_rag_workflow_api.sync_rag_collection_files.
Signature:
procedure sync_all_rag_collections ( po_error_occurred out nocopy boolean);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
po_error_occurred | out | nocopy boolean | Output parameter indicating if an error occurred during synchronization |
process_rag_queues
Section titled “process_rag_queues”Drains the RAG pipeline: extracts text, chunks it, embeds the chunks, and removes the vectors of files that have left a collection.
This is the half of the pipeline nothing used to run on a schedule - hourly_job fills the queue, and until this existed only the Sync Collection button emptied it, so a document became searchable when an administrator pressed a button.
Paced by AI_JOB_BATCH_SIZE (the batch, and the commit unit) and AI_JOB_MAX_SECONDS (the whole run). Work it does not get to is still queued for the next run, so stopping on the budget is a normal outcome rather than a failure. Failures are logged and reported through po_error_occurred; they do not abandon the other stages.
Signature:
procedure process_rag_queues ( po_error_occurred out nocopy boolean);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
po_error_occurred | out | nocopy boolean | Output parameter indicating if a stage failed during the run |
hourly_job
Section titled “hourly_job”Main AI hourly job procedure that orchestrates all AI-related automated maintenance tasks. This procedure is typically scheduled to run once per hour.
Signature:
procedure hourly_job;queue_job
Section titled “queue_job”Entry point of ADM_AI_RAG_QUEUE_JOB, which runs every five minutes and drains the RAG pipeline through process_rag_queues.
Separate from hourly_job, and far more frequent, because the two halves cost very different things: discovery re-evaluates every document against every collection’s criteria, while draining the queue is bounded work on rows that are already there.
Signature:
procedure queue_job;