メインコンテンツまでスキップ

· 約23分
ks6088ts

本記事では Azure 上で RAG アプリを開発するにあたり、必要となる関連リソースとして Azure OpenAI Service, Azure AI Search, Bing Search のベーシックな機能を確認します。実際に、Bing Search API や Azure AI Search と連携した小規模な RAG アプリの作成も行います。

本記事で掲載している Python スクリプトは、以下のリポジトリに配置しています。 https://github.com/ks6088ts-labs/recipes/python/handson_rag_apps

· 約5分
ks6088ts

本記事では以下の 2 つのシナリオをハンズオン形式で説明します。

  1. AOAI にプライベートエンドポイントから接続する方法
  2. VM のマネージド ID を利用して API Key 無しで AOAI を呼び出す方法

· 約16分
ks6088ts

Azure OpenAI Service を用いた Function Calling を理解するためのハンズオンを行いました。初見では何をしているのかよくわからなかったこともあったので、自分が理解していった過程をまとめておいて後続の誰かに役に立てばと思い足跡を残しておきます。

OpenAI 回りのエコシステムは急速に発展していて、 Function Calling の feature 自体は OpenAI 社が機能を公開してからしばらく経っているため既にライブラリ側でのサポートが入っています。実際のアプリ開発では LangChain, Semantic Kernel, OpenAI などのライブラリを利用してアプリを開発することが多いと思うので、それらのライブラリを利用した場合の実装例も併せて紹介します。

· 約15分
ks6088ts

Azure OpenAI Service を利用した ChatGPT お試し環境の構築 では、ChatGPT を体験する環境を簡単に構築する方法をご紹介しました。

既にご利用いただけたユーザーからのフィードバックとして、「実際の利用ログなどを確認したい」というご要望をいただきました。

本記事では Azure マネージドサービスを利用してコーディングせずに利用ログを収集する方法を紹介します。

· 約12分
ks6088ts

Azure OpenAI Service を利用した ChatGPT の試用環境を作成してみました。
ChatGPT を体験する環境としては、既に OpenAI でも Azure OpenAI Service でも使い勝手のいいウェブアプリがあり、ブラウザとアカウントさえあればすぐに試せます。

個人的なお試しという観点ですとこれらのウェブアプリを利用するだけで十分ですが、
業務への適用を視野に入れて、広く組織内で試用するユースケースを考えると様々な課題が出てきます。

例えば、シンプルに API Token を払い出してそのまま使う方法ですと、万が一 API Token が漏洩した場合に不正利用を防ぐことができません。また、ユーザーを組織内のメンバーに限定したい場合、何らかの方法で認証する必要がでてきます。これらの課題に対してゼロから取り組むと、本来の目的である ChatGPT の試用に割く時間が減ってしまいます。

そこで、本記事では業務上の PoC 利用を見据え、Azure OpenAI Service を使った OpenAI API の試用環境の構築方法をサンプルコード付きで紹介します。

· 約8分
ks6088ts

We have created a trial environment for ChatGPT using Azure OpenAI Service.
Both OpenAI and Azure OpenAI Service already have easy-to-use web apps for experiencing ChatGPT, and all you need is a browser and an account to try it out.

From the perspective of a personal trial, just using these web applications is sufficient.
However, when considering the use case of trial use within a wide range of organizations with a view to business application, various issues arise.

For example, if you simply obtain an API Token and use it in a direct way, you cannot prevent unauthorized use when the API Token is leaked. Also, if you want to limit users to members of your organization, you will need to authenticate them in some way. If you tackle these issues from scratch, you will have less time to spend on the trial of ChatGPT, which is the original purpose of this project.

Therefore, this article introduces how to build a trial environment for OpenAI API using Azure OpenAI Service with sample code, with a view to using OpenAI API for business PoC.