Schema grounding
Ask the model to list assumptions about table names, join keys, date columns, deleted rows, time zones, and event definitions.
Use this existing Omellody prompt utility to convert a reporting question into a safe SQL drafting prompt with schema context, joins, filters, expected rows, performance review, and read-only constraints. The builder runs locally in your browser and does not send project details to Omellody.
Replace the examples with sanitized project details. The generated prompt updates locally in your browser.
Formula: Business question + database engine + relevant tables + grain + filters + privacy limits + expected output + validation checks.
| Variable | What to enter |
|---|---|
{context} | Add specific, sanitized context details. If unknown, write the assumption explicitly. |
{stack} | Add specific, sanitized stack details. If unknown, write the assumption explicitly. |
{goal} | Add specific, sanitized goal details. If unknown, write the assumption explicitly. |
{constraints} | Add specific, sanitized constraints details. If unknown, write the assumption explicitly. |
Ask the model to list assumptions about table names, join keys, date columns, deleted rows, time zones, and event definitions.
Require SELECT-only output, row limits for samples, no PII, and no mutation statements unless explicitly reviewed by a human owner.
Request sanity checks against known totals, duplicate detection, null handling, timezone windows, and explain-plan performance notes.
| Check | Pass condition | Fix if weak |
|---|---|---|
| Grounding | The answer distinguishes facts, assumptions, and unknowns. | Add source snippets, example inputs, or explicit non-goals. |
| Safety | No secrets, customer data, account identifiers, or destructive commands are requested. | Sanitize examples and ask for read-only checks first. |
| Actionability | The plan includes concrete steps, owners, tests, and rollback or review criteria. | Request a checklist with evidence and stop conditions. |
| Verification | The output can be tested with unit cases, logs, traces, fixtures, or source-of-truth docs. | Add expected results and failure examples before using it. |
| Item | Snapshot |
|---|---|
| Page type | Existing Omellody coding prompt utility refreshed in Red Mode for depth and internal discovery. |
| Demand signal | URL inventory on 2026-05-22 flagged this prompt-family page as thin with limited internal-link depth while traffic radar continued to show AI prompt generator demand. |
| Originality | Omellody-created formula, builder, review criteria, FAQ, source snapshot, and safety guidance. No external repository content copied. |
| Last reviewed | 2026-05-22 |