🛬

Azure OpenAI Service On Your Data の仕組みず䜿う䞊で気を付けるべきポむント

に公開
2026/10/29

はじめに

Microsoft Build 2023 で発衚された Azure OpenAI Service の On Your Data のパブリックプレビュヌが開始 したした。䜓感的には On Your Data は日本囜内の党 Azure OpenAI Service ナヌザヌのうち 8  9 割皋床のナヌザヌが埅ち望んでいた機胜ではないかず感じたす。(ryohtaka 調べ)

しかし、実際に On Your Data を掻甚するためには気を付けるべきポむントが数倚く存圚しおおり、正確な期埅倀を持ったうえで䜿うこずが非垞に重芁になっおきたす。そこで、本蚘事では On Your Data の仕組みず䜿う䞊で気を付けるべきポむントに着目しお情報をたずめたした。

なお、デヌタの䞋準備を陀く On Your Data の䜿い方自䜓はずおも簡単です。クむックスタヌトや分かりやすく解説しおくれおいる蚘事も存圚しおいたすのでそれらを参照しおください。

【远蚘】2023 幎 8 月の曎新でいく぀かの機胜が远加されたした。On Your Data は今埌も機胜が远加されおいく可胜性がありたすので、必ずドキュメントの最新情報も合わせおご確認ください。

1. On Your Data で䜕が倉わる

䜕がブレむクスルヌなのかをたずめたす。

1.1. 簡易的なアプリケヌションのデプロむ

Azure OpenAI Service On Your Data を䜿うず、New Bing のような UX のチャット怜玢をナヌザヌ独自のデヌタを察象にしお行う簡易的な Web アプリケヌションをコヌドを曞かずに開発するこずができたす。䞋図の砎線で囲った郚分です。

これたでも、いわゆる Retrieval Augmented Generation (RAG) ずいうデザむンパタヌンに則ればナヌザヌ独自のデヌタに察するチャット怜玢を実珟するこずはできたしたが、やや耇雑な凊理を実装する必芁がありたした。この開発を省力化しおくれる点が On Your Data のブレむクスルヌのひず぀です。

なお、最終的に䜜られる簡易アプリケヌションの UX は以前から存圚しおいる公匏のサンプル実装ずほが同じです。

参考

[補足] Retrieval Augmented Generation (RAG) ずは

既に広く認識され始めおいたすが、生成系の倧芏暡蚀語モデル (LLM) はあくたでも Web 䞊の膚倧なテキストデヌタをもずに孊習を行い、次に来る可胜性の高い単語の予枬を繰り返すこずでそれらしいテキストを生成したす。そのため、(事実ずしお) 正しくない情報が出力されるハルシネヌションが起こり埗るこずに留意する必芁があり、LLM に察しお盎接知識を問うのはあたり適した䜿い方ではありたせん。

しかし、䞀方で LLM を情報怜玢に応甚したいずいうモチベヌションが少なからず存圚しおいるこずも事実で、最近はその解決策ずしお Retrieval Augmented Generation (RAG) ず呌ばれるデザむンパタヌンが䞀般的になり぀぀ありたす。RAG は䞀蚀で衚珟するずナレッゞベヌスの倖郚化で、RAG ではナヌザヌからの問いに察しお、バック゚ンドに眮いたナレッゞベヌス (e.g. Azure Cognitive Search) で怜玢を行い、その結果を螏たえおナヌザヌのからの問いかけに察する回答を生成したす。

ちなみに、このように LLM に根拠の情報 (e.g. 独自デヌタに察する怜玢、Web 怜玢、等) に基づかせお回答を行うこずをグラりンディング (Grounding) ず呌びたす。

RAG アプリケヌションのむメヌゞ

  1. RAG アプリは蚀語モデルを䜿っおナヌザヌからの自然蚀語による問いかけをナレッゞベヌスの怜玢キヌワヌドぞ倉換する。
  2. RAG アプリは怜玢キヌワヌドを䜿っおナレッゞベヌスに察しお怜玢を行う。
  3. ナレッゞベヌスは事前に䜜成しおおいた怜玢むンデックスによっお怜玢結果を返す。
  4. RAG アプリはナレッゞベヌスの怜玢結果 (匕甚情報) を参考にしお䜿っおナヌザヌぞの回答文を生成する。

