Azure AI Search for Python
Helps Python developers build vector, hybrid, and semantic search applications with Azure AI Search.
The evidence favors DefaultAzureCredential, constrains production credential chains, discourages API keys, and documents environment variables and managed identity. However, examples and scripts create or update indexes, knowledge sources, and knowledge bases without user confirmation, scoped permissions, sensitive-data-flow guidance, or rollback/cleanup safeguards, so points are deducted. No malware, credential theft, or covert exfiltration red line is evident.
The material covers multiple clients, search modes, async usage, exception classes, and two scripts, but contains duplicated and potentially drifting examples. Async credential lifecycle handling is not consistently complete, scripts do not use context managers, and no committed tests cover the skill's key paths or pin dependency versions. The score is therefore limited to a modest static-read level.
Trigger phrases, the Python SDK audience, and major scenarios are fairly clear, covering keyword, vector, hybrid, semantic search, indexing, and knowledge bases. Input prerequisites, service-version or preview boundaries, non-fit cases, and mainland-China reachability are not documented; core functionality depends on Azure cloud services, so points are deducted.
The SKILL.md provides metadata, installation and environment-variable notes, layered sections, tables, references, scripts, and an MIT license. Repository context also supplies a work-in-progress maintenance signal, CI evidence, and a security-reporting path. Missing are skill-specific changelog/version policy, explicit maintenance ownership and update path, dependency pins, FAQs, systematic troubleshooting, and duplication cleanup.
The skill supplies directly reusable Python templates for common Azure AI Search tasks, including search, indexing, uploads, semantic ranking, vectorization, knowledge bases, and cleanup. Its core value is clear, but examples depend on external configuration and SDK versions, scripts have real side effects, and static evidence does not establish runtime correctness; users still need environment and API-version adaptation, so the static cap applies.
The evidence includes the skill documentation, scripts, reference files, and repository-level CI and test files, providing some auditability. The supplied tests primarily cover a generic Copilot harness rather than this skill's key paths, and there are no pinned dependencies, execution results, or independent corroboration, so the score remains below the static ceiling.
- Running setup_agentic_retrieval.py or setup_vector_index.py creates or updates Azure resources; confirm the target subscription, index names, RBAC permissions, cost, and rollback plan first.
- Verify Knowledge Base, vectorization, and preview API models against the actual azure-search-documents version; duplicated examples may drift or conflict.
- Do not commit API keys, document contents, or embeddings to source control or logs; add data-residency, cross-border-transfer, and mainland-China reachability review.
- Validate async behavior, credential closure, retry handling, and resource cleanup separately in a real environment.
What it does & when to use it
This Agent Skill targets the Azure AI Search SDK for Python and covers search, document operations, index management, and indexer configuration. It includes examples for full-text, vector, hybrid, and semantic search, plus filters, facets, autocomplete, suggesters, and skillsets. The guidance prefers DefaultAzureCredential and emphasizes deterministic client lifecycle management for synchronous and asynchronous code. It fits Python projects using Azure AI Search, but does not replace Azure resource provisioning or permission setup.
Guides developers through installing azure-search-documents and azure-identity, configuring the search endpoint and index name, and using SearchClient, SearchIndexClient, and SearchIndexerClient. Examples show how to create vector-enabled indexes, upload and batch documents, run keyword/vector/hybrid searches, apply semantic ranking, filters, facets, autocomplete, and suggestions, and configure data sources, skillsets, and indexers. It also covers HNSW, semantic configurations, vector dimensions, async clients, and error handling.
- A Python team needs document upload and keyword querying against an Azure AI Search index.
- An application needs to combine embeddings with keyword matching to improve retrieval relevance.
- A natural-language search experience needs semantic ranking and captions.
- A developer needs to create or update an index with vector fields and HNSW configuration.
- A team needs to enrich content from an Azure Blob data source through an indexer and skillset.
Pros & cons
- Covers a broad SDK workflow from authentication and index creation through querying and indexers.
- Includes synchronous, asynchronous, vector, hybrid, and semantic search patterns.
- Clearly recommends DefaultAzureCredential and context managers for clients.
- Provides concrete Python snippets, client selection guidance, and error-handling examples.
- It is focused on the Python SDK and does not cover other languages or Azure resource deployment.
- Examples require an Azure AI Search service, index, credentials, and embedding configuration.
- The source provides no independent test results or compatibility matrix for this individual skill.
- Pricing, complete Azure RBAC setup, and a full permissions checklist are not documented.
How to install
In Copilot CLI or a compatible skills installation flow, run: npx skills add microsoft/skills. Select this skill in the wizard; the README says selected skills are installed to the chosen agent directory, such as .github/skills/. Install the Python dependencies with: pip install azure-search-documents azure-identity. The source does not document an npx command for installing only this individual skill.
How to use
Prompt the agent with tasks containing triggers such as “azure-search-documents,” “SearchClient,” “SearchIndexClient,” “vector search,” “hybrid search,” or “semantic search.” Example: "Create an Azure AI Search index with an HNSW vector field and implement hybrid search in Python using DefaultAzureCredential and context managers." Before running the code, set AZURE_SEARCH_ENDPOINT and AZURE_SEARCH_INDEX_NAME; for production use of DefaultAzureCredential, set AZURE_TOKEN_CREDENTIALS=prod.