What is Prompt engineering?
Read in RomanianPrompt engineering
Why it matters
It is usually the cheapest lever you have. Before you reach for RAG or fine-tuning, a clearer instruction, a worked example, or a tighter output format often fixes most of the problem in an afternoon, with no extra infrastructure. The same prompt also drives how an LLM behaves inside an AI agent, so getting it right pays off across every feature that touches the model. Small wording changes can swing quality a lot, which is exactly why it is worth doing deliberately.
Common mistake
Treating prompts as magic words. People hunt for the one phrase that unlocks better answers, tweak it once, and call it done. The reliable approach is systematic: write the prompt, run it against a set of real test cases, score the results with evals, change one thing, and measure again. It is closer to tuning a function than casting a spell. Skipping the measurement is how teams ship a prompt that looked great on three examples and falls apart on the hundredth.
Where it fits
Prompt engineering also reduces, but never fully removes, hallucination. A well-structured prompt that tells the model to answer only from supplied context and to say when it does not know cuts down on confident wrong answers, though grounding the model with real data is what truly addresses it.