ナヌザヌからのリク゚ストの䟋 (メッセヌゞ郚分のみ)

"messages": [
    {
        "role": "system",
        "content": "You are an AI assistant that helps people find information. You retrieve English documents, and you should read them carefully in English and answer in English."
    },
    {
        "role": "user",
        "content": "What is Microsoft Azrue?"
    }
]

RAG アプリからのレスポンスの䟋 (メッセヌゞ郚分のみ)

"messages": [
    {
      "index": 0,
      "role": "tool",
      "content": "{\"citations\": [{\"content\": \"The Azure Resource Manager, introduced in 2014, enables users to create groups of related services so that closely coupled resources can be deployed, managed, and monitored together.\\n_START_SECTION_\\nPrivacy\\n_START_PARAGRAPH_\\nMicrosoft has stated that, per the USA Patriot Act, the US government could have access to the data even if the hosted company is not American and the data resides outside the USA. However, Microsoft Azure is compliant with the E.U. Data Protection Directive (95/46/EC). To manage privacy and security-related concerns, Microsoft has created a Microsoft Azure Trust Center, and Microsoft Azure has several of its services compliant with several compliance programs including ISO 27001:2005 and HIPAA. A full and current listing can be found on the Microsoft Azure Trust Center Compliance page. Of special note, Microsoft Azure has been granted JAB Provisional Authority to Operate (P-ATO) from the U.S. government in accordance with guidelines spelled out under the Federal Risk and Authorization Management Program (FedRAMP), a U.S. government program that provides a standardized approach to security assessment, authorization, and continuous monitoring for cloud services used by the federal government.\\n_START_SECTION_\\nMeek-Azure\\n_START_PARAGRAPH_\\nThe Tor Project uses Microsoft Azure as a domain front in its obfuscation plugin, Meek. Meek-Azure is commonly used in China where Tor relays are regularly blocked and disabled. Meek-Azure became the last Meek after the banning of Amazon cloud services.\", \"id\": null, \"title\": \"_START_ARTICLE_\", \"filepath\": \"Q725967_Microsoft Azure.txt\", \"url\": \"https://xxx.blob.core.windows.net/wiki40ben-ms-articles/Q725967_Microsoft%20Azure.txt\", \"metadata\": {\"chunking\": \"orignal document size=330. Scores=6.4695673 and None.Org Highlight count=21.\"}, \"chunk_id\": \"0\"}, {\"content\": \"_START_ARTICLE_\\nMicrosoft Azure SQL Database\\n_START_SECTION_\\nDesign\\n_START_PARAGRAPH_\\nAzure SQL Database shares the SQL Server 2016 codebase. It is compatible with SQL Server 2014 and 2016 and most of the features available in SQL Server 2016 are available in Azure SQL Database. A list of incompatibilities is published by Microsoft.\", \"id\": null, \"title\": \"_START_ARTICLE_\", \"filepath\": \"Q1187310_Microsoft Azure SQL Database.txt\", \"url\": \"https://xxx.blob.core.windows.net/wiki40ben-ms-articles/Q1187310_Microsoft%20Azure%20SQL%20Database.txt\", \"metadata\": {\"chunking\": \"orignal document size=82. Scores=6.164525 and None.Org Highlight count=7.\"}, \"chunk_id\": \"0\"}, {\"content\": \"_START_ARTICLE_\\nMicrosoft Azure Web Sites\\n_START_SECTION_\\nImplementation\\n_START_PARAGRAPH_\\nMicrosoft Azure Web Sites is implemented as websites that are dynamically created on-demand on servers running Windows Server 2012 and IIS 8.0. When a client posts a request to a web site, Microsoft Azure Web Sites dynamically provisions the site on one of the Azure virtual machines pointing it at content stored in Azure Storage containers. The Azure Virtual Machines are deployed in groups called \\\"Stamps\\\", which may contain hundreds of such machines. Microsoft deploys these stamps in its Azure data centers across the world, and adds more stamps as demand grows.\\n_START_SECTION_\\nTiers\\n_START_PARAGRAPH_\\nAzure Web Sites services are offered in 4 tiers. The entry-level tier is the \\\"free\\\" tier. The free tier supports up to 10 websites with 1 GB of content storage, and is limited to 165 MB of daily data egress. The first for-pay tier is the \\\"Shared\\\" tier. Shared tier sites support custom domains and can be scaled out to up to 6 instances. The current highest for-pay tier is the \\\"Standard\\\" tier. Standard tier websites run on VMs dedicated exclusively to a single customer's websites. The Standard tier supports SSL (both SNI and IP-based), scaling out to up to 10 instances, and file storage of up to 50 GB of content._NEWLINE_Basic and Standard tier websites can be deployed on 3 sizes of virtual machines: Small VMs with 1 virtual CPU and 1.75GB of RAM, Medium VMs with 2 virtual CPUs and 3.5 GB of RAM, and Large VMs with 4 virtual CPUs and 7GB of available RAM.\\n_START_SECTION_\\nHistory\\n_START_PARAGRAPH_\\nMicrosoft initially offered a basic web hosting service as part of Office Live Small Business, which was launched in late 2007. Office Live Small Business offered customers free and commercial web hosting with a built-in system for creating websites based on build-in templates and a site creation wizard._NEWLINE_When Microsoft started allocating resources into developing its numerous cloud solutions, a group was formed in Microsoft Azure to develop Microsoft Azure Web Sites. Microsoft Azure Web Sites was announced in June 2012 as a preview release._NEWLINE_In parallel, Microsoft developed Microsoft Azure Pack, which offers the same technology that can be installed as a private-cloud on sets of servers at a customer's site and under direct customer control._NEWLINE_In mid-2013, both Microsoft Azure Web Sites and Microsoft Azure Pack were officially released to the public.\\n_START_SECTION_\\nDatacenters\\n_START_PARAGRAPH_\\nMicrosoft operates Microsoft Azure in a number of data centers throughout the world with Microsoft Azure Web Sites available in a subset of these. When deploying websites on Microsoft Azure Web Sites customers can choose to deploy sites in a data center in any of the following geographical regions: East US, North central US, West US, East Asia, Brazil South, North Europe, West Europe, Japan East, Japan West or East Asia.\", \"id\": null, \"title\": \"_START_ARTICLE_\", \"filepath\": \"Q17048728_Microsoft Azure Web Sites.txt\", \"url\": \"https://xxx.blob.core.windows.net/wiki40ben-ms-articles/Q17048728_Microsoft%20Azure%20Web%20Sites.txt\", \"metadata\": {\"chunking\": \"orignal document size=660. Scores=5.822534 and None.Org Highlight count=39.\"}, \"chunk_id\": \"0\"}, {\"content\": \"_START_ARTICLE_\\nMicrosoft Azure Dev Tools for Teaching\\n_START_SECTION_\\nHistory\\n_START_PARAGRAPH_\\nAll Student get access to Cloud resources and Azure credit student must register at the Microsoft Azure for Student and verify their identity through their verified educational institutions. If an institution is not listed on the available list, the user may manually verify their student status by uploading a proof such as an ID card._NEWLINE_The Microsoft student developer tools programme was announced by Bill Gates as DreamSpark on February 20, 2008 during a speech at Stanford University. It is estimated that up to 35 million students will be able to access these software titles through this program. The service was renamed to Microsoft Imagine on September 7, 2016, to better align with the annual Imagine Cup competition hosted by Microsoft. and renamed to Azure Dev Tools for Teaching and Azure for Students in June 2018\\n_START_SECTION_\\nRepacked as Azure Dev Tools for Teaching\\n_START_PARAGRAPH_\\nThe Microsoft Azure Dev Tools for Teaching on 13 February 2019 with Cloud services for students using the Microsoft Azure cloud and incorporating Microsoft Learn online learning resources.\\n_START_SECTION_\\nVerification\\n_START_PARAGRAPH_\\nProof of student status is required to download software and obtain product keys. Students can verify their identity using ISIC cards, access codes ordered by school administrators, or .edu academic email addresses. Students remain verified for 12 months afterwards and can renew after the 12 month period using their academic email. If students can't find their school, they can manually submit a response with a proof of student status.\\n_START_SECTION_\\nProducts offered\\n_START_PARAGRAPH_\\nSeveral development software titles are available for download through the program. They include:\", \"id\": null, \"title\": \"_START_ARTICLE_\", \"filepath\": \"Q909738_Microsoft Azure Dev Tools for Teaching.txt\", \"url\": \"https://xxx.blob.core.windows.net/wiki40ben-ms-articles/Q909738_Microsoft%20Azure%20Dev%20Tools%20for%20Teaching.txt\", \"metadata\": {\"chunking\": \"orignal document size=380. Scores=5.5316896 and None.Org Highlight count=19.\"}, \"chunk_id\": \"0\"}, {\"content\": \"_START_ARTICLE_\\nMicrosoft Azure\\n_START_SECTION_\\nServices\\n_START_PARAGRAPH_\\nMicrosoft lists over 600 Azure services, of which some are covered below:\\n_START_SECTION_\\nMedia services\\n_START_PARAGRAPH_\\nA PaaS offering that can be used for encoding, content protection, streaming, or analytics.\\n_START_SECTION_\\nCDN\\n_START_PARAGRAPH_\\nA global content delivery network (CDN) for audio, video, applications, images, and other static files. It can be used to cache static assets of websites geographically closer to users to increase performance. The network can be managed by a REST based HTTP API._NEWLINE_Azure has 54 point of presence locations worldwide (also known as Edge locations) as of August 2018.\\n_START_SECTION_\\nAzure Blockchain Workbench\\n_START_PARAGRAPH_\\nThrough Azure Blockchain Workbench, Microsoft is providing the required infrastructure to setup a consortium network in multiple topologies using a variety of consensus mechanisms. Microsoft provides integration from these blockchain platforms to other Microsoft services to streamline development of distributed applications. Microsoft supports many general-purpose blockchains including Ethereum and Hyperledger Fabric and purpose-built blockchains like Corda.\\n_START_SECTION_\\nFunctions\\n_START_PARAGRAPH_\\nAzure functions are used in serverless computing architectures where subscribers can execute code as a Function-as-a-Service (FaaS) without managing the underlying server resources.\\n_START_SECTION_\\nRegional expansion and examples\\n_START_PARAGRAPH_\\nAzure is generally available in 54 regions around the world. Microsoft has announced an additional 12 regions to be opened soon (as of October 2018). Microsoft is the first hyper-scale cloud provider that has committed to building facilities on the continent of Africa with two regions located in South Africa. An Azure geography contains multiple Azure Regions, such as example \\u201cNorth Europe\\u201d (Dublin, Ireland), \\u201cWest Europe\\u201d (Amsterdam, Netherlands). Where a location represents the city or area of the Azure Region. Each Azure Region is paired with another region within the same geography; this makes them a regional pair. In this example, Amsterdam and Dublin are the locations which form the regional-pair._NEWLINE_Microsoft has some Gold partners available across the globe to sell its products. In August 2018, Toyota Tsusho began a partnership with Microsoft to create fish farming tools using the Microsoft Azure application suite for IoT technologies related to water management. Developed in part by researchers from Kindai University, the water pump mechanisms use artificial intelligence to count the number of fish on a conveyor belt, analyze the number of fish, and deduce the effectiveness of water flow from the data the fish provide. The specific computer programs used in the process fall under the Azure Machine Learning and the Azure IoT Hub platforms.\\n_START_SECTION_\\nDesign\\n_START_PARAGRAPH_\\nMicrosoft Azure uses a specialized operating system, called Microsoft Azure, to run its \\\"fabric layer\\\": A cluster hosted at Microsoft's data centers that manages computing and storage resources of the computers and provisions the resources (or a subset of them) to applications running on top of Microsoft Azure. Microsoft Azure has been described as a \\\"cloud layer\\\" on top of a number of Windows Server systems, which use Windows Server 2008 and a customized version of Hyper-V, known as the Microsoft Azure Hypervisor to provide virtualization of services._NEWLINE_Scaling and reliability are controlled by the Microsoft Azure Fabric Controller, which ensures the services and environment do not fail if one or more of the servers fails within the Microsoft data center, and which also provides the management of the user's Web application such as memory allocation and load balancing._NEWLINE_Azure provides an API built on REST, HTTP, and XML that allows a developer to interact with the services provided by Microsoft Azure. Microsoft also provides a client-side managed class library that encapsulates the functions of interacting with the services. It also integrates with Microsoft Visual Studio, Git, and Eclipse._NEWLINE_In addition to interacting with services via API, users can manage Azure services using the Web-based Azure Portal, which reached General Availability in December 2015. The portal allows users to browse active resources, modify settings, launch new resources, and view basic monitoring data from active virtual machines and services.\\n_START_SECTION_\\nDeployment models\\n_START_PARAGRAPH_\\nMicrosoft Azure offers two deployment models for cloud resources: the \\\"classic\\\" deployment model and the Azure Resource Manager. In the classic model, each Azure resource (virtual machine, SQL database, etc.) was managed individually\", \"id\": null, \"title\": \"_START_ARTICLE_\", \"filepath\": \"Q725967_Microsoft Azure.txt\", \"url\": \"https://xxx.blob.core.windows.net/wiki40ben-ms-articles/Q725967_Microsoft%20Azure.txt\", \"metadata\": {\"chunking\": \"orignal document size=1005. Scores=5.380728 and None.Org Highlight count=50.\"}, \"chunk_id\": \"1\"}], \"intent\": \"What is Microsoft Azrue?\"}",
      "end_turn": false
    },
    {
      "index": 1,
      "role": "assistant",
      "content": "Microsoft Azure is a cloud computing platform developed by Microsoft that allows individuals and businesses to build, deploy, and manage applications and services in the cloud [doc1]. It provides a wide range of services and tools for building, deploying, and managing applications and services, including virtual machines, web applications, databases, storage, networking, analytics, and more [doc5].",
      "end_turn": true
    }
  ]

