Agentic RAG and chat completion in the Microsoft SQL engine | Data Exposed

Bob Ward explains how Microsoft SQL (SQL Server, Azure SQL, and SQL DB in Fabric) can be used for chat completion and agentic RAG scenarios, including making REST calls to models, building prompts in SQL, and adding security controls like immutable logging, content moderation, and prompt-injection protection.

Overview

The episode shows how to use capabilities in Microsoft SQL to:

Topics covered (from the video chapters)

SQL has vectors (and more)

Making REST calls from Microsoft SQL

Calling models and processing results with SQL

Demo: building the prompt

Immutable logging with SQL Ledger

Tips and tricks

Content safety and moderation with the gateway

Using Foundry SDK with SQL

Preventing prompt injection with the gateway

Exposing a Foundry application from Microsoft Teams

More secure, less data movement