Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      This week in AI dev tools: Gemini 2.5 Pro and Flash GA, GitHub Copilot Spaces, and more (June 20, 2025)

      June 20, 2025

      Gemini 2.5 Pro and Flash are generally available and Gemini 2.5 Flash-Lite preview is announced

      June 19, 2025

      CSS Cascade Layers Vs. BEM Vs. Utility Classes: Specificity Control

      June 19, 2025

      IBM launches new integration to help unify AI security and governance

      June 18, 2025

      The best Best Buy Black Friday in July 2025 deals so far

      June 20, 2025

      I found the easiest way to delete myself from the internet (and you shouldn’t wait to use it, too)

      June 20, 2025

      Wyze wants to keep prying eyes away from your cameras with this new feature

      June 20, 2025

      Heard about the 16 billion passwords leak? Here are the facts and how to protect yourself

      June 20, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Dr. Axel’s JavaScript flashcards

      June 20, 2025
      Recent

      Dr. Axel’s JavaScript flashcards

      June 20, 2025

      Syntax-Highlight – Custom Element For Syntax Highlighting Content

      June 20, 2025

      WelsonJS – Build a Windows app on the Windows built-in JavaScript engine

      June 20, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      NVIDIA GeForce NOW adds 13 more games, including Borderlands series & new co-op shooter

      June 20, 2025
      Recent

      NVIDIA GeForce NOW adds 13 more games, including Borderlands series & new co-op shooter

      June 20, 2025

      DuckDuckGo browser expands Scam Blocker to catch more fake sites and scareware

      June 20, 2025

      Microsoft PowerToys ‘Peek’ tool makes file previews instant on Windows

      June 20, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Unleashing the Power of AI Functions in Databricks SQL

    Unleashing the Power of AI Functions in Databricks SQL

    June 20, 2025

    By providing AI functions for SQL analysts, Databricks continues to integrate data, ML, and AI across its platform. AI Functions in Databricks SQL are pre-built, easy-to-use functions that incorporate machine learning models into SQL queries. These functions enable data analysts and engineers to leverage AI capabilities without the need for extensive machine learning expertise. By simply calling these functions within standard SQL statements, users can perform complex AI tasks such as natural language processing, image recognition, and predictive analytics. AI Functions provide general-purpose and task-specific functions.

    Task-Specific AI Functions

    The fastest and easiest approach to get started with AI Functions is to begin with a task-specific function, since you will be calling a GenAI model managed and maintained by Databricks. I consider the following functions to be the simplest entry point because they’re similar to work you’ve probably done with a chat model.

    • ai_translate
    • ai_fix_grammar
    • ai_summarize
    • ai_mask

    Once you have experimented with these basic commands, you can move on to including core ML concepts directly into SQL using AI. Try to use these commands within the context of a simple, but actual, ML task to get an idea of how much power can be leveraged with these pre-built tasks.

    • ai_analyze_sentiment
    • ai_classify
    • ai_extract
    • ai_similarity
    • ai_forecast

    I strongly encourage you to try these commands in your environment. First of all, they are in Public Preview at this time, so even executing one command will validate whether or not you have this functionality enabled. Also, by the time you have moved from ai_translate to ai_forecast, you will have seen the potential. Fixing grammar may not have been impressive on its own, but the classification and extraction functions really begin to show how AI can practically bridge the gaps that exist in any large enterprise Databricks installation. There are gaps in knowledge and experience between and even within teams around data science and data engineering at AI can help bridge.

    Task-Specific Examples

    Assume you have a corpus of customer reviews and you want to perform standard sentiment analysis. This is considered a very foundational ML problem, but AI on SQL makes this capability accessible to any user.

    SELECT review_text, 
    ai_sentiment_analysis(review_text) AS sentiment
    FROM customer_reviews;

    Clustering and classification algorithms are also made very intuitive.

    SELECT product_id, image_url, ai_image_classification(image_url) AS product_category FROM product_catalog;

    You can perform custom data extraction that would be extremely brittle and complex otherwise.

    SELECT 
    review_id,
    review_text,
    ai_extract(
    review_text,
    'Extract the following information from the review:
    - Product name
    - Rating (1-5)
    - Key feature mentioned
    - Any reported issues
    Format the output as JSON.'
    ) AS extracted_info
    FROM 
    customer_reviews
    
    

    General AI Functions

    Databricks only considers ai_query to be a general function, but I also include ai_gen and vector_search. The vector_search function lets you query a Mosaic AI Vector Search index using SQL. I found this one interesting as it seems more like a MosaicAI extension rather than an AI function since it is very product-specific and I can’t help but notice it bucks the naming convention. the ai_query and ai_gen functions are similar, but they have critical differences.

    ai_gen is not considered by Databricks to be a General AI function because its specifically designed for, and constrained by, the SQL domain. Its intended to enable data exploration and query assistance by taking natural language questions about data in the form of a prompt. Also, its limited to Databricks-hosted foundation models optimized for AI Functions. ai_query is not limited in its model selection. You can use the same Databricks-maintained models or invoke fine-tuned foundation models deployed on Mosaic AI, foundation models hosted outside of Databricks or even traditional ML or DL model, such as scikit-learn, xgboost, or PyTorch. At its most basic, you provide a prompt and optionally any additional configuration parameters.

    Conclusion

    AI Functions in Databricks SQL represent a significant leap forward in democratizing AI capabilities within the #DataLakehouse environment. By making complex ML tasks accessible through familiar SQL syntax, Databricks empowers data professionals to enhance their analytics workflows with cutting-edge AI technology. These functions promise to become indispensable tools in the modern data analyst’s toolkit.

    Contact us to learn more about how to empower your teams with the right tools, processes, and training to unlock Databricks’ full potential across your enterprise.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleDTO: Value Objects and Data (Transfer) Objects in Laravel
    Next Article María Cortázar Ortigoza Fosters Collaboration and Connection Across Perficient

    Related Posts

    Development

    How to Assign Dataverse Security Roles at Scale

    June 20, 2025
    Development

    How to Build Secure SSR Authentication with Supabase, Astro, and Cloudflare Turnstile

    June 20, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CodeSOD: The Big Pictures

    News & Updates

    5 habit trackers on Android that can reveal your patterns – and motivate you to change

    News & Updates

    Datasette is a tool for exploring and publishing data

    Linux

    CVE-2025-24977 – OpenCTI Container Escalation Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Distribution Release: Wifislax 4.0

    April 4, 2025

    The DistroWatch news feed is brought to you by TUXEDO COMPUTERS. Wifislax is a Slackware-based live disc containing a variety of security and forensics tools. The project’s latest release is Wifislax 4.0 which provides updated drivers, the latest Xfce desktop, and OpenSSL 3. “Wifislax64 version using slackware64-current base, is the development branch, so that’s where we are going to….

    Malicious PyPI, npm, and Ruby Packages Exposed in Ongoing Open-Source Supply Chain Attacks

    June 4, 2025

    CVE-2025-47814 – GNU PSPP Zip-Reader Heap-Based Buffer Overflow

    May 10, 2025

    projektgopher/whisky

    June 4, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.