cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Lakebase Discussions
Ask questions, share challenges, and connect with others working on Lakebase. From troubleshooting to best practices, this is where conversations happen.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Genie Space Token Limit & Metric View Description

SiddharthMadan
New Contributor

Hi,

I want to get clarity around 2 things related to Genie Agents/Spaces-

1. Is their any token limit defined for each space?

2. How much is the character limit for description section within any Metric View?

2 REPLIES 2

ThomazNeto
Databricks Partner

Hi Siddharth,

1. Token limit per agent

There is one, but the docs don't publish a number. Per the troubleshooting page, when an agent gets close to the limit a warning appears and Genie starts context filtering, keeping the tokens it thinks are most relevant to the question. Answer quality can drop if something important gets filtered out. Once the limit is exceeded, you can't send or receive messages in that agent anymore.

Instructions and metadata are what get turned into tokens. The levers the docs point to: hide columns you don't need, use views that drop redundant fields, shorten column descriptions that just repeat the column name, and remove overlapping example SQL.

The limits that are documented per agent:
- 100 instructions (each example SQL query, each SQL function, and the whole General instructions block count as one each)
- 200 knowledge store snippets (table descriptions, join relationships and SQL expressions share this)
- 50 tables, views or metric views, with five or fewer recommended
- Entity matching on up to 120 columns, 1,024 values per column, 127 characters per value

2. Metric view description

The YAML reference doesn't list a character limit for comment, either at the top level or on dimensions and measures. The documented limits are on display_name (255 characters) and synonyms (up to 10, 255 characters each), both on YAML spec 1.1. Descriptions are also metadata Genie turns into tokens, so a very long comment eats into the budget from point 1.

Docs:
Troubleshoot Genie Agents: https://docs.databricks.com/aws/en/genie-agents/troubleshooting
Tune Genie Agent quality (instruction and snippet limits): https://learn.microsoft.com/en-us/azure/databricks/genie-agents/tune-quality
Genie best practices (table limit): https://docs.databricks.com/aws/en/genie-agents/best-practices
Metric view semantic metadata: https://docs.databricks.com/aws/en/metric-views/semantic-metadata

Thomaz A. Rossito Neto
Principal Data Architect & AI Strategy โ€” CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto | Databricks Solutions Architect Champion

balajij8
Esteemed Contributor III

Genie Space token limits - An overall token limit does exist, but the token value is not documented. All curated instructions and associated metadata get tokenized into the space's prompt context. If you approach the limit, the UI shows a warning and exceeding it blocks from sending or receiving further messages. This threshold is tied to the context window of the underlying Foundation Model the agent uses (Databricks manages and tunes it). The operational quotas Databricks documents are architectural - a cap of 100 instructions and 200 knowledge snippets per agent. More details here

On the Metric View description limit, there are no documented limits. In the metric view definition, this field maps to the comment property in the YAML configuration. If you run into an explicit validation error, truncation or save failure when publishing a long description, share the error trace and the length of the string to isolate whether it is getting blocked at the YAML parser or UI layer.