Skip to content

アプリケーション内で をクリックすると、お使いのDataRobotバージョンに関する全プラットフォームドキュメントにアクセスできます。

チャット生成Q&Aアプリケーションの作成

プレミアム機能

チャット生成Q&Aアプリケーションは、GenAIのプレミアム機能です。 この機能を有効にするには、DataRobotの担当者にお問い合わせください。

DataRobotでチャット生成のQ&Aアプリケーションを作成し、ナレッジベースのQ&Aユースケースを探索しながら、生成AIを活用してビジネス上の意思決定を繰り返し行い、ビジネス価値を示すことができます。 Q&Aアプリは、構築したLLMモデルの結果をプロトタイプ化、調査、および共有するための直感的で応答性に優れた方法を提供します。 Q&Aアプリは、生成AIの会話を引用で強化し、回答に関するフィードバックを提供できるようにします。 さらに、DataRobot以外のユーザーとアプリを共有して、使いやすさを広めることもできます。

テキスト生成デプロイの準備

チャット生成Q&Aアプリケーションを構築するには、最初にデプロイを準備して設定する必要があります。 テキスト生成ターゲットタイプでデプロイを作成する必要があります。

備考

Q&Aアプリの LLMをデプロイする場合は、アプリの回答に引用を提供するために、Q&Aアプリ機能を有効にした でプレイグラウンドLLMをモデルワークショップに追加してください。

デプロイを作成した後、Q&Aアプリの回答のフィードバックを収集するために外部カスタム指標を設定することができます。

  1. コンソール > デプロイページから、デプロイにアクセスします。 デプロイを選択し、モニタリング > カスタム指標タブに移動します。

  2. 新しいカスタム指標を追加をクリックして、ドロップダウンから外部カスタム指標を追加を選択します。

  3. 以下のスクリーンショットに示すようにフィードバック指標を設定します。 設定が終了したら、カスタム指標を追加をクリックします。

  4. さらに、送信されたフィードバックを(カスタム指標を介して)関連付けられたプロンプトおよび回答データと共に保存するために、デプロイの 関連付けIDを設定します。 関連付けIDがない場合、フィードバックカスタム指標では、時刻値で集計された回答のみを保存できます。

  5. 適切なカスタム指標でデプロイを設定した後、デプロイIDとカスタム指標IDをメモします。 これらは、チャット生成Q&Aアプリケーションの構築に使用されます。 カスタム指標IDを見つけるには、デプロイの設定されたカスタム指標のアクションメニュー を選択して編集をクリックします。 ダイアログボックスに指標IDが一覧表示されます。

チャット生成Q&Aアプリケーションの構築

チャット生成Q&Aアプリを構築するには、次の手順に従います。

  1. In the Registry, click the Applications page, and then click Add new application source > Create new application from template gallery in the top-right corner of the page.

  2. From the template gallery, select the Q&A Chat Generation App template, and then click Create application source.

  3. On the application source page, scroll down to the Runtime Parameters section and edit the CUSTOM_METRIC_ID and DEPLOYMENT ID parameters by clicking the pencil icon. Provide the custom metric ID and the deployment ID from the text generation deployment configured previously.

  4. デプロイとカスタム指標IDを指定した後、アプリケーションを構築をクリックします。 すべてのアプリケーションリストにアプリケーションが初期化中ステータスで追加されます。 構築した後、開くをクリックしてアプリケーションを表示して使用できます。

    備考

    アプリケーションタブのカスタムアプリケーションの横にあるアクションメニュー をクリックして、アプリケーションを共有または削除できます。

チャット生成Q&Aアプリケーションの使用

チャット生成Q&Aアプリケーションの使用を開始するには、レジストリに移動し、アプリケーション > すべてのアプリケーションリストでQAアプリを見つけて、開くをクリックします。

備考

Q&Aアプリケーションがロードに失敗した場合、または開くボタンに警告アイコンが表示された場合は、アプリケーションソースのログを確認して、動作のトラブルシューティングを行ってください。 アプリが他のユーザーと共有されている場合、他のユーザーのログにエラーが保存されることがあります。

Q&Aアプリケーションがロードされたら、チャットを開始するよう求めるプロンプトが表示されます。 アプリが実行され、少し時間が経ってからプロンプトに回答が返されます。

The app will respond with an answer, accompanied by the response's latency and confidence scores. プロンプトの回答のサムネイルで上または下を選択することで、アプリケーションのフィードバックを提供できます。 (For feedback, you must have configured a custom metric for collecting prompt response feedback.)

さらに、引用をクリックすると、アプリケーションがプロンプトに対する回答を検出するソースの詳細を示すダイアログボックスが表示されます。

チャット生成Q&Aアプリケーションの管理

You can use a code-first workflow to manage the chat generation Q&A application. フローにアクセスするには、DataRobotのGitHubリポジトリに移動します。 このリポジトリには、アプリケーションコンポーネントのための変更可能なテンプレートが含まれています。 These components include multiple Streamlit settings. Review an overview of the template's contents below.

ファイル 説明
qa_chat_bot.py The main app function, which includes all other necessary files. Here you can modify the basic page configuration (title, favicon, width) and add any additional elements such as sidebar or links to additional subpages.
constants.py All translatable strings for application and user configuration: display name, app logo, sidebar settings, etc.
components.py The render functions for both customized and default Streamlit elements used within the app.
dr_requests.py The DataRobot API request functions.
styles/main.scss A SASS stylesheet that is compiled to CSS on app start and is used to customize Streamlit-native components via SAL. You can compile it manually by running streamlit-sal compile.
styles/variables.scss The styles used to modify various CSS variables such as colors or borders.
.streamlit/config.toml The Streamlit configuration file. Under [theme] you can define your own app colors. Note that a full app restart is necessary for the values to take effect.

To work with the repo, clone it and then continue to develop your version of the app by modifying the files above. You can release the modified application via the DRApps CLI or by uploading it via the Applications page.


更新しました January 3, 2025