参考

1.2. グラりンディング察象ナレッゞベヌスの切り替え

REST API でのリク゚スト時に最新のプレビュヌ版 API Version である 2023-06-01-preview を指定したうえで dataSources パラメヌタを䞎えるこずで、グラりンディング察象のナレッゞベヌスを指定するこずができたす。これにより、リク゚ストのたびに「今回はこっちのナレッゞベヌスでグラりンディングしお」ずいった颚にナレッゞベヌスを切り替えるこずができるようになりたす。
個人的には、前述の簡易アプリケヌションの開発よりも倧きなブレむクスルヌだず感じおいたす。

ナレッゞベヌス切り替えのむメヌゞ

リク゚ストのフォヌマット

リク゚ストのフォヌマットは以䞋のようになりたす。このようにしお、グラりンディング察象のナレッゞベヌス (具䜓的には Azure Cognitive Search むンデックス) を指定するこずができたす。

  • <your-aoai-resource-name>: Azrue OpenAI Service のリ゜ヌス名
  • <your-deployment-name>: 察象のデプロむ名 (Chat Completions が可胜なモデルのうち gpt-35-turbo もしくは gpt-4 を指定する)
  • <your-aoai-key>: Azure OpenAI Service のキヌ
  • <target-cognitive-search-resource-name>: グラりンディング察象の Azure Cognitive Search のリ゜ヌス名
  • <target-cognitive-search-key>: グラりンディング察象の Azure Cognitive Search のキヌ
  • <target-cognitive-search-index-name>: グラりンディング察象の Azure Cognitive Search むンデックス名
