Courseiva
Implement an agentic solutionmediumMultiple ChoiceObjective-mapped

AI-102 Implement an agentic solution Practice Question

You are building an agentic solution using Azure AI Agent Service. The agent needs to retrieve information from a SQL database dynamically based on user input. Which tool should you configure within the agent to execute SQL queries?

⚠ Common exam trap

Candidates often confuse Code Interpreter with Function calling, assuming that SQL execution requires a custom function, but Code Interpreter's Python environment can directly run SQL queries using standard database connectors.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Code Interpreter

(Code Interpreter) is correct because Azure AI Agent Service's Code Interpreter tool can execute Python code that uses libraries like `pyodbc` or `pymssql` to connect to a SQL database, run dynamic SQL queries based on user input, and return results. This allows the agent to retrieve information from a SQL database dynamically without requiring pre-defined function schemas or external API calls.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Function calling

    Why it's wrong here

    Function calling invokes user-defined functions, but does not directly execute SQL.

  • Code Interpreter

    Why this is correct

    Code Interpreter can run Python code that executes SQL queries against a database.

  • Grounding with Bing

    Why it's wrong here

    Grounding with Bing is for web search, not database queries.

  • Kusto Query Language (KQL)

    Why it's wrong here

    KQL is a query language for Azure Data Explorer, not a tool within Azure AI Agent Service.

About these practice questions

Courseiva writes every AI-102 question from scratch — 945 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.