Prompt engineering structures input text so a pretrained language model produces results closer to the task you want. It is often the first practical step when using an existing model, but results may still need checking or additional orchestration. section 11.3.1 section 11.3.2
A prompt-engineering workflow should account for both prompt design and output limitations:
- Inspect generated results instead of assuming they are directly usable: outputs may include formatting text, multiple answers, repetition, or syntax errors. section 11.3.1
- Move beyond prompting when quality remains insufficient, using orchestration, fine-tuning, retrieval-augmented generation, or pretraining as appropriate. section 11.3.1 section 11.3.2
Generating SQL from natural language
A prompt can ask a causal language model to generate SQL from text enclosed in triple backticks, then pass the prompt through a tokenizer and generation call. The resulting SQL still requires validation: generated text may surround the commands, contain several alternatives, repeat indefinitely, or include errors such as an unmatched quote. section 11.3.1





