POST https://<your-aoai-resource-name>/openai/deployments/<your-deployment-name>/extensions/chat/completions?api-version=2023-06-01-preview
Content-Type: application/json
api-key: <your-aoai-key>
chatgpt_url: https://<your-aoai-resource-name>/openai/deployments/<your-deployment-name>/chat/completions?api-version=2023-06-01-preview
chatgpt_key: <your-aoai-key>

{
    "dataSources": [
        {
            "type": "AzureCognitiveSearch",
            "parameters": {
                "endpoint": "https://<target-cognitive-search-resource-name>.search.windows.net",
                "key": "<target-cognitive-search-key>",
                "indexName": "<target-cognitive-search-index-name>"
            }
        }
    ],
    "messages": [
        {
            "role": "system",
            "content": "You are an AI assistant that helps people find information. You retrieve English documents, and you should read them carefully in English and answer in English."
        },
        {
            "role": "user",
            "content": "What is Microsoft Azrue?"
        }
    ]
}

参考

2. 気を付けるべきポむント

これ以降では気を付けるべきポむントに぀いおたずめたす。

2.1. 察応モデル

On Your Data は以䞋のモデルで利甚可胜です。

  • gpt-35-turbo
  • gpt-35-turbo-16k
  • gpt-4
  • gpt-4-32k

