Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Foundry IQ (Azure AI Search) provides direct indexing and query APIs alongside higher-level knowledge source and knowledge base APIs for managed retrieval. Use the Azure portal, REST APIs, or Azure SDKs to configure these capabilities, or connect agents to knowledge bases in the Microsoft Foundry portal.
For terms that apply to supported direct or API Management connections to non-Microsoft models, see Third-party models.
The GenAI (Generative AI) Prompt skill executes a chat completion request against a large language model (LLM) deployed in Azure OpenAI in Foundry Models or Microsoft Foundry. Use this skill to create new information that can be indexed and stored as searchable content.
Here are some examples of how the GenAI prompt skill can help you create content:
- Verbalize images
- Summarize large passages of text
- Simplify complex content
- Perform any other task that you can articulate in a prompt
Use the 2026-10-01 Search Service REST API for generally available GenAI Prompt skill features. The skill is also available in Azure SDKs that support it. This skill supports text, image, and multimodal content, such as images with visuals and text extracted from PDF files.
Tip
It's common to combine this skill with a data chunking skill. The Multimodal tutorial demonstrates image verbalization with two different data chunking strategies.
Supported models
Use a chat completion inference model deployed in Microsoft Foundry that accepts the skill's inputs and generation parameters. Configure a Chat Completions operation that supports the parameters and response format used by your skill.
For image verbalization, the model you use to analyze the image determines what image formats are supported.
For GPT-5 models, the
temperatureparameter is not supported in the same way as previous models. If defined, it must be set to1.0, as other values will result in errors.Billing is based on the pricing of the model you use.
Note
Model calls use a public endpoint unless you configure an eligible private execution route. See API Management connectivity qualifications. Check the Foundry IQ (Azure AI Search) regions and the Azure OpenAI model regions when choosing deployment locations.
Prerequisites
An Azure OpenAI in Foundry Models resource or Foundry project.
A supported model deployed to your resource or project.
For Azure OpenAI, use the resource endpoint with the
openai.azure.comdomain as the base for a complete Chat Completions invocation URI:https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/chat/completions?api-version=<downstream-api-version>. Replace the deployment name and downstream API version with values supported by your Azure OpenAI deployment. Seturito this complete URL, not the resource base endpoint. The downstream API version is separate from the Search API version.For Foundry, use the deployment's complete Chat Completions target URI, including the operation path and any required query parameters, for
uri.
Authentication can be key-based with an API key from your Foundry or Azure OpenAI resource. However, we recommend role-based access using a Foundry IQ service managed identity assigned to a role.
For Azure OpenAI deployments, assign Cognitive Services OpenAI User to the Foundry IQ service's system-assigned or selected user-assigned managed identity. Use the Azure OpenAI or parent Foundry/Azure AI Services resource that hosts the deployment and owns the configured endpoint as the scope, not the project object or Foundry IQ service.
For other supported Foundry-hosted model endpoints, assign Foundry User to the managed identity at the resource scope required by that model connection.
Important
The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged by the rename.
If API Management terminates Search authentication and uses its own backend identity, authorize Search at the gateway. Assign the model role to that gateway identity on the model-hosting resource instead. See Role scope and identity identifiers.
@odata.type
#Microsoft.Skills.Custom.ChatCompletionSkill
Data limits
| Limit | Notes |
|---|---|
maxTokens |
Default is 1024 if omitted. Maximum value is model-dependent. |
| Request time-out | Fixed at 30 seconds. Consider this limit when you choose a model for bulk indexing, as reasoning models (such as o1 and o3) might exceed it. |
| Images | Base 64–encoded images and image URLs are supported. Size limit is model-dependent. |
Skill parameters
| Property | Type | Required | Notes |
|---|---|---|---|
uri |
string | Yes | Complete model invocation URL, including the operation path and any required query parameters. Supported resource domains are openai.azure.com, services.ai.azure.com, cognitiveservices.azure.com, and models.ai.azure.com. API Management default and custom gateway domains are also supported. A gateway base URL alone isn't a complete operation URL. For protocol, authentication, and private-connectivity qualifications, see Use API Management with Foundry IQ model calls. For permission-enabled SharePoint indexers, see Restrictions with SharePoint permissions. |
apiKey |
string | Cond.* | Secret key for the model. Leave blank when using managed identity. |
authIdentity |
object | Cond.* | A SearchIndexerDataIdentity object selecting an attached user-assigned managed identity, not a client-ID string. Use @odata.type: "#Microsoft.Azure.Search.DataUserAssignedIdentity" and the identity's resource ID in userAssignedIdentity. Omit this property and apiKey to use the system-assigned identity. See Managed identities. |
commonModelParameters |
object | No | Standard generation controls such as temperature, maxTokens, etc. |
extraParameters |
object | No | Open dictionary passed through to the underlying model API. |
extraParametersBehavior |
string | No | "pass-through" | "drop" | "error" (default "error"). |
responseFormat |
object | No | Controls whether the model returns text, a free-form JSON object, or a strongly typed JSON schema. responseFormat payload examples: {responseFormat: { type: text }}, {responseFormat: { type: json_object }}, {responseFormat: { type: json_schema }} |
* Exactly one of apiKey, authIdentity, or the service’s system-assigned identity must be used.
For key authentication, set apiKey. For managed identity, omit apiKey and use the system-assigned identity or the authIdentity object described above.
commonModelParameters defaults
| Parameter | Default |
|---|---|
model |
(deployment default) |
frequencyPenalty |
0 |
presencePenalty |
0 |
maxTokens |
1024 |
temperature |
0.7 |
seed |
null |
stop |
null |
Skill inputs
| Input name | Type | Required | Description |
|---|---|---|---|
systemMessage |
string | Yes | System-level instruction (ex: "You are a helpful assistant."). |
userMessage |
string | Yes | User prompt. |
text |
string | No | Optional text appended to userMessage (text-only scenarios). |
image |
string (Base 64 data-URL) | No | Adds an image to the prompt (multimodal models only). |
imageDetail |
string (low | high | auto) |
No | Fidelity hint for Azure OpenAI multimodal models. |
Skill outputs
| Output name | Type | Description |
|---|---|---|
response |
string or JSON object | Model output in the format requested by responseFormat.type. |
usageInformation |
JSON object | Token counts and echo of model parameters. |
Sample definitions
Text-only summarization
This complete skill example summarizes document content and includes an optional instruction to label the generated response. Replace the endpoint, deployment, and key with your supported model configuration. The URL's Azure OpenAI API version is separate from the Search API version.
{
"@odata.type": "#Microsoft.Skills.Custom.ChatCompletionSkill",
"name": "Summarizer",
"description": "Summarizes document content.",
"context": "/document",
"inputs": [
{ "name": "text", "source": "/document/content" },
{
"name": "systemMessage",
"source": "='You are a concise AI assistant. Begin the response with \"AI-generated content:\".'"
},
{ "name": "userMessage", "source": "='Summarize the following text:'" }
],
"outputs": [ { "name": "response" } ],
"uri": "https://demo.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-08-01-preview",
"apiKey": "<api-key>",
"commonModelParameters": { "temperature": 0.3 }
}
Reference: Skillsets - Create Or Update.
Optionally label generated text
The preceding example places Begin the response with "AI-generated content:". in systemMessage. You can also place this instruction in userMessage. Choose your own wording, placement, and language, or omit the instruction if you don't need a visible disclosure.
Model instruction following can vary. If every response must have a label, add or validate it deterministically in your application rather than relying only on the prompt. Foundry IQ doesn't automatically insert disclosure text.
This optional visible text isn't machine-verifiable provenance, watermarking, content credentials, or a C2PA implementation. It doesn't define legal or compliance requirements. The same prompting approach applies to supported direct, API Management, and admin-connected model configurations; it doesn't change their model, authentication, networking, or permission-protected enrichment restrictions.
Text + image description
{
"@odata.type": "#Microsoft.Skills.Custom.ChatCompletionSkill",
"name": "Image Describer",
"context": "/document/normalized_images/*",
"inputs": [
{ "name": "image", "source": "/document/normalized_images/*/data" },
{ "name": "imageDetail", "source": "=high" },
{ "name": "systemMessage", "source": "='You are a useful AI assistant.'" },
{ "name": "userMessage", "source": "='Describe this image:'" }
],
"outputs": [ { "name": "response" } ],
"uri": "https://demo.openai.azure.com/openai/deployments/gpt-4o/chat/completions",
"authIdentity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identity-name>"
},
"responseFormat": { "type": "text" }
}
Structured numerical fact-finder
{
"@odata.type": "#Microsoft.Skills.Custom.ChatCompletionSkill",
"name": "NumericalFactFinder",
"context": "/document",
"inputs": [
{ "name": "systemMessage", "source": "='You are an AI assistant that helps people find information.'" },
{ "name": "userMessage", "source": "='Find all the numerical data and put it in the specified fact format.'"},
{ "name": "text", "source": "/document/content" }
],
"outputs": [ { "name": "response" } ],
"uri": "https://demo.openai.azure.com/openai/deployments/gpt-4o/chat/completions",
"apiKey": "<api-key>",
"responseFormat": {
"type": "json_schema",
"jsonSchemaProperties": {
"name": "NumericalFactObj",
"strict": true,
"schema": {
"type": "object",
"properties": "{\"facts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"number\":{\"type\":\"number\"},\"fact\":{\"type\":\"string\"}},\"required\":[\"number\",\"fact\"]}}}",
"required": [ "facts" ],
"additionalProperties": false
}
}
}
}
Sample output (truncated)
{
"response": {
"facts": [
{ "number": 32.0, "fact": "Jordan scored 32 points per game in 1986-87." },
{ "number": 6.0, "fact": "He won 6 NBA championships." }
]
},
"usageInformation": {
"usage": {
"completion_tokens": 203,
"prompt_tokens": 248,
"total_tokens": 451
}
}
}
Best practices
- Chunk long documents with the Text Split skill to stay within the model’s context window.
- For high-volume indexing, dedicate a separate model deployment to this skill so that token quotas for query-time RAG workloads remain unaffected.
- To minimize latency, co-locate the model and your Foundry IQ service in the same Azure region.
- Use
responseFormat.json_schemawith GPT-4o for reliable structured extraction and easier mapping to index fields. - Monitor token usage and submit quota-increase requests if the indexer saturates your Tokens per Minute (TPM) limits.
Errors and warnings
| Condition | Result |
|---|---|
Missing or invalid uri |
Error |
| No authentication method specified | Error |
Both apiKey and authIdentity supplied |
Error |
| Unsupported model for multimodal prompt | Error |
| Input exceeds model token limit | Error |
Model returns invalid JSON for json_schema |
Warning: Raw string returned in response |
Restrictions with SharePoint permissions
When your indexer ingests SharePoint ACLs, this skill supports first-party Azure OpenAI and Microsoft Foundry endpoints in these domains: openai.azure.com, cognitiveservices.azure.com, services.ai.azure.com, and models.ai.azure.com.
APIM, custom-domain, and third-party routes aren't supported for this configuration, regardless of authentication or network settings. Use a supported endpoint or omit optional model enrichment while retaining ACL ingestion.
This skill isn't supported with sensitivity-label ingestion, including when you combine sensitivity labels with ACLs.
Security considerations for managed identity authentication
When the GenAI Prompt skill uses managed identity authentication, Foundry IQ obtains a Microsoft Entra access token for the Foundry Tools audience (https://cognitiveservices.azure.com) and includes it in requests sent to the endpoint specified by uri. Managed identity authentication applies when authIdentity is set, or when both apiKey and authIdentity are empty and the service uses the system-assigned identity.
The endpoint referenced by uri is expected to be your own Azure OpenAI or Foundry resource. For supported endpoint domains, see Skill parameters.
Azure API Management (APIM) endpoints (*.azure-api.net) and custom domains that front these resources are also supported. Because a custom domain or APIM hostname can't be verified from its name alone, Foundry IQ validates these endpoints with a live connectivity check at configuration time rather than by domain matching. You're responsible for configuring and maintaining the relationship between the endpoint and the Azure OpenAI or Foundry resource behind it.
For permission-enabled SharePoint indexers, see Restrictions with SharePoint permissions.
Note
A managed identity token issued for the Foundry Tools audience is valid against any Foundry Tools or Azure OpenAI resource the identity is authorized on. Sending it to an untrusted endpoint could expose the token.
Recommended security practices
To help maintain a secure deployment, follow these practices:
- Set
urionly to endpoints you own and trust. Prefer the Foundry Tools domains listed earlier. If you use an APIM or custom-domain endpoint, confirm it fronts your own resource before enabling managed identity. A trusted-looking hostname isn't proof of ownership. - Apply the principle of least privilege to the managed identity used by the Foundry IQ service:
- On Azure OpenAI, assign only Cognitive Services OpenAI User.
- On Foundry, assign only Foundry User. Avoid granting broader roles.
- Use Network Security Perimeter (NSP) and private endpoints or VNet integration to restrict which endpoints the Foundry IQ service can reach and which sources the target resource accepts requests from.
- If you use an APIM or custom-domain endpoint, ensure the gateway validates inbound requests and forwards them only to the intended backend. You should also review its access policies periodically.
- Prefer managed identity over
apiKey. If you useapiKey, store and rotate it securely and don't embed it in source control. The service rejects configurations that set bothapiKeyandauthIdentity. - Periodically review skillset definitions, managed identity role assignments, and APIM and custom-domain configurations to confirm that
urivalues, access controls, and identity permissions remain current and appropriate. Review configuration changes through your established change-management and security-review processes. - Monitor Azure OpenAI, Foundry Tools, and Foundry sign-in logs, authentication events, and access logs for unexpected or unauthorized activity.
- Remove unused skills, endpoints, role assignments, and API keys that are no longer required.
Restrict access to skillset configuration
Users who can create, modify, or run skillsets control both the destination endpoint (uri) and the authentication configuration used by the skill. Because the skill sends a managed identity token for the Foundry Tools audience to that endpoint, restrict these permissions to trusted administrators and follow your standard change-management and security-review processes when configuring managed identity–enabled skills.