Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 06:47 AM
Hi @neha89 -
You can use below approach:
Databricks provides AI Functions that allow invoking large language models directly within SQL queries. Here’s how this approach works:
- Define a Custom AI Function: You can define a SQL function using ai_query or similar built-in AI capabilities, which directly interact with a generative AI model (e.g., Databricks Foundation Models or OpenAI models).
- Prompt Engineering: Build your classification prompt that receives Delta Table columns as input and generates the required classification (False Positive/True Positive).
- Integrating with Delta Table: Use this SQL function to compute the classification and update the Delta Table
- Create an AI Function using ai_query.
- Apply the function in an UPDATE or SELECT statement for your Delta Table.
- Execute through standard SQL pipelines.