다음을 통해 공유


문서 레이아웃 기술

문서 레이아웃 기술은 문서를 분석하여 구조 및 특성을 검색하고 Markdown 또는 텍스트 형식으로 문서의 구문 표현을 생성합니다. 이를 사용하여 텍스트와 이미지를 추출할 수 있으며, 이미지 추출에는 문서 내에서 이미지 위치를 보존하는 위치 메타데이터가 포함됩니다. 이미지가 관련 콘텐츠와의 근접성은 검색 보강 생성(RAG) 작업 및 다중 모드 검색 시나리오에서 유용합니다.

이 문서는 문서 레이아웃 기술에 대한 참조 문서입니다. 사용 방법에 대한 정보는 문서 레이아웃별로 청크화 및 벡터화하는 방법을 참조하세요.

이 기술은 Azure Document Intelligence의 레이아웃 모델Foundry Tools에서 사용합니다.

이 기술은 인덱서당 하루 20개 문서를 초과하는 트랜잭션에 대해 청구 가능한 Microsoft Foundry 리소스에 바인딩됩니다. 기본 제공 기술 실행은 기존 Foundry Tools Standard 가격에 따라 요금이 부과됩니다.

Tip

이 기술은 구조와 이미지가 포함된 PDF와 같은 콘텐츠에서 자주 사용됩니다. 다음 튜토리얼은 두 가지 다른 데이터 청크화 기법을 사용한 이미지 설명을 시연합니다.

Limitations

이 기술에는 다음과 같은 제한 사항이 있습니다.

  • 이 기술은 Azure Document Intelligence 레이아웃 모델에서 5분 이상의 처리 시간이 필요한 대형 문서에는 적합하지 않습니다. 기술이 시간 초과되지만, 청구 목적으로 skillset에 연결된 경우 Foundry 리소스에는 여전히 요금이 부과됩니다. 문서가 처리 한도 내에 유지되도록 최적화하여 불필요한 비용이 발생하지 않도록 하세요.

  • 이 기술은 Azure Document Intelligence 레이아웃 모델을 호출하므로, 다양한 파일 형식에 대한 다양한 문서 유형에 대한 모든 문서화된 서비스 동작이 해당 출력에 적용됩니다. 예를 들어, Word (DOCX) 파일과 PDF 파일은 이미지 처리 방식의 차이로 인해 다른 결과를 생성할 수 있습니다. DOCX 및 PDF에서 일관된 이미지 동작이 필요한 경우 문서를 PDF로 변환하거나 다중 모드 검색 설명서 에서 대체 방법을 검토하는 것이 좋습니다.

지원되는 지역

문서 레이아웃 기술은 Azure Document Intelligence 2024-11-30 API 버전 V4.0을 호출합니다.

지원되는 지역은 모드 및 기술이 Azure Document Intelligence 레이아웃 모델과 연결되는 방식에 따라 달라집니다.

Approach Requirement
데이터 가져오기(새) 마법사 포털 경험을 얻으려면 다음 지역 중 하나에서 Foundry 리소스를 생성하세요. 미국 동부, 서유럽, 미국 중북부.
프로그래밍 방식, 청구에 Microsoft Entra ID 인증(미리 보기) 사용 지역별 제품 가용성에 따라 서비스가 지원되는 지역 중 하나에서 Azure AI Search를 만듭니다.
지역 테이블별 제품 가용성 에 나열된 모든 지역에 Foundry 리소스를 만듭니다.
프로그래매틱, 청구에 Foundry 리소스 키 사용 Azure AI Search Service와 Foundry 리소스를 동일한 지역에 생성하세요. 즉, 선택한 지역에 는 Azure AI Search 및 Azure Document Intelligence 서비스를 모두 지원해야 합니다.

현재 구현된 버전의 문서 레이아웃 모델에는 21Vianet 지역이 지원되지 않습니다.

지원되는 파일 형식

이 기술은 다음 파일 형식을 인식합니다.

  • .PDF
  • .JPEG
  • .JPG
  • .PNG
  • .BMP
  • .TIFF
  • .DOCX
  • .XLSX
  • .PPTX
  • .HTML

