Do I need to define a target index when I define a skillset in AI Search?

Nuno Rodrigues 20 Reputation points
2024-10-17T13:57:53.2966667+00:00

Is it not possible to create a skillset without "pointing" to an index? I can't use a skillset for multiple indexes? I would like to use a skillset as a general recipe for all indexes built for different data sources. Is this not possible?

"indexProjections": { "selectors": [ { "targetIndexName": "my_consolidated_index", "parentKeyFieldName": "parent_id", "sourceContext": "/document/pages/", "mappings": [ { "name": "chunk", "source": "/document/pages/", "sourceContext": null, "inputs": [] }, { "name": "chunk_vector", "source": "/document/pages/*/chunk_vector", "sourceContext": null, "inputs": [] }, { "name": "title", "source": "/document/title", "sourceContext": null, "inputs": [] } ] } ], "parameters": { "projectionMode": "skipIndexingParentDocuments" } }

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,339 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2024-10-17T17:17:51.0933333+00:00

    Hello @Nuno Rodrigues the short answer is yes. "A skillset is a reusable object in Azure AI Search that's attached to an indexer."

    So when creating a skillset, you do need to specify a target index through the indexProjections configuration. The indexProjections property in your skillset definition is primarily used for defining how data from different source indexes should be mapped and combined into a target index. However, it doesn't mean that the skillset itself is directly tied to a specific index.

    To your second question, here's how you can use a skillset as a general recipe for multiple indexes:

    1. Create a skillset with the desired skills and parameters. This skillset can include a combination of built-in and custom skills.
    2. When you create or update an index, you can specify the skillset to be applied to that index. This effectively applies the recipe defined in the skillset to the data in the index.
    {
      "name": "my_general_skillset",
      "skills": [
        {
          "name": "CustomSkill1",
          "description": "A custom skill for processing text",
          // ... skill configuration
        },
        // ... other skills
      ]
    }
    

    When creating or updating an index, you can specify this skillset as follows:

    {
      "name": "my_index",
      "skillsetName": "my_general_skillset"
    }
    

    Please let us know if you have further questions.

    -Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.