This repository demonstrates building and deploying a scalable and secure GenAI-powered ChatBot using FastAPI on Databricks Apps, powered by OpenAI models and Databricks Genie Conversational APIs.
- Ingest CMS provider dataset
- Create Genie Spaces for semantic querying
- Build a search + chat experience using FastAPI
- Deploy and monitor as a scalable Databricks App
CMS DAC_NationalDownloadableFile.csv includes:
- Facility names and locations
- Provider types, specialties, and services
- Ownership details
- Certification dates
Dataset Reference:CMS Provider Dataset
| Feature | Purpose |
|---|---|
| Delta Lake | Scalable ingestion of large healthcare datasets |
| Genie Spaces | Conversational agent with semantic querying |
| Unity Catalog | Secure governance and data access |
| Databricks Apps | Instant scalable API deployment |
| MLflow + DBSQL | Monitoring and observability |
- Clone this repository to your workspace.
- Update the
.envfile with your Databricks workspace URL and personal access token. - Review all files: environment config, app logic, helper functions, table extraction utility, and HTML templates.
- Install dependencies listed in
requirements.txt. - Deploy on Databricks Apps:
- Go to Apps β New β Custom β Name your app (e.g., fastapi-genie)
- Upload all files and deploy
- Test the endpoint by accessing the app UI and asking questions.
.envβ Environment variablesapp.yamlβ App deployment configurationrequirements.txtβ Python dependenciesapp.pyβ Main FastAPI applicationhelper.pyβ Functions to call Genie endpointstable_extraction.pyβ Extracts table names from queriestemplates/index.htmlβ Frontend UI
- Create a Custom Application in Databricks Apps.
- Upload all code files.
- Click Deploy and monitor deployment status.
- Test the application by opening its endpoint and validating responses from Genie Spaces.
Using Genie Spaces, CMS datasets, FastAPI, and Databricks Apps, you can deploy scalable GenAI applications for semantic querying of nationwide healthcare provider data without managing any infrastructure.
- Author: Nitin Aggarwal
This project is licensed under the Apache 2.0 License.
Built with β€οΈ by Nitin Aggarwal