Skip to main content
This cookbook demonstrates how to use Model Inference to convert natural language schedule descriptions into valid CRON expressions. This is useful for materialized view refresh scheduling, report generation, and any feature where users need to specify schedules without knowing CRON syntax.

What this recipe accomplishes

  • Accept natural language schedule descriptions
  • Convert them to valid CRON expressions
  • Provide human-readable confirmation of the schedule
  • Handle ambiguous inputs with clarification

Prerequisites

  • SDK installed and configured (see Authentication)
  • A data plane ID where inference will run

Complete example

How it works

  1. Natural language input: User provides a schedule description in plain English
  2. Context building: The prompt includes the current date and examples of CRON patterns
  3. Inference: Model Inference converts the description to a structured response
  4. Validation: The CRON expression is validated for correct format
  5. Confirmation: Human-readable description and next run times provide verification

Common schedule patterns

Handling ambiguity

The model includes confidence scores and warnings for ambiguous inputs:

Running Inference

Inference fundamentals

Structured Output

Define response schemas

Materialized Views

Schedule view refreshes

Creating Views

Create and manage views