Context & knowledge
Custom AI prompts
A custom prompt is a standing instruction the AI receives every time it touches the data it's attached to — no need to repeat "amounts are in EUR" in every chat. GoPie has three levels; each has a distinct job and a distinct reach.
Know the three levels#
| Level | Where to edit | Reaches |
|---|---|---|
| Dataset | Dataset Settings → General → Custom AI prompt | Chat and the playground's Ask AI, whenever this dataset is in play |
| View | View Settings → Custom AI Prompt | Same — for queries against the view |
| Project | The project overview's description banner | Chat only, when the project is attached — the playground's Ask AI doesn't receive it |
All three save as you type them — edit, click away, done. There's no length limit, but shorter is better: these tokens spend context on every question.
ImportantBecause the project prompt doesn't reach the playground, any instruction that must hold for SQL generation on a specific dataset belongs on the dataset, not the project. Reserve the project prompt for conversational ground rules.
Write instructions that work#
Good custom prompts state facts and rules the schema can't express:
- Semantics — "
amountis in cents; divide by 100 for euros." - Business rules — "Always exclude rows where
is_test = true." - Preferred defaults — "When asked about revenue, use
net_revenueunless gross is requested explicitly." - Domain framing (project level) — "This project tracks clinical trial data; 'subjects' means trial participants."
Anti-patterns: restating what descriptions already say, listing column definitions one by one (that's what column descriptions are for), or pasting whole documents (upload them as context documents instead — searched when relevant, rather than spent on every prompt).
Verify the effect#
Custom prompts are invisible in the transcript — the fastest way to confirm one is working is to ask a question it should change ("what's our revenue?" after the net-revenue rule) and check the generated SQL under Show steps.