cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Genie Space and App Error

emsmarcela
New Contributor

I built an App with a chatbot which generates queries and accesses data through a Genie Space. When making questions in the chatbot now, I keep getting the following error in the Genie monitoring page:

 

An error happened. Please try again later.
We're sorry, but an unexpected internal error has occurred. Please try again in a few minutes. If the issue persists, please contact your Databricks account team.
Details: INTERNAL_ERROR: AI service did not respond with a valid answer.
 
I have not made changes to my app code. How can I fix this?
1 REPLY 1

Louis_Frolio
Databricks Employee
Databricks Employee

Hello @emsmarcela , good instinct flagging that you haven't touched your app code. That's the most useful detail in your whole post, and it tells us a lot. An INTERNAL_ERROR like this one means Genie tripped while it was generating or processing the answer, so the trouble is almost certainly underneath your app rather than in the chatbot UI itself. That's a better starting point than it feels like right now, because it means you probably don't have a bug to hunt down in your own code.

First, let's figure out which side of the fence the problem is on. Open the Genie Space directly in the workspace and ask a stripped-down version of the question your chatbot sends (something simple, like asking it to list the tables it can see). Where it fails tells you which set of checks to run next.

If it fails in the Genie Space UI too, then your app is fine and the issue is in Genie, the backing resources, permissions, or billing. Here's what I'd check:

  • Permissions and access. Confirm the app (or its service principal) still has USE CATALOG, USE SCHEMA, and SELECT on the tables and views the Space uses, that the Can Run grant on the Genie Space is still in place, and that the SQL warehouse behind the Space is running with its permissions unchanged.
  • Data drift. A table the Space points at may have been renamed, dropped, or had a grant pulled. Your code wouldn't change, but Genie would start failing all the same.
  • The July 8 billing change. Genie moved to pay-as-you-go on July 8, 2026, with a free monthly allowance per user and admin budgets that can be set to block usage once a spend threshold is reached. The catch for an app: service principals get no free allowance and are billed for all their usage, so an app calling Genie as its service principal is the identity most likely to get blocked. Ask whoever administers your account whether a Genie budget with Block usage covers your app's identity, and take a look at system.billing.usage. I'll be straight with you, I can't confirm this exact message is what a blocked call returns, so treat it as something to rule out rather than the answer. It does fit a chatbot that quietly stopped working with no code change on your end.
  • A transient backend issue. This same error has turned up from Databricks-side or model-provider blips, and in some cases it cleared on its own or needed a fix on their end. A retry costs you nothing, though the fact that yours has hung around since Monday makes a simple blip less likely.

If it works in the UI but only fails through the app, then the problem is in how the app talks to Genie. Look at which identity it uses to make the call: its own service principal, or on-behalf-of the signed-in user. And if the app is hand-rolling tokens or hardcoding resource IDs, I'd move it over to Databricks App resources with injected environment variables. The docs steer you toward app-managed resources for Genie rather than self-managed credentials, and it takes a whole category of auth and stale-ID failures off the table.

Either way, expand the failed request on that Genie monitoring page you're already looking at. It usually surfaces a more specific error type underneath the generic banner (for example a FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION), and that detail will get you to the cause a lot faster.

If all of that checks out and it's still failing, open a support case and hand them:

  • workspace ID
  • Genie space/agent ID
  • SQL warehouse ID
  • timestamp of a failed request
  • the message ID from the monitoring page

With those in hand, support can tell pretty quickly whether this is a configuration or permissions issue on your side or a backend failure on theirs.

The short version: don't go rewriting your app yet. Run the simple prompt in the Genie Space UI first, and that one test points you at the right half of this. If you can report back on when it started and whether it also fails in the UI, folks here can help you take it the rest of the way.

Regards, Louis