Implement generative AI and agentic solutions 2.1 Build generative applications by using Foundry
A Python app must (1) generate embeddings and (2) run Foundry agents and evaluations.
Study guide skill: Configure an application to connect to a Foundry project
Question B4-020
A Python app must (1) generate embeddings and (2) run Foundry agents and evaluations. Following the Foundry SDK guidance, which SDK and endpoint should it use for each task?
Select one answer.
Answer: B
The guidance is to use the OpenAI SDK (the /openai/v1 endpoint) when generating embeddings or when you need maximum OpenAI compatibility, and the Foundry SDK, which exposes all Foundry project APIs through the single project endpoint, for agents, evaluations, and other Foundry-specific features. Foundry Tools SDKs are for prebuilt services such as Vision and Speech. The Anthropic SDK is for Claude models.
Deep dive
How it works
The Foundry SDK overview maps each kind of work to an SDK and an endpoint:
- Foundry SDK (azure-ai-projects in Python): a thin client that gives you all the Foundry project APIs through a single project endpoint, https://<resource-name>.services.ai.azure.com/api/projects/<project-name>. Use it for agents, evaluations and other Foundry-specific features.
- OpenAI SDK: the full OpenAI API surface, including embeddings and Foundry Models sold by Azure through Chat Completions, with the best latency and maximum OpenAI compatibility, at https://<resource-name>.openai.azure.com/openai/v1.
- Anthropic SDK: Anthropic Claude models deployed in Foundry, at the /anthropic endpoint.
- Foundry Tools SDKs: prebuilt point solutions (formerly Azure AI Services) such as Vision and Speech, each with its own SDK.
So embeddings go through the OpenAI SDK and /openai/v1, and agents and evaluations through the Foundry SDK and the project endpoint.
The other options, and when you'd use them
- Foundry Tools SDKs for embeddings, OpenAI SDK for agents: Foundry Tools SDKs are for prebuilt services like Vision and Speech, and agents and evaluations are Foundry SDK features.
- Anthropic SDK for embeddings: It's for Claude models.
- Foundry SDK with /openai/v1 for both: The Foundry SDK works through the project endpoint. Embeddings are an OpenAI SDK task.
Exam tip
Embeddings or max OpenAI compatibility = OpenAI SDK + /openai/v1. Agents, evaluations, Foundry features = Foundry SDK + project endpoint.
References
Last reviewed: