The config layer

YAML config reference

Every field in a ChatPlotDB config: the semantic layer the agent reads before it writes a query.

A config is YAML. Config Studio writes it for you, but it is a plain file you can upload, version, and diff.

Top-level fields

FieldPurpose
db_labelHuman name for the connection, used in answers
identityWhat this database is: the sentence that orients the agent
tablesThe tables to expose, with columns and relationships
db_rulesConstraints the agent must respect when querying
metricsNamed measures with their definitions
synonymsYour team's words mapped to schema objects
golden_queriesVerified question-and-SQL pairs used as examples
default_questionsSuggested prompts shown on an empty conversation
toolsCustom tools the agent may call

identity

One or two sentences describing the domain. This is not decoration: it is what stops the agent reading orders as retail orders when they are work orders.

identity: >
  A B2B subscription billing database. An "account" is a paying company, not an
  individual user; individual users live in `contacts`.

tables

Each table lists the columns worth exposing and how it relates to others. Omitting a table is a real choice: a smaller, correct surface produces better queries than exposing everything.

metrics

The highest-value section. A metric names a measure and pins its definition, so two people asking the same question get the same number.

metrics:
  - name: net_revenue
    description: Gross revenue minus refunds and credits.
    sql: sum(amount) - sum(refund_amount)

synonyms

Maps how people speak to what the schema calls things.

synonyms:
  churn: cancelled subscriptions in the period
  MRR: monthly_recurring_revenue

golden_queries

Question-and-SQL pairs that are known-correct. They are retrieved as examples when a new question resembles one of them, which is why curating them from real thumbs-up answers raises accuracy over time. See Config Studio for the refine loop that feeds this.

Versions

Every save is a version. You can list them, switch which one is active, and upload a YAML file directly. Switching versions is how you roll back a change that made answers worse.

On this page