BigQuery now has AI functions you call from SQL — AI.GENERATE , AI.CLASSIFY , AI.IF , AI.SCORE , embeddings, forecasting — no Python, no pipeline, no exporting text to some other service. The demos usually show toy examples. The useful question is narrower: what do these do on the data analysts actually have, like the GA4 BigQuery export?
Two patterns cover most of the real work: classifying text into labels you define in plain language ( AI.CLASSIFY ), and filtering rows by meaning instead of keywords ( AI.IF ). Both examples below are from templates I run in production-shaped work; the two queries shown were live-verified on 2026-11-24 against a real project (asia-northeast1, gemini-3.5-flash endpoint).
Pattern 1: Classify GA4 on-site search terms by intent
Your site search terms are a goldmine nobody reads: thousands of strings showing what visitors wanted and couldn't find.…