top of page

AI Functions: Streamlining the Integration of Large Language Models with Databricks SQL

Image credit: databricks


AI Functions, a new built-in DB SQL function, allows users to access and experiment with Large Language Models (LLMs) directly within SQL, simplifying the development and productionization workflow for LLMs. This integration enables analysts and data scientists to leverage LLMs without worrying about underlying infrastructure complexities.

As the development of Large Language Models (LLMs) continues to advance, customers are seeking ways to incorporate these models into their SQL workflows. To address this demand, AI Functions has been introduced as a built-in DB SQL function, which allows users to access and experiment with LLMs, such as OpenAI's ChatGPT, directly within SQL. By abstracting away the technical complexities, AI Functions enables analysts and data scientists to focus on utilizing the models without the need for extensive knowledge of the underlying infrastructure.

For example, an analyst tasked with classifying call transcripts into four categories can now use AI Functions to prompt an LLM directly from SQL, rather than requesting the data science team to create a classification model. This approach streamlines the process, removing the need for complicated multi-step pipelines or involving multiple teams.

To use AI Functions, the AI_GENERATE_TEXT function can be configured with the desired LLM, such as Azure OpenAI service, with the appropriate API key and other parameters. It is recommended to wrap the AI_GENERATE_TEXT function with another function, making it easier to pass input data and providing a more descriptive name for the intended goal. This simplifies the query, allowing users to focus on the prompt and harness the power of LLMs with minimal effort.

AI Functions opens up various possibilities, including translating languages, summarizing text, suggesting support team actions, or even using multiple function calls for multi-shot prompts. This is just the beginning of a journey to empower users to easily customize LLMs and integrate them with their data. Interested users can sign up for the Public Preview of AI Functions and attend a webinar on building LLMs like Dolly. Source

bottom of page