지원되는 언어

인쇄된 텍스트에 대한 Azure Document Intelligence 레이아웃 모델 지원 언어를 참조하세요 .

@odata.type

Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill

데이터 제한

  • PDF 및 TIFF의 경우 최대 2,000페이지를 처리할 수 있습니다(무료 계층 구독의 경우 처음 2페이지만 처리됨).
  • 문서를 분석하기 위한 파일 크기가 Azure Document Intelligence 유료(S0) 계층의 경우 500MB , Azure Document Intelligence 무료(F0) 계층의 경우 4MB인 경우에도 인덱싱은 검색 서비스 계층의 인덱서 제한 에 따라 다릅니다.
  • 이미지 크기는 50픽셀 x 50픽셀 이상, 10,000픽셀 x 10,000픽셀 이하여야 합니다.
  • PDF 파일에 비밀번호가 설정된 경우, 인덱서를 실행하기 전에 비밀번호를 제거하세요.

기술 매개 변수

매개 변수는 대/소문자를 구분합니다. 몇 가지 매개변수가 REST API의 특정 미리 보기 버전에서 도입되었습니다. 모든 매개변수에 완전하게 접근하려면 일반 제공 버전(2025-09-01) 또는 최신 미리 보기 버전(2025-11-01-preview)을 사용하는 것이 좋습니다.

매개 변수 이름 허용되는 값 Description
outputMode oneToMany 기술이 생성하는 출력의 기수를 제어합니다.
markdownHeaderDepth h1, h2, h3, h4, h5, h6(default) outputFormatmarkdown로 설정된 경우에만 적용. 이 매개변수는 고려해야 할 가장 깊은 중첩 수준을 설명합니다. 예를 들어 markdownHeaderDepth가 있으면 h3다음과 같이 h4더 깊은 모든 섹션이 롤인 h3됩니다.
outputFormat markdown(default), text New. 스킬이 생성하는 출력의 형식을 제어합니다.
extractionOptions ["images"], ["images", "locationMetadata"], ["locationMetadata"] New. 문서에서 추출된 추가 내용을 식별합니다. 출력에 포함될 콘텐츠에 해당하는 열거형 배열을 정의합니다. 예를 들어 extractionOptions["images", "locationMetadata"]인 경우 출력에는 이미지와 위치 메타데이터가 포함되며, 위치 메타데이터는 페이지 번호나 섹션 등 콘텐츠가 추출된 위치 정보를 제공합니다. 이 매개변수는 두 출력 형식 모두에 적용됩니다.
chunkingProperties 아래를 참조하십시오. New. outputFormattext로 설정된 경우에만 적용. 텍스트 콘텐츠를 분할하면서 다른 메타데이터를 재계산하는 방법을 포함하는 옵션입니다.
ChunkingProperties 매개 변수 Version 허용되는 값 Description
unit Characters. 현재 허용되는 유일한 값입니다. 청크 길이는 단어 또는 토큰이 아닌 문자 수로 측정됩니다. New. 청크 단위의 기본 단위를 제어합니다.
maximumLength 300에서 50,000 사이의 정수입니다. New. String.Length로 측정한 문자 단위의 최대 청크 길이입니다.
overlapLength Integer. 값은 다음의 maximumLength의 절반보다 작아야 합니다. New. 두 텍스트 청크 사이에 제공되는 겹침 길이입니다.

기술 입력

입력 이름 Description
file_data 콘텐츠를 추출할 파일입니다.

"file_data" 입력은 다음과 같이 정의된 개체여야 합니다.

{
  "$type": "file",
  "data": "BASE64 encoded string of the file"
}

또는 다음과 같이 정의할 수 있습니다.

{
  "$type": "file",
  "url": "URL to download file",
  "sasToken": "OPTIONAL: SAS token for authentication if the URL provided is for a file in blob storage"
}

