Prompt Engineering concept page — system that demonstrates zero-shot/few-shot lift, CoT reasoning, structured outputs via function calling, prompt injection defense, eval-driven iteration. Architecture: prompt orchestration (router, template, few-shot retriever, input guardrails) → model layer (Haiku/Sonnet/thinking) → tools (function calling) → output processing (parser, output guardrails, eval logger). Multi-scenario animation covering all six topics with 2 ADRs (prompt vs fine-tune vs RAG; CoT vs thinking models).
A prompt is application code that shapes a probabilistic model call. Examples, instructions, context ordering, model version, decoding, and tool schemas interact, so a prompt that works on anecdotes is not a reliable contract.
Versioned prompt call. The request is assembled from typed fields and a pinned template-model pair.
Examples are tested, not assumed. Few-shot and reasoning prompts show empirical gains on some tasks and models, not universal improvement.
Prompt injection does not grant authority. Natural-language separation can reduce mistakes but cannot enforce permissions.
Malformed or unsafe output recovery. A schema retry is bounded and cannot turn a risky action into success.
Version prompts with their model snapshot and input schema, evaluate representative and adversarial cases before release, validate structured outputs, and keep authorization outside natural-language instructions. Treat user and retrieved text as untrusted data and bound retries, tokens, latency, and spend.
Введите числа или выберите пресет