前提条件の手順を完了したら、この記事の手順を実行して Edge RAG 拡張機能をデプロイします。
ローカル ハードウェアを必要とせずに Edge RAG を試すには、「 クイック スタート: Azure Arc で有効になっている Edge RAG プレビューをインストールする」を参照してください。
Von Bedeutung
Azure Arc により有効化された Edge RAG は、現在プレビュー段階です。
ベータ版、プレビュー版、または一般提供としてまだリリースされていない Azure の機能に適用される法律条項については、「Microsoft Azure プレビューの追加使用条件」を参照してください。
[前提条件]
開始する前 に、Edge RAG プレビューの展開の前提条件を完了してください。
拡張機能のデプロイ
Microsoft が提供する言語モデルで Azure portal または Azure CLI を使用して Edge RAG をデプロイするか、独自の言語モデルを追加します。
Azure portal で、Azure Local 上の Azure Kubernetes クラスターに移動します。
[設定]、>、+ 追加、そして一覧から>を選択します。
[基本] タブで次の情報を指定します。
| フィールド |
価値 |
| サブスクリプション |
Azure Local 上の Azure Kubernetes Service (AKS) クラスターを含むサブスクリプションを選択します。 |
| リソースグループ |
AKS Arc クラスターを含むリソース グループを選択します。 |
| デプロイ名 |
デプロイの一意な名前を指定します。 |
| リージョン |
Edge RAG をデプロイするリージョンを選択します。 |
| クラスター |
Edge RAG をデプロイするクラスターを選択します。 |
「Next: 構成」を選択します。
[構成] タブで、次の情報を指定します。
| フィールド |
価値 |
| 展開モード |
使用可能なハードウェアに応じて、GPU モードまたは CPU モードを選択します。 |
|
モデル |
このセクションで入力する情報は、選択した言語モデルによって異なります。 |
| 言語モデル |
デプロイする言語モデルを選択します。 Microsoft が提供する言語モデルまたは独自の言語モデルを選択します。 |
| Microsoft 言語モデル |
Microsoft 提供を選択した場合は、Microsoft が提供する言語モデルのいずれかを選択します。 |
|
独自の言語モデルを追加する |
独自の言語モデルを提供することを選択した場合は、次の情報を入力します。 |
| モデル名 |
言語モデルの名前を入力します。 |
| LLM エンドポイント |
http://some-endpointまたはhttps://some-endpointの形式で、大規模言語モデル (LLM) エンドポイントの名前を入力します。 たとえば、https://<Endpoint_Name>.openai.azure.com/openai/deployments/<model_name> /chat/completions?api-version=<API_VERSION> のようにします。 |
| 最大トークン (k) |
言語モデルの 4K から 2048 K までの数値範囲を入力します。 |
|
SSL 設定 |
|
| SSL CNAME |
システムのドメイン名を指定します。 このドメイン名は、アプリの登録時に指定されたリダイレクト URI と同じです。 |
| Kubernetes SSL シークレット名 |
アプリケーションで使用する SSL シークレットのフレンドリ名を指定します。 既定では、Edge RAG は自己署名 SSL 証明書を使用して、この名前で kubernetes シークレット ストアに格納します。 インストール後、公式の署名付き証明書を使用して証明書を更新できます。 |
|
アクセス |
|
| Entra アプリ ID |
認証の構成の一環として登録したアプリのアプリケーション ID を指定します (アプリの登録 > アプリ > 概要)。 |
| エントラ テナント ID |
認証の構成の一環として登録したアプリからテナント ID を指定します (アプリの登録 > アプリ > 概要)。 |
[ 次へ: 確認と作成] を選択します。
指定したパラメーターを確認して検証します。
[ 作成] を選択して、Edge RAG のデプロイを完了します。
デプロイが完了したら、[ 拡張機能] で、拡張機能の種類 microsoft.arc.rag と microsoft.extensiondiagnostics が一覧表示されていることを確認します。
次のコマンドでパラメーターの値を設定し、コマンドを実行します。
$gpu_enabled = "true" # Mark it true if you have GPUs available for Edge RAG
$localextname = "edgeragdemo" # Once used do not change
$autoUpgrade = "false"
$tenantId = "<App Tenant ID>" # App registrations -> Your app -> Overview on Azure portal
$appId = "<App ID>" # App registrations -> Your app -> Overview on Azure portal
$domainName = "arcrag.contoso.com" # App redirect URI and this ___domain name should be the same
$sub = "<Subscription GUID>"
$rg = "<Resource Group name>"
$k8scluster = "<Azure Kubernetes Service (ASK) Arc cluster name>"
$extension = "microsoft.arc.rag" # do not change
$n = "arc-rag" # do not change
Microsoft が提供する言語モデルまたは独自の言語モデルに必要な値を設定します。
Microsoft 提供の言語モデル オプション: 必要に応じて次のコマンドを編集し、コマンドを実行します。
$modelName = "microsoft/Phi-3.5" # If you want to switch to Mistral 7B, change this variable to "mistralAI/Mistral-7B"
独自の言語モデル オプションを使用する: 必要に応じて次のコマンドを編集し、コマンドを実行します。
$apiEndpoint = <Endpoint URI>
$apiModel = <Model Name>
$maxTokensInK = <Max Tokens In K (e.g. 10, 20 etc.)>
パラメーター値を設定した後、Microsoft が提供する言語モデルまたは独自の言語モデルのコマンドを実行して、Azure Arc 拡張機能をデプロイします。
Microsoft 提供の言語モデル オプション: 次のコマンドを実行します。
az provider register --namespace Microsoft.KubernetesConfiguration
az feature register --namespace Microsoft.KubernetesConfiguration --name extensions
az k8s-extension create --cluster-type connectedClusters --cluster-name $k8scluster --resource-group $rg --name $localextname --extension-type $extension --debug --release-train preview --auto-upgrade $autoUpgrade `
--configuration-settings isManagedIdentityRequired=true --configuration-settings gpu_enabled=$gpu_enabled --configuration-settings AgentOperationTimeoutInMinutes=30 `
--configuration-settings model=$modelName --configuration-settings auth.tenantId=$tenantId --configuration-settings auth.clientId=$appId --configuration-settings ingress.domainname=$domainName
独自の言語モデル オプションを追加する: 次のコマンドを実行します。
az k8s-extension create --cluster-type connectedClusters --cluster-name $k8scluster --resource-group $rg --name $localextname --extension-type $extension --debug --release-train preview --auto-upgrade $autoUpgrade `
--configuration-settings isManagedIdentityRequired=true --configuration-settings gpu_enabled=$gpu_enabled --configuration-settings AgentOperationTimeoutInMinutes=30 `
--configuration-settings auth.tenantId=$tenantId --configuration-settings auth.clientId=$appId --configuration-settings ingress.domainname=$domainName `
--configuration-settings byom.enabled="true" --configuration-settings byom.apiEndpoint=$apiEndpoint --configuration-settings byom.apiModel=$apiModel --configuration-settings byom.maxTokensInK=$maxTokensInK
Edge RAG 拡張機能のデプロイには通常約 30 分かかりますが、接続によっては時間がかかる場合があります。
独自の言語モデルを追加する
Edge RAG 拡張機能のデプロイ時に独自の言語モデルを追加した場合は、「 Edge RAG の "BYOM" エンドポイント認証を構成する」の手順を完了します。
関連コンテンツ