파일 참조 객체는 다음 방법 중 하나로 생성할 수 있습니다.

  • 인덱서 정의에서 allowSkillsetToReadFileData 매개 변수를 true로 설정합니다. 이 설정은 /document/file_data 경로를 생성하며, 이는 블롭 데이터 소스에서 다운로드한 원본 파일 데이터를 나타내는 객체입니다. 이 매개변수는 Azure Blob 스토리지의 파일에만 적용됩니다.

  • 사용자 지정 스킬이 $type, data 또는 urlsastoken를 제공하는 JSON 객체 정의를 반환합니다. $type 매개변수는 file로 설정되어야 하며, data은 파일 콘텐츠의 Base64로 인코딩된 바이트 배열이어야 합니다. url매개 변수는 해당 위치에서 파일을 다운로드하기 위한 액세스 권한이 있는 유효한 URL이어야 합니다.

기술 출력

출력 이름 Description
markdown_document outputFormatmarkdown로 설정된 경우에만 적용. Markdown 문서의 각 개별 섹션을 나타내는 "sections" 객체 모음입니다.
text_sections outputFormattext로 설정된 경우에만 적용. 섹션 머리글 자체를 포함하는 페이지 범위 내의 텍스트를 나타내는 텍스트 청크 개체의 컬렉션입니다(더 이상 청크 분할이 구성됨). 텍스트 청크 개체는 해당하는 경우 포함합니다 locationMetadata .
normalized_images outputFormattext로 설정되고 extractionOptionsimages가 포함된 경우에만 적용됩니다. 문서에서 추출된 이미지 모음으로, 해당되는 경우 locationMetadata도 포함됩니다.

markdown 출력 모드에 대한 샘플 정의

{
  "skills": [
    {
      "description": "Analyze a document",
      "@odata.type": "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill",
      "context": "/document",
      "outputMode": "oneToMany", 
      "markdownHeaderDepth": "h3", 
      "inputs": [
        {
          "name": "file_data",
          "source": "/document/file_data"
        }
      ],
      "outputs": [
        {
          "name": "markdown_document", 
          "targetName": "markdown_document" 
        }
      ]
    }
  ]
}

markdown 출력 모드에 대한 샘플 출력

{
  "markdown_document": [
    { 
      "content": "Hi this is Jim \r\nHi this is Joe", 
      "sections": { 
        "h1": "Foo", 
        "h2": "Bar", 
        "h3": "" 
      },
      "ordinal_position": 0
    }, 
    { 
      "content": "Hi this is Lance",
      "sections": { 
         "h1": "Foo", 
         "h2": "Bar", 
         "h3": "Boo" 
      },
      "ordinal_position": 1,
    } 
  ] 
}

markdownHeaderDepth의 값은 "sections" 사전의 키 수를 제어합니다. 예제 스킬 정의에서 markdownHeaderDepth이 "h3"이므로, "sections" 사전에는 세 개의 키가 있습니다: h1, h2, h3.

텍스트 출력 모드 및 이미지와 메타데이터 추출 예시입니다.

이 예시는 문서에서 텍스트 콘텐츠를 고정 크기 청크로 출력하고, 이미지와 위치 메타데이터를 추출하는 방법을 보여줍니다.

텍스트 출력 모드 및 이미지와 메타데이터 추출에 대한 샘플 정의입니다.

{
  "skills": [
    {
      "description": "Analyze a document",
      "@odata.type": "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill",
      "context": "/document",
      "outputMode": "oneToMany",
      "outputFormat": "text",
      "extractionOptions": ["images", "locationMetadata"],
      "chunkingProperties": {     
          "unit": "characters",
          "maximumLength": 2000, 
          "overlapLength": 200
      },
      "inputs": [
        {
          "name": "file_data",
          "source": "/document/file_data"
        }
      ],
      "outputs": [
        { 
          "name": "text_sections", 
          "targetName": "text_sections" 
        }, 
        { 
          "name": "normalized_images", 
          "targetName": "normalized_images" 
        } 
      ]
    }
  ]
}

텍스트 출력 모드 및 이미지와 메타데이터 추출에 대한 샘플 출력입니다.