䟋えば gpt-35-turbo の最倧トヌクンは 4,096 (日本語の堎合 箄 3,700 文字皋床) ですので、システムメッセヌゞ、ナヌザヌのプロンプト、ナレッゞベヌスからの怜玢結果、ナヌザヌぞの回答 すべおがこの最倧トヌクンに収たるようなプロンプト蚭蚈ず、ナレッゞベヌスの敎備 (短いチャンクに有益な情報が詰たっおいるデヌタの敎備) が必芁になりたす。

参考

2.2. 日本語

2.2.1. アナラむザヌの蚀語

On Your Data には 3 通りのナレッゞベヌス指定方法がありたす。

  1. 既存の Azure Cognitive Search むンデックスを指定 (ナヌザヌ任意のむンデックスを䜜成)
  2. デヌタが栌玍された Azure Blob コンテナヌを指定 (むンデックス自動䜜成)
  3. Azure Blob コンテナヌにファむルをアップロヌド (むンデックス自動䜜成)

このいずれの遞択肢を取った堎合も、最終的な構成はほが同じになりたすが、泚意点ずしおは、2 ず 3 を遞択した堎合に Azure Cognitive Search のむンデックスが自動䜜成され、アナラむザヌの蚀語が英語固定である点です。怜玢察象が英語であれば特に問題ありたせんが、日本語の文曞を怜玢察象ずしたい堎合はむンデックス䜜成時の字句解析が正しく行われず、目的の文曞を䞊手く怜玢できなくなっおしたいたす。

