Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microsoft/azure-search-documents-py
Azure AI Search SDK for Python.
Passed 22 of 24 test cases with the skill, and 17 of 24 without it.
and 5 more in the full report
5 fixed17 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am building an async Python application and need to execute hybrid search queries combining vector embeddings and keyword text against Azure AI Search. Please write an asynchronous Python function demonstrating how to set up the async client, perform the query, and iterate through the search results.
| Checked | Without skill | With skill |
|---|---|---|
| The code imports DefaultAzureCredential from azure.identity.aio. | Missed | Passed |
| The SearchClient from azure.search.documents.aio is initialized inside an async with context manager block. | Passed | Passed |
| The response results are iterated using an async for loop. | Passed | Passed |
The instructions your model reads when the skill loads.
Full-text, vector, and hybrid search with AI enrichment capabilities.
pip install azure-search-documents
AZURE_SEARCH_ENDPOINT=https://<service-name>.search.windows.net # Required for all auth methods
AZURE_SEARCH_INDEX_NAME=<your-index-name> # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
AZURE_SEARCH_API_KEY=<your-api-key> # Only required for the legacy API-key auth path below
🔑 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.
import os
from azure.identity import DefaultAzureCredential, ManagedIdentityCredential
from azure.search.documents import SearchClient
# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
credential = DefaultAzureCredential(require_envvar=True)
# Or use a specific credential directly in production:
test cases passed, vs 17 / 24 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.