Most people interact with LLM in the same way: ask a question, send it, and work with the result.
This is zero-shot prompting, the basic level. If the answers are not satisfactory, they first improve the prompt, rather than changing the model.
8 prompt engineering techniques:
1. Few-shot prompting: show several input-output examples. The model captures the pattern and applies it to new data.
2. Chain-of-thought (CoT): request a step-by-step reasoning. Breaks complex tasks into verifiable steps.
3. Hierarchy of prompts: system, developer, and user levels with different priorities. The upper levels override the lower ones.
4. Role prompting: assign a role, for example, "you are a security researcher". The model shifts the distribution to the corresponding training data.
5. Negative prompting: explicitly state what not to do. For example, "do not use a marketing style".
6. JSON prompting: specify a JSON schema directly in the prompt. The model returns a structured response according to this schema.
7. Attentive reasoning queries (ARQ): instead of free CoT — structured domain questions. In tests: 90.2% compliance with instructions versus 81.5% for direct prompting.
8. Verbalized sampling: ask the model to generate several variants with probability estimates. It returns diversity suppressed by RLHF.
The techniques combine well: few-shot + CoT, JSON + negative prompting. ARQ is essentially structured CoT for agent scenarios.
Additionally, quality increases with context, tools, and retrieval.
But these 8 techniques are entirely in the prompt — without changing the model, infrastructure, or setup. Only the structure of the request changes.
Here's another article on this topic
••••••••••••••••••••••••••••••••••••••
🤖 Data & ML | @DataXplore
