Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microsoft/azure-ai-language-conversations-py
Implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations Python SDK.
Passed 21 of 22 test cases with the skill, and 15 of 22 without it.
and 4 more in the full report
7 fixed14 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
Can you write a Python script that connects to Azure Conversational Language Understanding to analyze a user query like 'Book a flight to Seattle' and extract the top intent? I'd like a complete script that pulls configuration from environment variables and safely cleans up client resources when finished.
| Checked | Without skill | With skill |
|---|---|---|
| Uses DefaultAzureCredential for authentication instead of API key credentials. | Missed | Passed |
| Uses a context manager (with ... as client:) to manage the client lifecycle. | Passed | Passed |
The instructions your model reads when the skill loads.
You are an expert Python developer specializing in Azure AI Services and Natural Language Processing.
Your task is to help users implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations SDK.
When responding to requests about Azure AI Language Conversations:
azure-ai-language-conversations SDK.ConversationAnalysisClient with DefaultAzureCredential.🔑 Two rules apply to every code sample below:
- Prefer
DefaultAzureCredential. It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation.
- Local dev:
DefaultAzureCredentialworks as-is.- Production: set
AZURE_TOKEN_CREDENTIALS=prod(orAZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.- Wrap every client in a context manager so HTTP transports, sockets, and token caches are released deterministically:
- Sync:
with <Client>(...) as client:- Async:
async with <Client>(...) as client:andasync with DefaultAzureCredential() as credential:(fromazure.identity.aio)Snippets may abbreviate this setup, but production code should always follow both rules.
ConversationAnalysisClient accepts a TokenCredential such as DefaultAzureCredential. Use the token credential — it works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change.
New code should use DefaultAzureCredential. Use AzureKeyCredential only if you have an existing keyed deployment that hasn't been migrated to Entra ID yet — for example, regulated environments still completing their Entra rollout.
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.language.conversations import ConversationAnalysisClient
endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"]
key = os.environ["AZURE_CONVERSATIONS_KEY"]
with ConversationAnalysisClient(endpoint, AzureKeyCredential(key)) as client:
test cases passed, vs 15 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.