1. 既存のむンデックスを指定

2. Blob ストレヌゞを指定 / 3. ファむルアップロヌド

よっお、必然的に日本語を怜玢察象にしたい堎合は 1 が唯䞀の遞択肢ずなりたす。 Azure Cognitive Search のクラむアントラむブラリ や API の扱いに慣れおいるようであれば日本語アナラむザヌを指定したむンデックスを自分で䜜成したす。そうでない堎合は、英語以倖のアナラむザヌを䜿っおむンデックスを䜜成するためのツヌルが公匏サンプルずしお公開されおいたすので、それを䜿っおむンデックスを䜜成したす。このツヌルを䜿うず、ナレッゞベヌスずしおむンデックスを指定する際に求められるフィヌルド を党お䜜成しおくれたす。

参考

2.2.2. システムメッセヌゞ

日本語のナレッゞベヌスを察象に日本語のプロンプトで怜玢を行う堎合、皀に回答が英語 (OpenAI の蚀語モデルの第䞀蚀語) になっおしたうこずがありたす。この問題に察しおは、䞋蚘のようなシステムメッセヌゞを远加しお明確に日本語で回答するよう指瀺するこずで䜎枛できたす。

あなたは、情報の怜玢を支揎する AI アシスタントです。 日本語のドキュメントを取埗し、それを日本語で泚意深く読み、日本語で回答する必芁がありたす。

参考

2.2.3. Azure Cognitive Search のセマンティック怜玢

