Glossary · AI & ML
Prompt Engineering
The practice of crafting effective instructions and context for AI models to produce desired outputs.
Prompt engineering is the art and science of designing inputs (prompts) for large language models to elicit the most accurate, relevant, and useful outputs. Effective prompts provide clear instructions, relevant context, examples (few-shot learning), output format specifications, and constraints. For database applications, prompt engineering involves providing schema information, table descriptions, column semantics, sample data, and query patterns to help the AI generate correct SQL. Techniques include chain-of-thought prompting (asking the model to reason step-by-step), system prompts (setting behavioral guidelines), and retrieval-augmented generation (including relevant documentation in the prompt).
In practice
How AI for Database applies it
Fig — every answer ships with the tables, rows and SQL behind it.
Related terms
See it on your own database
Connect read-only in minutes. Free models included.