{
  "name": "${V2_SKILLSET}",
  "description": "Chunking profile v2 for ${V2_INDEX}: Text Split by characters, Azure OpenAI embeddings, chunks projected to ${V2_INDEX}",
  "skills": [
    {
      "@odata.type": "#Microsoft.Skills.Text.SplitSkill",
      "name": "split-v2",
      "description": "Chunking profile v2: 2000 characters, 500 overlap (long_prose in chunking-profiles.yaml)",
      "context": "/document",
      "textSplitMode": "pages",
      "maximumPageLength": 2000,
      "pageOverlapLength": 500,
      "maximumPagesToTake": 0,
      "defaultLanguageCode": "en",
      "inputs": [
        { "name": "text", "source": "/document/content" }
      ],
      "outputs": [
        { "name": "textItems", "targetName": "pages" }
      ]
    },
    {
      "@odata.type": "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill",
      "name": "embed-v2",
      "description": "Same model as the vectorizer on ${V2_INDEX}. No apiKey: the search service system managed identity is used",
      "context": "/document/pages/*",
      "resourceUri": "${AOAI_ENDPOINT}",
      "deploymentId": "${EMBEDDING_DEPLOYMENT}",
      "modelName": "${EMBEDDING_MODEL}",
      "inputs": [
        { "name": "text", "source": "/document/pages/*" }
      ],
      "outputs": [
        { "name": "embedding", "targetName": "chunk_vector" }
      ]
    }
  ],
  "indexProjections": {
    "selectors": [
      {
        "targetIndexName": "${V2_INDEX}",
        "parentKeyFieldName": "parent_id",
        "sourceContext": "/document/pages/*",
        "mappings": [
          { "name": "chunk", "source": "/document/pages/*" },
          { "name": "chunk_vector", "source": "/document/pages/*/chunk_vector" },
          { "name": "title", "source": "/document/metadata_storage_name" }
        ]
      }
    ],
    "parameters": {
      "projectionMode": "skipIndexingParentDocuments"
    }
  }
}