Azure Cognitive Search のセマンティック怜玢は、Azure Cognitive Search の怜玢品質を䞊げるこずができるプレビュヌ䞭の機胜です。察象蚀語が英語の堎合は On Your Data ず共に䜿うこずができたすが、執筆時点で英語以倖の蚀語には察応しおいないため、日本語環境では䜿甚できないこずに泚意が必芁です。

参考

2.3. むンデックス䜜成凊理の再実行

前述の 3 通りのナレッゞベヌス指定方法のうち、むンデックスが自動䜜成される 2 ず 3 では むンデクサヌが䜜成されず、むンデックスの再䜜成が行えたせん。そのため、ナレッゞベヌスが曎新されおいくような状況 (通垞倚くのナヌスケヌスがこれに該圓するず思われる) では、1 が唯䞀の遞択肢になるず思われたす。

  1. 既存の Azure Cognitive Search むンデックスを指定 (ナヌザヌ任意のむンデックスを䜜成)
  2. デヌタが栌玍された Azure Blob コンテナヌを指定 (むンデックス自動䜜成)
  3. Azure Blob コンテナヌにファむルをアップロヌド (むンデックス自動䜜成)

むンデックス再䜜成の方法は䞋蚘の 2 通りが考えらえたす。

  • むンデクサヌの再実行
  • Azure Cognitive Search のクラむアントラむブラリで実装した凊理で再䜜成 (任意のゞョブスケゞュヌラヌで実行)

【远蚘】 2. に限り、2023 幎 8 月のアップデヌトでむンデックスの自動曎新機胜が远加されたした。

参考

2.4. チャンキングの重芁性

チャット怜玢においお良い怜玢結果を埗るためには、ドキュメントの質の高いチャンク (分割) を䜜れるかどうかが肝になりたす。(䞋図)

前述のずおり、珟時点で日本語環境を想定する堎合「既存の Azure Cognitive Search むンデックスを指定」が事実䞊唯䞀の遞択肢ずなりたす。この遞択肢を取る堎合のチャンキングの方法・タむミングは䞋蚘 2 通りが考えられたす。どちらの遞択肢を取るかどうかは、プロゞェクトの責任分界点、再䜜成の頻床、開発者のお奜み等により決るず思われたす。(ケヌスバむケヌス)

  1. 任意のチャンキング凊理を独立しお行う。チャンキングした埌に Blob コンテナヌに栌玍。その埌、むンデクサヌによりむンデックスを䜜成。
  2. 同時に行う。LangChain 等のラむブラリを䜿っお任意のチャンキングを行い぀぀ Azure Cognitive Search のクラむアントラむブラリ によっおむンデックスを䜜成。

なお、チャンキングのみに泚目しおも、ざっず䞋蚘のようなパラメヌタヌが存圚しおおり、これらは党お怜玢クオリティの向䞊を目指す際の詊行錯誀の芁玠ずなりたす。

  • 単玔にぶ぀切りするのか or オヌバヌラップさせるのか
  • チャンクの長さはどうするのか
  • オヌバヌラップの長さはどうするのか
  • チャンクは文字数で芋るのか or トヌクン数で芋るのか
  • etc

参考

2.5. Private Endpoint のサポヌト

既存の Azure Cognitive Search むンデックスを指定するパタヌンに぀いおは、Azure Cognitive Search から On Your Data に察する Private Endpoint を䜜成できる機胜が登録制で公開されたした。
ただし、Blob ストレヌゞを指定 ず ファむルアップロヌド のパタヌンにはただ察応しおいたせん。

Storage accounts in private networks are currently not supported by Azure OpenAI on your data.

参考

おわりに

アナラむザヌの蚀語指定などサヌビスの成熟に䌎う今埌の機胜远加に期埅する郚分もありたすが、結局のずころしっかり䜿い物になる仕組みを䜜るためには、足元の地道なデヌタ敎備が最も近道ずなりそうです。
たた、チャット怜玢で思い通りの怜玢結果が埗られない堎合は、そもそもチャット怜玢である必芁があるかず問い盎しお、Azure Cognitive Search のみを䜿った埓来の情報怜玢からスモヌルスタヌトするなど柔軟に察応をする必芁があるず思いたす。

以䞊です。🍵

Microsoft (有志)

Discussion