BRK373 · Breakout
Build AI-ready apps on Azure SQL with GitHub Copilot in VS Code
Speakers: Yo-Lei Chen
Microsoft’s player cannot open a video at a given time: once it plays, skip to the time shown.
What the session covers
Yo-Lei Chen (Microsoft SQL team) builds the CaseDesk support app from a React front end with no database to a RAG-enabled app on Azure SQL Database, entirely in VS Code with the MSSQL extension and GitHub Copilot. The workflow covers the new Azure SQL Database local container (public preview), schema design from a PRD using Microsoft SQL agent skills, Data API builder for a read-only REST API, and vector search with VECTOR(768), AI_GENERATE_EMBEDDINGS and VECTOR_DISTANCE. RAG is implemented end to end in T-SQL, including a chat completions call to an Azure OpenAI model in Microsoft Foundry and a guard against irrelevant answers. The session ends with a new Deploy to Azure wizard that moves the local database to a free-tier Azure SQL Database, and a plugin that packages SSMS GitHub Copilot skills and its MCP server for other agents.
Best for: Developers and data engineers who want to build RAG directly on Azure SQL with GitHub Copilot in VS Code; of limited relevance to Microsoft 365 Copilot specialists.
New material starts at 03:26. After the welcome and preview of the finished app, the speaker introduces the end-to-end workflow and the Azure SQL Database local container released in public preview.
Where to skip: Skip to 05:46 for Copilot's schema awareness, permissions and enterprise policies; 08:10–11:35 explains agent context (PRD, instructions, SQL skills). The technical core is 28:22–37:17 (external models, in-database vector search, RAG in T-SQL), plus the deployment wizard at 39:12 and the skills/MCP plugin at 41:00. The local container setup (14:08) and the schema designer and Data API builder demos (17:55–23:38) can be skimmed; 37:17–39:12 and the closing add little.
Chapters (16)
- 00:02 Recap Depth 100 · Novelty 0/3
Welcome, speaker intro and preview of the finished CaseDesk RAG app
Yo-Lei Chen, a PM on the Microsoft SQL team who works on VS Code tooling, the MSSQL extension and GitHub Copilot integrations, outlines the plan: take a React app with no database and build it out on Azure SQL Database entirely in VS Code with GitHub Copilot. She shows the finished CaseDesk app, where support engineers work through a queue of customer cases and click 'Suggested reply' to get a draft. The draft cites knowledge-base articles (e.g. KB3) so engineers can verify it, which she introduces as retrieval augmented generation (RAG). The demo is based on a public repo that she shares later.
- 03:26 New Depth 100 · Novelty 2/3
One VS Code workflow: MSSQL extension, Copilot and the new Azure SQL local container
The speaker frames the developer problem: a local database, schema derived from the app spec, an API and RAG without switching between many tools. The stack is VS Code, the MSSQL extension, GitHub Copilot and the Azure SQL Database local container released this week in public preview, which runs the same engine as Azure SQL Database in the cloud. The planned flow: Copilot maps front-end models and spec to the schema, Data API builder generates REST endpoints, native vector types handle search without a separate search service, the database calls an embedding model itself, and everything is deployed to Azure.
- 05:46 Deep dive Depth 200 · Novelty 1/3
GitHub Copilot with databases: schema awareness, permissions, policies, training opt-out
GitHub Copilot on its own does not know the database schema; the MSSQL extension adds agent tools that connect, execute queries and list tables, making it schema-aware. Copilot sees schema (tables, columns, foreign keys) but not customer data unless a query it runs returns data, and it has exactly the same database permissions as the user. Admins can centrally control agent tools, auto-approval and agent mode through VS Code enterprise policies. Regarding the training policy announced in April, business and enterprise licences need no action, while Free, Pro and Pro+ users must opt out in privacy settings.
- 08:10 Deep dive Depth 200 · Novelty 1/3
Context for the agent: PRD, Copilot instructions and Microsoft SQL agent skills
Knowing which tables exist does not tell Copilot what is being built or how the team works, so the repo provides three kinds of context. A PRD (spec-driven development) describes the data model and technical requirements; Copilot instructions encode team rules such as snake_case naming and preferred data types; skills are markdown playbooks the agent loads on demand. The Microsoft SQL agent skills, released in September, cover schema design, vectors, cloud deployment, performance tuning and query analysis, are curated by the product team and grow monthly; following them can cut tool calls, e.g. from 20 to 10.
- 11:35 Demo Depth 200 · Novelty 2/3
MSSQL extension tour: getting started page, 44-skill plugin, PRD and instructions
After a quick audience poll on SSMS and the MSSQL extension, the speaker shows the extension in the VS Code marketplace, currently at version 1.48 with monthly releases, and recommends auto-update. The new getting started page links learning resources and the agent skills, packaged as a plugin for GitHub Copilot with 44 skills. She then shows the CaseDesk PRD.md and copilot-instructions.md, and notes that the SSMS constitution.md file does not carry over to VS Code, which has its own hierarchy of instruction files.
- 14:08 Demo Depth 200 · Novelty 2/3
Spinning up the Azure SQL Database local container and connecting Copilot agent mode
Unlike SQL Server containers, the new Azure SQL Database local container runs the same engine as the cloud service and is free for local development, so cloud rules and AI features such as the vector type, vector distance and external models work locally. In the getting started page a wizard detects the container runtime, lets the user choose SQL login or Microsoft Entra authentication, profile name and port, pulls the image and auto-connects. A CaseDesk database is created via the Create Database dialog, opened in GitHub Copilot agent mode, and a query confirms engine edition 5, the same value as Azure SQL Database.
- 17:55 Demo Depth 200 · Novelty 1/3
Schema designer with Copilot: tables from the PRD, apply changes, seed and edit data
The empty database is opened in the visual schema designer, and its GitHub Copilot button calls the schema design tool with a prompt to build tables from the PRD and sample data. Copilot reads the PRD and loads the design-azure-sql-schema skill, then creates tables, columns and foreign keys in the diagram, which can be auto-arranged. Changes are reviewed and accepted but only published after clicking Apply Changes. Sample data is seeded via a script and the Edit Data grid allows direct value edits while showing the generated UPDATE statements.
- 20:46 Demo Depth 200 · Novelty 1/3
Data API builder from the schema: Copilot-configured read-only REST API and Swagger test
Instead of writing back-end code, Data API builder built into the extension generates REST, GraphQL or MCP endpoints from the database schema. Copilot configures it via natural language: only accounts and support_cases, REST only, anonymous read-only. The endpoint is deployed with the DAB CLI (a local Docker container is the alternative) and tested in Swagger. After swapping environment variables, the app moves from hard-coded data (2 open cases) to the database (17 open cases).
- 23:38 Deep dive Depth 200 · Novelty 1/3
Semantic vs keyword search, embeddings and cosine distance in Azure SQL
For the suggested reply feature, the speaker contrasts LIKE and full-text search, which match words, with semantic search, which ranks by meaning using VECTOR_DISTANCE over embeddings. An embedding is an array of numbers representing text meaning, produced by an embedding model and stored as a vector in Azure SQL; cosine distance measures closeness (dog vs. puppy vs. 'exhibition hall water leak'). The demo uses 768 dimensions; higher dimensions are more expensive but likely more accurate. The user question is embedded the same way as the knowledge articles to compare them.
- 28:22 Deep dive Depth 300 · Novelty 1/3
Calling models from T-SQL: CREATE EXTERNAL MODEL, AI_GENERATE_EMBEDDINGS vs Azure AI Search
Azure SQL can generate embeddings entirely from T-SQL: CREATE EXTERNAL MODEL registers the model endpoint and credential once, with the key stored in an encrypted database credential, and AI_GENERATE_EMBEDDINGS returns a vector usable in any query, stored procedure, Data API builder or agent. The demo targets Azure OpenAI, while the repo also offers a free offline Ollama path. Compared with Azure AI Search, which excels with many document types, extraction, chunking, hybrid search and semantic ranking, Azure SQL fits relational data: vector search combined with column filters, existing row-level security and immediate OLTP consistency.
- 31:25 Demo Depth 300 · Novelty 1/3
Demo: VECTOR(768) table via Copilot, Foundry models and in-database vector search
Copilot Chat, loading the vector search skill, creates a kb_article_embeddings table with a VECTOR(768) column based on the PRD. In Microsoft Foundry two Azure OpenAI deployments are shown: GPT 5.4 (gpt-5.4-mini on screen) and an embedding model (text-embedding-3-small). A SQL notebook using the MSSQL kernel registers the external model, embeds the knowledge articles with AI_GENERATE_EMBEDDINGS, then embeds a user question and ranks articles by cosine distance with VECTOR_DISTANCE.
- 34:28 Deep dive Depth 300 · Novelty 1/3
RAG end to end in T-SQL: retrieval, prompt augmentation and grounded generation
Retrieval uses the external model, AI_GENERATE_EMBEDDINGS and vector distance; augmentation passes the closest articles plus the original case to the GPT 5.4 chat model; generation applies a system prompt defining the assistant role and reply format. In the rag-in-sql notebook the case is embedded, the top three articles are ranked, a system and user prompt are built, and a JSON payload is sent to a chat completions endpoint. A guard instructs the model not to hallucinate and to tell the engineer when no article is relevant.
- 37:17 Demo Depth 200 · Novelty 0/3
RAG lab pointer and the finished app: cited replies and 'no relevant article' handling
The speaker promotes a hands-on lab at 10:45 covering full-text search, hybrid search, chunking and DiskANN indexing, with a QR code to the repo for those who cannot attend. Back in CaseDesk, Suggested reply for the pending-sync case cites KB3 as the most relevant article. For another case nothing is suggested because the distance threshold set in the generation phase was not met, so the engineer is told there is no relevant article.
- 39:12 New Depth 200 · Novelty 2/3
New Deploy to Azure wizard: local container to free-tier Azure SQL Database
The Ignite release of the MSSQL extension adds a Deploy to Azure option in Object Explorer for the local database, with schema-and-data or schema-only choices; under the hood it uses bacpac and a SQL project compatibility check against Azure SQL Database. In this preview release the target is limited to a free-tier Azure SQL Database, using the monthly free allowance of an Azure account; existing servers and options such as Hyperscale are on the roadmap. Because the engine edition is identical, the app switches by swapping the connection string, with Microsoft Entra authentication in the cloud.
- 41:00 New Depth 100 · Novelty 2/3
Takeaways: agent context, ~100 SQL skills, SSMS skills and MCP server as a plugin
The key takeaway is to give the agent as much context as possible: repo, code base, PRD, custom instructions and the SQL agent skills, which number about 100 in total including migration skills. The built-in skills and MCP server of SSMS GitHub Copilot have been moved into a new plugin. This lets users of other agents such as Claude or Cursor perform similar data tasks as in SSMS GitHub Copilot.
- 42:00 Closing Depth 100 · Novelty 0/3
Closing: GitHub repo, monthly extension updates, contact and feedback
The speaker shares the GitHub repo for building CaseDesk step by step with either Azure OpenAI or the free offline Ollama approach, plus MSSQL extension resources. She reminds attendees that the extension ships monthly and a monthly blog post covers updates. She offers to answer questions in the hallway, points to the 10:45 lab and asks for session feedback.
Announcements (5)
-
Azure SQL Database local container
A local container for development and testing that runs the same engine as Azure SQL Database in the cloud.
Speaker’s quote (at 04:22)
„plus the latest Azure SQL database local container, which just got released this week in public preview“
-
MSSQL extension getting started page
A new start page in the MSSQL extension that gathers learning resources and the installable agent skills plugin.
Speaker’s quote (at 12:30)
„once you have the MSSQL extension installed, let's try to take a look at the new getting started page“
-
Deploy to Azure wizard (MSSQL extension)
Deploys a local Azure SQL Database container's schema and data to a new free-tier Azure SQL Database after a compatibility check.
Azure SQL Database free tier monthly allowance
Speaker’s quote (at 39:12)
„like our Ignite release of the Ms. SQL extension to help you deploy that local Azure SQL database container to the cloud more easily“
-
Deploy to Azure: additional target databases
Planned support for deploying to existing Azure databases or other new targets such as Hyperscale.
Speaker’s quote (at 40:05)
„something new, maybe like a hyper scale. So these are all within the roadmap.“
-
SSMS GitHub Copilot skills and MCP server plugin
Moves the built-in skills and MCP server of GitHub Copilot in SSMS into a plugin installable in other agents.
Speaker’s quote (at 41:29)
„Recently also just take out all the built-in skills in the SSMS GitHub Copilot and also the built-in MCP server to a new admin plug-in“
Demos (7)
-
A developer installs the MSSQL extension and prepares the agent context (skills plugin, PRD, instructions) for GitHub Copilot.
Steps (6)
- Open the Extensions view or marketplace in VS Code and install the SQL Server (mssql) extension.
- Turn on auto-update to receive the monthly releases.
- Open the extension's getting started page.
- On the Agent skills tab, add the Microsoft SQL skills plugin to GitHub Copilot and review the list of skills.
- Open docs/PRD.md describing the CaseDesk app and data model.
- Open copilot-instructions.md with the team's Azure SQL and code conventions.
Prerequisites: VS Code with GitHub Copilot; the MSSQL extension (version 1.48 shown).
-
A developer creates a local Azure SQL Database container and an empty database, then connects GitHub Copilot agent mode to it.
Steps (7)
- On the MSSQL getting started page, start the (Preview) New Azure SQL Database - Container wizard.
- Let the wizard check Docker prerequisites and install anything missing.
- Choose the authentication type (SQL login or Microsoft Entra) and set profile name, container name and port.
- Let the wizard pull the image, create and set up the container and connect it to the extension.
- Use the Create Database dialog to create a database named CaseDesk.
- Right-click the database and select Open in GitHub Copilot agent mode.
- Ask Copilot which database engine it runs and approve the query execution.
Prerequisites: Docker/container runtime (checked by the wizard), MSSQL extension, GitHub Copilot.
-
A developer generates the CaseDesk relational schema from a PRD and front-end sample data, publishes it, and seeds and edits test data.
Steps (8)
- Open Visualize and Design Schema for the CaseDesk database.
- Click the GitHub Copilot button in the schema designer.
- Enter a prompt asking Copilot to read sampleData.ts and PRD.md and add the tables with the foreign key.
- Let Copilot read the files and load the design-azure-sql-schema skill; tables appear in the diagram.
- Auto-arrange the diagram, review the proposed changes and accept them.
- Click Apply Changes to publish the schema to the live database.
- Run a seed script to insert sample data.
- Open Edit Data on dbo.support_cases, change a value (priority to High), review the UPDATE statement and save.
Prerequisites: MSSQL extension with GitHub Copilot, Microsoft SQL skills plugin installed, PRD.md and sample data from the repo, a connected database.
-
A developer exposes selected tables as a read-only REST API and connects the React app to it.
Steps (6)
- Open the Data API builder configuration in the schema designer.
- Ask Copilot in natural language to keep only accounts and support_cases, anonymous read-only, REST only.
- Review the updated entity and permission settings.
- Deploy the endpoint, choosing DAB CLI (or a local Docker container).
- Open the Swagger link and execute the accounts API to verify responses.
- Edit .env.local to point the app to the new API and reload the app.
Prerequisites: MSSQL extension with GitHub Copilot, DAB CLI or Docker, the CaseDesk database with seeded data.
-
A developer stores knowledge-article embeddings in the database and finds the articles most relevant to a customer question using T-SQL only.
Steps (8)
- In Copilot Chat, ask Copilot to add the kb_article_embeddings table from the PRD data model.
- Review the generated script creating a VECTOR(768) column and run it.
- Verify the new table in Object Explorer.
- In Microsoft Foundry, deploy a chat model and an embedding model and note endpoints and keys.
- Open a SQL notebook with the MSSQL kernel connected to CaseDesk.
- Run CREATE EXTERNAL MODEL to register the embedding model.
- Run AI_GENERATE_EMBEDDINGS to embed the knowledge articles into the embeddings table.
- Embed a sample customer question with the same model and rank articles with VECTOR_DISTANCE (cosine).
Prerequisites: Azure OpenAI deployments in Microsoft Foundry (chat and embedding models) or the Ollama alternative; MSSQL extension with SQL notebooks; CaseDesk database.
-
A developer drafts a cited support reply entirely from T-SQL by combining vector retrieval with a chat model call.
Steps (6)
- Open the rag-in-sql notebook against CaseDesk.
- Embed the customer case and rank knowledge articles by vector distance.
- Select the top three articles as evidence.
- Build a system prompt (assistant role, reply format) and a user prompt containing the articles.
- Send the JSON payload to the chat completions endpoint.
- Apply the rule that if no article is relevant, the reply states so instead of hallucinating.
Prerequisites: Deployed chat and embedding models, registered external model, embedded knowledge articles.
-
A developer moves the local CaseDesk database to Azure SQL Database and repoints the app.
Steps (6)
- In Object Explorer, select the local CaseDesk database and choose Deploy to Azure.
- Choose Schema and data (or Schema only) and continue.
- Let the SQL project run a compatibility check against Azure SQL Database.
- Select Azure account, tenant, subscription, resource group and server for a free-tier database.
- Run the deployment and wait for completion.
- Copy the connection string and swap it into the app configuration.
Prerequisites: An Azure account with the free-tier Azure SQL Database monthly allowance; MSSQL extension Ignite release.