Skip to content
AskTable

Documentation feedback

Current pageTable and field notes/en/data/semantics

0 / 5,000

Your feedback will be sent to the maintenance team.

Go to console
Go to console
AskTable
Go to console

Build agents

Table and field notes

Describe the business meaning of tables and fields so agents choose the right fields and conditions.

Table and field notes describe the business meaning of data: what each row represents, field units and definitions, and what codes mean. Agents rely on them to choose fields and query conditions, so notes are among the most important settings for accurate results. Notes apply to every agent that uses the data source.

This requires a project owner or project administrator. Entry: “More” → “Data sources” → click a data source → choose a table on the left.

How notes affect results

A people table stores gender in sex, where 1 means male and 2 means female. Once the field note states this mapping, the agent uses sex = 2 for “How many female users are there?” instead of guessing the code.

A fund table's star column stores text such as ★★★★, not numbers. With a note that says so, “funds rated four stars or above” matches the actual values:

-- Wrong: compares star text as a number
WHERE star >= 4
-- Right: matches the values actually stored
WHERE star IN ('★★★★', '★★★★★')

Write notes

  • Table note: enter it in “Notes” to the right of the table name and click “Save”.
  • Field note: edit the note directly in the “Field structure” list, or click a field row to expand the details and edit there.
  • AI polishing: “Optimize field description” (“Optimize table description” for tables) at the top right of the editor rewrites the note from the existing content and fills it back into the editor for further changes.

Notes can be up to 255 characters. The icon before a note shows its source: a database icon for the database's original comment, a robot icon for AI-generated, and a pen icon for human-written. Precedence is human > database original > AI-generated.

How to write good notes

What to writeExample
What one row represents (table note)“Order line table; one row is one product in one order”
Unit and precision“Amount, in cents”
Code meanings“1=pending payment, 2=paid, 3=completed, 4=refunded”
Actual storage format“Date string in YYYYMMDD format”
Definition and use“Amount paid after coupons, before refunds”
Easily confused fields“Order time. For payment time, use pay_time”

Do not just translate the field name, such as noting amount as “amount”. State the unit, codes, and definition readers need.

Start with the tables and fields asked about most, then check wrongly answered questions in the logs and add notes where needed.

Semantic types

Expand a field's details to set its semantic type, in six groups: “Relationship”, “Number”, “Geography”, “Text”, “Time”, and “Entity”, such as “Currency”, “City”, or “Primary key”. Selection saves immediately. Values set by people are not overwritten by automatic inference. Semantic types are optional; when none fits, describe the field in its note.

Bulk changes

When there are many fields, export JSON in “Settings” → “Metadata”, edit in bulk, and import it again. See Manage data sources.

Common issues

SymptomCauseAction
The database has a comment, but the note shows placeholder textDatabase comments are shown only as defaultsWrite a human note when needed
“Save” is unavailableOver 255 charactersShorten the note
The agent still chooses the wrong fieldNotes do not distinguish similar fieldsWrite the difference and usage in both fields' notes
Import has no effectDatabase, table, or field names in the file do not match the data sourceCheck the missing items listed in the import result

Next steps