ai_classify v2 + ai_extract v2.1 + sentiment via ai_classify (AI Functions demo notebooks)#89
Open
srikantdas11 wants to merge 1 commit into
Open
Conversation
srikantdas11
commented
May 15, 2026
Contributor
Author
srikantdas11
left a comment
There was a problem hiding this comment.
Made changes to the code to use the Version 2 syntax
- ai_classify (v1 ARRAY -> v2 JSON STRING) + ":response[0]::STRING" cast (Notebooks 02, 05) - ai_extract (v1 ARRAY -> v2.1 JSON STRING / typed schema) + VARIANT path access via ":response:field:value::TYPE" (Notebooks 01, 03, 04) - ai_query calls that duplicated task-specific functionality replaced with ai_extract; the remaining ai_query (Notebook 03, generative "next_step") uses databricks-gpt-oss-120b - ai_analyze_sentiment (Preview) replaced with ai_classify over the four standard sentiment labels so the example is GA-runnable (Notebook 05) - README "Functions Used" column refreshed - DBC archive regenerated from tested workspace state to match Co-authored-by: Isaac
faf9f44 to
b01e2fb
Compare
srikantdas11
commented
May 15, 2026
Contributor
Author
srikantdas11
left a comment
There was a problem hiding this comment.
Code tested and Updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
2026-05-ai-functions-data-warehouse-use-cases/to the latest AI Functions syntax and the GA-only pre-publish gate.ai_classifycalls use v2 JSON STRING label syntax +:response[0]::STRINGcast.ai_extractcalls use v2.1 JSON STRING schema (typed schema in Notebook 04) +:response:field:value::TYPEpath access.ai_querycalls that duplicated task-specific functionality are nowai_extract. The one remainingai_query(generative "next_step" in Notebook 03) usesdatabricks-gpt-oss-120b.ai_analyze_sentiment(Preview) replaced withai_classifyover four sentiment labels (positive,negative,neutral,mixed) so the example is GA-runnable.README.md"Functions Used" column refreshed to match.01_document_intelligence.pyai_query→ai_extract; VARIANT path access replacesfrom_jsonSTRUCT02_communication_triage.pyai_classifyv1 → v2 + cast03_summarization.pyai_extract(facts) +ai_queryfornext_stepondatabricks-gpt-oss-120b04_translation_normalization.pyai_extractv1 → v2.1 (array form in Step 2, typed schema in Step 3)05_sentiment_analysis.pyai_classify; allai_classifyv1 → v2README.mdTest plan
databricks-gpt-oss-120bendpoint is available in the test workspaceclaude-sonnet-4,meta-llama-3-3-70b-instruct,ai_analyze_sentiment, or v1ARRAY(...)label form