Skip to content

Commit 4a79498

Browse files
Add conversational agent app project (#460)
This is for publishing it to marketplace, similar to the ka-chat-bot project.
1 parent 0893d48 commit 4a79498

39 files changed

+2726
-0
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Specific owners are listed last. Please keep this list in the alphabetical order
88

99
acceptance @nfx @alexott
10+
conversational-agent-app @vivian-xie-db @yuanchaoma-db
1011
database-diagram-builder @alexott
1112
downstreams @nfx @alexott
1213
go-libs @nfx @alexott

conversational-agent-app/README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: "Conversational Agent App"
3+
language: python
4+
author: "Vivian Xie"
5+
date: 2025-06-09
6+
---
7+
8+
# Conversational Agent App
9+
10+
11+
![](./assets/genie_room0.png)
12+
![](./assets/genie-space.png)
13+
![](./assets/genie-space4.png)
14+
15+
This repository demonstrates how to integrate Databricks' AI/BI Genie Conversation APIs into custom Databricks Apps applications, allowing users to interact with their structured data using natural language.
16+
17+
You can also click the Generate insights button and generate deep analysis and trends of your data.
18+
![](./assets/insights1.png)
19+
![](./assets/insights2.png)
20+
21+
22+
23+
## Overview
24+
25+
This app is a Dash application featuring a chat interface powered by Databricks Genie Conversation APIs, built specifically to run as a Databricks App. This integration showcases how to leverage Databricks' platform capabilities to create interactive data applications with minimal infrastructure overhead.
26+
27+
The Databricks Genie Conversation APIs (in Public Preview) enable you to embed AI/BI Genie capabilities into any application, allowing users to:
28+
- Ask questions about their data in natural language
29+
- Get SQL-powered insights without writing code
30+
- Follow up with contextual questions in a conversation thread
31+
32+
## Key Features
33+
34+
- **Powered by Databricks Apps**: Deploy and run directly from your Databricks workspace with built-in security and scaling
35+
- **Zero Infrastructure Management**: Leverage Databricks Apps to handle hosting, scaling, and security
36+
- **Workspace Integration**: Access your data assets and models directly from your Databricks workspace
37+
- **Natural Language Data Queries**: Ask questions about your data in plain English
38+
- **Stateful Conversations**: Maintain context for follow-up questions
39+
40+
## Example Use Case
41+
42+
This app shows how to create a simple interface that connects to the Genie API, allowing users to:
43+
1. Start a conversation with a question about their supply chain data
44+
2. View generated SQL and results
45+
3. Ask follow-up questions that maintain context
46+
47+
## Deploying to Databricks apps
48+
49+
The app can be installed through Databricks Marketplace. If you prefer to clone and deploy it manually, please refer to these instructions:
50+
51+
1. Clone the repository to your Databricks workspace using [Git Folder](https://docs.databricks.com/aws/en/repos/repos-setup):
52+
- Navigate to the **Workspace** section in the sidebar.
53+
- Click on the 'Create' button, select the 'Git Folder' option and follow the prompts to clone the repository.
54+
55+
2. Create an app with a serving endpoint resource.
56+
- Navigate to the **Compute** section in the sidebar.
57+
- Go to the Apps tab and click the **Create app** button. Fill in the necessary fields and click **Next: Configuration**
58+
- To reuse an existing app, click the link to your app in the **Name** column to go to the detail page of the app, then click **Edit**
59+
- In the App resources section, click **+ Add resource** and select **Serving endpoint**. Choose a chat endpoint, grant **CAN_QUERY** permission and name it 'serving_endpoint'.
60+
61+
For detailed instructions on configuring resources, refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/resources#configure-resources-for-your-app).
62+
63+
3. Deploy the app using the Databricks Apps interface:
64+
- Go to the detail page of the app.
65+
- Click **Deploy** and select the folder 'conversational-agent-app' from the created Git folder.
66+
- Click **Select**, then **Deploy**.
67+
- Review the configuration and click **Deploy**.
68+
69+
For more details, refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy).
70+
71+
## Troubleshooting
72+
73+
For troubleshooting, navigate to the Monitoring page of the selected genie space and check if the query has been sent successfully to the genie room via the API.
74+
75+
![](./assets/troubleshooting1.png)
76+
77+
Click open the query and check if there is any error or any permission issues.
78+
79+
![](./assets/troubleshooting2.png)
80+
81+
## Resources
82+
83+
- [Databricks Genie Documentation](https://docs.databricks.com/aws/en/genie)
84+
- [Conversation APIs Documentation](https://docs.databricks.com/api/workspace/genie)
85+
- [Databricks Apps Documentation](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/)

0 commit comments

Comments
 (0)