Beginner1h2m

Building Your Own Database Agent

Instructor: Adrian Gonzalez Sanchez

Microsoft logo

Earn an accomplishment with PRO · Updated Oct 7, 2025

  • Beginner
  • 1h2m
  • 7 Video Lessons
  • 5 Code Examples
  • 1 Graded Assignment PRO
  • Earn an accomplishment with PRO
  • Updated Oct 7, 2025
  • Instructor: Adrian Gonzalez Sanchez
  • MicrosoftMicrosoft
  • Learn more aboutMembership PRO Plan

What you'll learn

  • Interact with tabular data and SQL databases using natural language, enabling more efficient and accessible data analysis.

  • Gain hands-on experience with the Azure OpenAI Service, implementing techniques like Retrieval Augmented Generation (RAG) and function calling.

  • Use Azure OpenAI Service’s Assistants API, and test it with function calling and code interpreter features.

Course recap

PRO

This course teaches multiple approaches to building AI agents that query databases using natural language. It progressively covers LangChain agents for CSV and SQL databases, Azure OpenAI's function calling feature for deterministic behavior, and the Assistants API with both function calling and code interpreter capabilities. The running example uses a COVID-19 dataset to demonstrate how to ask natural language questions and get accurate data-driven answers.

Concept map

Concepts in Building Your Own Database Agent and the courses that connect to themBuilding Your Own Database AgentBuilding Your Own Databas…AI AgentsFunction callingAssistants APICode interpreterText-to-SQLBuilding and Evaluating Data AgentsBuilding and Evaluating D…Building Systems with the ChatGPT APIBuilding Systems with the…AI Agents for Image and Video GenerationAI Agents for Image and V…Building AI Browser AgentsAgentic AIBuilding Toward Computer Use with AnthropicBuilding Toward Computer…Concepts in Building Your Own Database Agent and the courses that connect to themBuilding Your Own Database AgentBuilding Your O…AI AgentsFunction callingAssistants APICode interpreterText-to-SQL

Key concepts

  • AI AgentsDatabase agents that translate natural language to SQL queries and return human-readable results
  • Function callingAzure OpenAI feature that lets models select and call predefined functions with appropriate arguments based on user intent
  • Assistants APIStateful API that maintains conversation context across interactions, unlike stateless chat completions
  • Code interpreterSandbox environment within the Assistants API that can iteratively run and fix Python code
  • Text-to-SQLConverting natural language questions into SQL queries for database retrieval

About this course

In Building Your Own Database Agent you will develop an AI agent that interacts with databases using natural language, simplifying the process for querying and extracting insights. Created in partnership with Microsoft and taught by Adrian Gonzalez Sanchez, Data and AI Specialist at Microsoft, this course is designed for developers, data professionals, as well as business analysts and professionals who want more sophisticated interaction with their databases through natural language instead of advanced SQL queries.

What you’ll do in this course:

  • Learn about the levels of knowledge customization with Azure OpenAI Service, focusing on RAG to build your first AI agent, deploy your Azure OpenAI Service instance, test the API, and set up an orchestration engine like LangChain to enable these scenarios.
  • Load tabular data from a CSV file and perform natural language queries using the Azure OpenAI service to extract information quickly. Learn to reapply the agent to analyze your own CSV files.
  • Implement LangChain agents to connect to a provided SQL database, and how to build a DB agent that translates natural language to SQL code.
  • Use Azure OpenAI Service’s function calling feature to use pre-built functions for sending queries to databases, improving the efficiency and security of your SQL agent.
  • Work with the Assistants API and test it with the function calling and code interpreter features, which will enable you to connect to SQL databases and create your own DB agents more efficiently.

By the end of the course, you’ll be equipped with the technical knowledge and practical experience to implement similar systems in your own projects or organizations, enabling more efficient and accessible data interaction and analysis.

Who should join?

If you want to learn how to interact with databases through natural language, this beginner-friendly course is for you. Familiarity with Python programming and databases (CSV files and SQL) is recommended, but not required.

Course Outline

7 Lessons・5 Code Examples
Unlock certificates

Elevate your learning experience with Pro

Upgrade to Pro and gain unlimited accomplishments on your resume

Learn More

Instructor

Adrian Gonzalez Sanchez

Adrian Gonzalez Sanchez

Course access is free for a limited time during the DeepLearning.AI learning platform beta!

Want to learn more about Generative AI?

Keep learning with updates on curated AI news, courses, and events, as well as Andrew’s thoughts from DeepLearning.AI!