This mission advances your skills by teaching you how to orchestrate complex workflows that combine SQL database operations with AI capabilities. You'll learn to build intelligent, multi-step processes that seamlessly integrate data retrieval, transformation, and AI-powered decision making.
Learn how to design and implement sophisticated AI workflows that coordinate multiple database queries, embedding operations, and language model calls to solve complex business problems requiring multiple steps and decision points.
- Build Multi-Step Workflows: Create orchestrated processes that chain together SQL queries, vector searches, and AI model calls
- Implement Conditional Logic: Use AI responses to determine next steps in your workflow
- Handle Data Transformations: Process and prepare data between workflow stages
- Mission 1 completed (embeddings and vector search with
AI_GENERATE_EMBEDDINGS()and External ModelMyEmbeddingModel) - Mission 2 completed (RAG implementation with stored procedures
get_embeddingandget_similar_items) - Embedding model access (Azure OpenAI
text-embedding-3-small) - Chat model access (Azure OpenAI
gpt-5-mini)
Choose your preferred language and open the corresponding notebook:
Open the Python notebook (missions/mission3/py/mission3.ipynb) and follow the step-by-step instructions to:
- Set up your environment and install dependencies
- Connect to your SQL database using
mssql-python - Build an AI agent using LangChain that orchestrates SQL queries
- Use the
get_similar_itemsstored procedure for vector search - Run the agent with sample queries
Requirements: See requirements.txt in the py folder.
Key Components:
AzureAIChatCompletionsModelfor chat completions (gpt-5-mini)- Custom
find_productstool that calls the stored procedure
Open the .NET notebook (missions/mission3/dotnet/mission3.ipynb) and follow the step-by-step instructions to:
- Set up your environment and install NuGet packages
- Connect to your SQL database using
Microsoft.Data.SqlClient - Build an AI agent using Semantic Kernel that orchestrates SQL queries
- Register a
find_productsfunction as a kernel plugin - Run the agent with sample queries
Key Components:
- Semantic Kernel with Azure OpenAI Chat Completion (
gpt-5-mini) ChatCompletionAgentfor agent orchestrationKernelFunctionFactoryfor registering SQL query functions
Before running either notebook, copy .env.sample to .env and fill in your credentials:
# Database connection
SERVER_CONNECTION_STRING=Server=YOUR_SERVER;Database=YOUR_DATABASE;Trusted_Connection=yes;TrustServerCertificate=yes;
# Azure OpenAI
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
MODEL_ENDPOINT_URL=https://your-resource.cognitiveservices.azure.com/
MODEL_API_KEY=your-api-key-hereAfter completing this mission, you will have built a robust AI orchestration layer that can handle complex scenarios by integrating SQL data operations with AI capabilities.
Proceed to Mission 4: Building a Full-Stack AI Application to learn how to create a complete application that leverages the workflows you've built in this mission.