Skip to content

On-premise users: click in-app to access the full platform documentation for your version of DataRobot.

Create a chat generation Q&A application

Availability information

The chat generation Q&A application is a premium GenAI feature. To enable, contact your DataRobot representative.

You can create a chat generation Q&A application with DataRobot to explore knowledge base Q&A use cases while leveraging Generative AI to repeatedly make business decisions and showcase business value. The Q&A app offers an intuitive and responsive way to prototype, explore, and share the results of LLM models you've built. The Q&A app powers generative AI conversations backed by citations and allows you to provide feedback on responses. Additionally, you can share the app with non-DataRobot users to expand its usability.

Prepare a text generation deployment

To build a chat generation Q&A application, you must first prepare and configure a deployment. You need to create a deployment with a text generation target type.

Note

When you deploy an LLM for a Q&A app, ensure that you add the playground LLM to the Model workshop after enabling the Q&A app feature to provide citations for responses in the app.

Once you have created the deployment, you have the option to configure an external custom metric to collect feedback for the Q&A app's responses:

  1. Access the deployment from the Console > Deployments page. Select the deployment and navigate to the Monitoring > Custom metrics tab.

  2. Click Add new custom metric and select Add an external custom metric from the dropdown.

  3. Configure the feedback metric as displayed in the screenshot below. When you have finished configuration, click Add custom metric.

  4. Additionally, set up an association ID for the deployment in order to store submitted feedback (via the custom metric) with the associated prompt and response data. Without an association ID, the feedback custom metric is only able to store responses aggregated by time values.

  5. After configuring the deployment with the appropriate custom metrics, note the deployment ID and custom metric ID. They are be used to build the chat generation Q&A application. To locate the custom metric ID, select the menu icon on the configured custom metric in the deployment and click Edit. The dialog box lists the metric ID.

Build a chat generation Q&A application

To build a chat generation Q&A app, use the following steps:

  1. In the Registry, navigate to the Applications page and click Add > Create Chat generation Q&A template.

  2. Select the text generation deployment configured previously, and provide the custom metric ID for the feedback metric.

  3. After specifying a deployment and custom metric ID, click Create app. The application is added to the All applications list with the Initializing status. After it builds, you can click Open to view and use the application.

    Note

    You can click the action menu next to a custom application in the Applications tab to Share or Delete the application.

Use the chat generation Q&A application

To begin using the chat generation Q&A application, go to the Registry, locate your QA app in the Applications > All applications list, then click Open.

Note

If your Q&A application fails to load or displays a warning icon on the Open button, review the application source's logs to troubleshoot the behavior. If the app is shared with other users, the error may be stored in their logs.

When the Q&A application loads, provide a prompt to initiate a chat. Allow some time for the app to run and return an answer to the prompt.

The app will respond with an answer. You can provide feedback for an application by selecting thumbs up or down for a prompt's response. Additionally, click Citations to view a dialog box that details the source(s) from which the application finds its answer to the prompt.

Manage the chat generation Q&A application

You can manage multiple Streamlit settings for the chat generation Q&A application. To access the settings, after opening the application, click the action menu in the top right corner.

Setting Description
Rerun Manually trigger a rerun of the app. This rerun will not reset your session.
Settings From the Settings option, you can control the appearance of your app while it is running. If viewing the app locally, you can set how the app responds to changes in your source code. You can also force your app to appear in wide mode.
Theme Choose between a light, dark, or custom theme for the application.
Print Print the current dialogue on the screen generated by the application.
Record a screencast Take a screen recording directly from the app. Screen recording is supported in the latest versions of Chrome, Edge, and Firefox. Ensure your browser is up-to-date for compatibility.
About Browse details on the version of Streamlit used to run the app and copyright information.

Updated April 26, 2024