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

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 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

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

      July 22, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 22, 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

    GPT-5 is Coming: Revolutionizing Software Testing

    July 22, 2025
    Development

    Win the Accessibility Game: Combining AI with Human Judgment

    July 22, 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

    CVE-2025-6557 – Google Chrome DevTools Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-53327 – Aioseo Multibyte Descriptions CSRF

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-2872 – Apache HTTP Server Remote Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Leonardo AI

    Web Development

    Highlights

    News & Updates

    Xbox and Bethesda are supposedly going to “shadow drop” the Elder Scrolls IV: Oblivion remake — really? (UPDATE)

    April 15, 2025

    There’s so much smoke at this point that there has to be a fire somewhere,…

    CVE-2025-42999 – SAP NetWeaver Remote Code Execution

    May 13, 2025

    vitorccs/laravel-csv

    June 21, 2025

    Assigning and completing issues with coding agent in GitHub Copilot

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

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