{
  "text_sections": [
      {
        "id": "1_7e6ef1f0-d2c0-479c-b11c-5d3c0fc88f56",
        "content": "the effects of analyzers using Analyze Text (REST). For more information about analyzers, see Analyzers for text processing.During indexing, an indexer only checks field names and types. There's no validation step that ensures incoming content is correct for the corresponding search field in the index.Create an indexerWhen you're ready to create an indexer on a remote search service, you need a search client. A search client can be the Azure portal, a REST client, or code that instantiates an indexer client. We recommend the Azure portal or REST APIs for early development and proof-of-concept testing.Azure portal1. Sign in to the Azure portal 2, then find your search service.2. On the search service Overview page, choose from two options:· Import data wizard: The wizard is unique in that it creates all of the required elements. Other approaches require a predefined data source and index.All services > Azure Al services | Al Search >demo-search-svc Search serviceSearchAdd indexImport dataImport and vectorize dataOverviewActivity logEssentialsAccess control (IAM)Get startedPropertiesUsageMonitoring· Add indexer: A visual editor for specifying an indexer definition.",
        "locationMetadata": {
          "pageNumber": 1,
          "ordinalPosition": 0,
          "boundingPolygons": "[[{\"x\":1.5548,\"y\":0.4036},{\"x\":6.9691,\"y\":0.4033},{\"x\":6.9691,\"y\":0.8577},{\"x\":1.5548,\"y\":0.8581}],[{\"x\":1.181,\"y\":1.0627},{\"x\":7.1393,\"y\":1.0626},{\"x\":7.1393,\"y\":1.7363},{\"x\":1.181,\"y\":1.7365}],[{\"x\":1.1923,\"y\":2.1466},{\"x\":3.4585,\"y\":2.1496},{\"x\":3.4582,\"y\":2.4251},{\"x\":1.1919,\"y\":2.4221}],[{\"x\":1.1813,\"y\":2.6518},{\"x\":7.2464,\"y\":2.6375},{\"x\":7.2486,\"y\":3.5913},{\"x\":1.1835,\"y\":3.6056}],[{\"x\":1.3349,\"y\":3.9489},{\"x\":2.1237,\"y\":3.9508},{\"x\":2.1233,\"y\":4.1128},{\"x\":1.3346,\"y\":4.111}],[{\"x\":1.5705,\"y\":4.5322},{\"x\":5.801,\"y\":4.5326},{\"x\":5.801,\"y\":4.7311},{\"x\":1.5704,\"y\":4.7307}]]"
        },
        "sections": []
      },
      {
        "id": "2_25134f52-04c3-415a-ab3d-80729bd58e67",
        "content": "All services > Azure Al services | Al Search >demo-search-svc | Indexers Search serviceSearch0«Add indexerRefreshDelete:selected: TagsFilter by name ...:selected: Diagnose and solve problemsSearch managementStatusNameIndexesIndexers*Data sourcesRun the indexerBy default, an indexer runs immediately when you create it on the search service. You can override this behavior by setting disabled to true in the indexer definition. Indexer execution is the moment of truth where you find out if there are problems with connections, field mappings, or skillset construction.There are several ways to run an indexer:· Run on indexer creation or update (default).. Run on demand when there are no changes to the definition, or precede with reset for full indexing. For more information, see Run or reset indexers.· Schedule indexer processing to invoke execution at regular intervals.Scheduled execution is usually implemented when you have a need for incremental indexing so that you can pick up the latest changes. As such, scheduling has a dependency on change detection.Indexers are one of the few subsystems that make overt outbound calls to other Azure resources. In terms of Azure roles, indexers don't have separate identities; a connection from the search engine to another Azure resource is made using the system or user- assigned managed identity of a search service. If the indexer connects to an Azure resource on a virtual network, you should create a shared private link for that connection. For more information about secure connections, see Security in Azure Al Search.Check results",
        "locationMetadata": {
          "pageNumber": 2,
          "ordinalPosition": 1,
          "boundingPolygons": "[[{\"x\":2.2041,\"y\":0.4109},{\"x\":4.3967,\"y\":0.4131},{\"x\":4.3966,\"y\":0.5505},{\"x\":2.204,\"y\":0.5482}],[{\"x\":2.5042,\"y\":0.6422},{\"x\":4.8539,\"y\":0.6506},{\"x\":4.8527,\"y\":0.993},{\"x\":2.5029,\"y\":0.9845}],[{\"x\":2.3705,\"y\":1.1496},{\"x\":2.6859,\"y\":1.15},{\"x\":2.6858,\"y\":1.2612},{\"x\":2.3704,\"y\":1.2608}],[{\"x\":3.7418,\"y\":1.1709},{\"x\":3.8082,\"y\":1.171},{\"x\":3.8081,\"y\":1.2508},{\"x\":3.7417,\"y\":1.2507}],[{\"x\":3.9692,\"y\":1.1445},{\"x\":4.0541,\"y\":1.1445},{\"x\":4.0542,\"y\":1.2621},{\"x\":3.9692,\"y\":1.2622}],[{\"x\":4.5326,\"y\":1.2263},{\"x\":5.1065,\"y\":1.229},{\"x\":5.106,\"y\":1.346},{\"x\":4.5321,\"y\":1.3433}],[{\"x\":5.5508,\"y\":1.2267},{\"x\":5.8992,\"y\":1.2268},{\"x\":5.8991,\"y\":1.3408},{\"x\":5.5508,\"y\":1.3408}]]"
        },
        "sections": []
       }
    ],
    "normalized_images": [ 
        { 
            "id": "1_550e8400-e29b-41d4-a716-446655440000", 
            "data": "SGVsbG8sIFdvcmxkIQ==", 
            "imagePath": "aHR0cHM6Ly9henNyb2xsaW5nLmJsb2IuY29yZS53aW5kb3dzLm5ldC9tdWx0aW1vZGFsaXR5L0NyZWF0ZUluZGV4ZXJwNnA3LnBkZg2/normalized_images_0.jpg",  
            "locationMetadata": {
              "pageNumber": 1,
              "ordinalPosition": 0,
              "boundingPolygons": "[[{\"x\":2.0834,\"y\":6.2245},{\"x\":7.1818,\"y\":6.2244},{\"x\":7.1816,\"y\":7.9375},{\"x\":2.0831,\"y\":7.9377}]]"
            }
        },
        { 
            "id": "2_123e4567-e89b-12d3-a456-426614174000", 
            "data": "U29tZSBtb3JlIGV4YW1wbGUgdGV4dA==", 
            "imagePath": "aHR0cHM6Ly9henNyb2xsaW5nLmJsb2IuY29yZS53aW5kb3dzLm5ldC9tdWx0aW1vZGFsaXR5L0NyZWF0ZUluZGV4ZXJwNnA3LnBkZg2/normalized_images_1.jpg",  
            "locationMetadata": {
              "pageNumber": 2,
              "ordinalPosition": 1,
              "boundingPolygons": "[[{\"x\":2.0784,\"y\":0.3734},{\"x\":7.1837,\"y\":0.3729},{\"x\":7.183,\"y\":2.8611},{\"x\":2.0775,\"y\":2.8615}]]"
            } 
        }
    ] 
}

“sections” 위의 샘플 출력에는 비어 있는 것으로 표시됩니다. 이를 채웁니다. 섹션이 제대로 채워지도록 집합outputFormat으로 markdown 구성된 추가 기술을 추가해야 합니다.

이 기술은 Azure Document Intelligence를 사용하여 locationMetadata를 계산합니다. 페이지 및 경계 다각형 좌표가 정의되는 방법에 대한 자세한 내용은 Azure Document Intelligence 레이아웃 모델을 참조하세요.

imagePath 저장된 이미지의 상대 경로를 나타냅니다. 스킬셋에서 지식 저장소 파일 프로젝션이 구성된 경우, 이 경로는 지식 저장소에 저장된 이미지의 상대 경로와 일치합니다.

참고하십시오