AI-103 Practice Question 34: Code Interpreter Analysis
Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 4 · question 4 of 10
A finance team wants an agent that takes an uploaded CSV of monthly results, computes exact year-on-year variances per cost centre, and returns a bar chart image the analyst can drop into a deck. The numbers must be arithmetically correct, and the team has no service of their own to call.
Which tool should the agent use?
Show answer and explanation
Answer:
Code interpreter lets the agent's model write and run Python in a Microsoft-managed sandbox, iteratively, for exactly this class of work: data analysis, chart generation and maths. CSV is a supported upload type, and generated files such as a PNG chart come back as container_file_citation annotations you download. Two operational facts worth knowing: it bills on top of token charges, and each concurrent conversation gets its own session (active up to one hour, with a 30-minute idle timeout).
- A is wrong because file search is retrieval. It returns relevant chunks of the document; it does not compute aggregates, and handing raw rows back to the model returns you to the arithmetic problem. - C is wrong because it is real work the team said it cannot do (write, host and operate a calculation service) to replace a managed tool that already runs arbitrary Python. - D is wrong because language models perform arithmetic by prediction, not calculation. Step-by-step prompting improves the odds but gives no guarantee, and it cannot render a PNG.
Reference: Use Code Interpreter with Microsoft Foundry agents