RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Large language models / Prompt Engineering
Large language models

Prompt Engineering

Prompt engineering is the practice of crafting model inputs to elicit better outputs without changing the model itself. Techniques include role assignment, structured formatting, few-shot examples, chain-of-thought triggering, and output format constraints.

Specific techniques worth knowing: few-shot prompting (include 2-5 example input/output pairs), chain-of-thought ("let's think step by step"), role assignment ("you are a senior security reviewer"), output schema ("respond with valid JSON matching this schema"), decomposition (break complex tasks into sequential prompts).

The same techniques work on local models, but smaller models (3B-7B) benefit MORE from explicit prompt structure than frontier cloud models. A well-prompted Qwen 3 8B often beats a poorly-prompted GPT-4 on narrow tasks. As models improve, prompt engineering shifts from "tricks" to "specification" — the prompt IS the program.

Practical example

An operator running Qwen 3 8B locally for a JSON-extraction task gets inconsistent output — sometimes valid JSON, sometimes wrapped in markdown fences or prefaced with "Here's the result:". Adding an explicit output schema to the system-prompt ("respond with ONLY valid JSON matching this exact structure, no other text") plus one or two few-shot-prompting examples fixes it more reliably than upgrading to a larger model would. This is the practical tradeoff on constrained local hardware: spending a few hundred extra prompt tokens on structure and examples is cheap compared to the VRAM cost of jumping from an 8B to a 70B model just to get more consistent formatting — smaller models are far more sensitive to explicit scaffolding than frontier cloud models.

Related terms

Chain-of-Thought (CoT)System PromptFew-Shot Prompting

Reviewed by Eruo Fredoline. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →