Skip to main content
infer(input, prompt, output_schema) runs over a column and returns one AI envelope per row. The envelope’s output field has the SQL type you request. These examples use the demo data and the customer-conversation dataset.

Find product failures without a keyword list

Ask whether a review describes a product breaking. A token budget filters the reviews before the Boolean model runs:
This can match different descriptions of failure rather than requiring the exact word “broken.” The AI response is a prediction; inspect content alongside it.

Find explanations in a financial report

Ask for business causes rather than matching a financial keyword. Keep the page content and full AI envelope so you can inspect the evidence and model diagnostics:
The recorded run returned pages 4, 5, and 6. Page 4 connects reduced travel to lower international roaming revenue and theater closures to lower content revenue. Page 5 distinguishes segment-level causes, including foreign exchange effects in Latin America. Page 6 describes the shift away from linear video and legacy services. Inspect the supporting text: the Boolean AI response remains a prediction.

Extract financial figures as typed columns

Page 3 of AT&T’s 2020 management discussion contains the consolidated revenue table:
The recorded AI response identifies AT&T Inc. and 171760 million US dollars. The unit is explicit in both the prompt and field name; a typed integer is still a model prediction, not a verified financial calculation.

Analyze a customer conversation

The source contains synthetic conversations; it is separate from the general demo bucket and carries CC BY-NC 4.0.
Each output contains a resolution, sentiment, summary, and list of action items. The two source columns are convo_id and convo_transcript; the classifications are computed by the query.

Classify into fixed labels

Use ENUM when each review gets exactly one label from a fixed set. The model can only return a listed label, and confidence scores the label it chose:
The second review praises the humor but complains that the episodes are too short. The model labels it negative with a lower score, which makes it a good row to send for review.

Tag with multiple labels

Use ARRAY<VARCHAR> when a review can have several labels. Each tag gets its own confidence score, in the same order as the tags:
The model chooses the tags. To limit tags to a fixed set of labels, use ARRAY<ENUM(...)>.

Read visible product attributes

A product photo becomes an input to the same typed interface:
The drinking-cup directory bounds this example to one product category. LIMIT 3 bounds the returned examples without requiring an analysis of all 10,000 product images.

Keep the envelope when inspecting errors

Project the full call before selecting its fields:
Failed or null inputs retain their rows. Check error when output is null. error can also explain why confidence couldn’t be computed for a valid output. For the text Boolean classifier, a null output can also mean that the model selected unknown; this does not itself indicate an inference error. Its confidence is the probability of the selected label, and probabilities contains the probabilities for true, false, and unknown. See Boolean classification. Token counts and timings are null when the model doesn’t report them. A confidence score isn’t a guarantee of correctness.

How Chowder chooses a model

Chowder selects a task-specific model from the input and the output type you request. Text input with BOOL output uses Bitsy, a specialized Boolean classifier. Other text outputs and image inputs use a vision-capable generative model. See Models for the current defaults. The first model-backed query may download and load managed artifacts. See Caching for result reuse, cache validity, and cache controls.

Run the same analysis on managed compute

Use the Cloud quickstart to configure CHOWDER_REMOTE=1 and call chowder.sql() directly, or opt in with Engine(remote=True). Start with bounded inputs, then inspect usage before increasing the workload.