# Prompty i kontekst

EN: **Prompting and context engineering** · id `prompting`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › Prompty i kontekst

## Description

- PL: Dobór instrukcji i informacji dostępnych przy wywołaniu.
- EN: Choosing the instructions and information available at call time.

## In one sentence

- PL: To przygotowanie polecenia oraz informacji, które model dostaje przed odpowiedzią.
- EN: This prepares the instructions and information a model receives before it answers.

## Problem it solves

- PL: Model odpowiada nie na temat, gdy prośba jest niejasna lub brakuje mu potrzebnych informacji.
- EN: The model misses what you need when your request is unclear or important information is missing.

## What it does

- PL: Podaje mu cel, potrzebne materiały, ograniczenia i wzór oczekiwanego wyniku, jak dobre zlecenie dla osoby pomagającej w pracy.
- EN: It supplies a goal, relevant material, limits and an example of the desired result, like a clear brief for someone helping you.

## Everyday example

- PL: Prosisz o odpowiedź na reklamację, dołączając treść wiadomości, zasady zwrotów i przykład tonu, którego oczekujesz.
- EN: You ask for a complaint reply and include the customer's message, the returns policy and an example of the tone you want.

## This concerns you if you…

- PL: otrzymujesz odpowiedzi, które mijają się z twoją prośbą
- PL: chcesz przekazać modelowi dokumenty i zasady przed odpowiedzią
- EN: receive answers that miss what you asked for
- EN: want to give the model documents and rules before it answers

## Keywords

few-shot prompting · chain-of-thought prompting · ReAct · prompt templates · system prompts · instruction hierarchy · context window · token budgeting · context compaction · prompt chaining

## How it works

- PL: System układa instrukcje, przykłady, historię i wyniki narzędzi w kontekst pojedynczego wywołania modelu. Dobór treści, ich kolejność i szablon wiadomości wpływają na generowanie, bez konieczności trenowania nowych wag.
- EN: The system arranges instructions, examples, history and tool results into context for a single model call. Content selection, ordering and the message template influence generation without requiring new weight training.

## Limits

- PL: Zmiana sformułowania lub modelu może zmienić wynik. Kontekst ma ograniczony budżet tokenów, a dane zewnętrzne mogą zawierać instrukcje ataku; skuteczność trzeba mierzyć na reprezentatywnych przypadkach.
- EN: Changes in wording or model can change outputs. Context has a limited token budget, and external data can contain attack instructions; effectiveness must be measured on representative cases.

## Key terms

- PL: **prompt**: Instrukcje i dane przekazane modelowi w konkretnym wywołaniu.
- PL: **few-shot**: Przykłady oczekiwanych odpowiedzi umieszczone w kontekście.
- PL: **budżet kontekstu**: Liczba tokenów dostępna na wejście i generowaną odpowiedź.
- EN: **prompt**: Instructions and data supplied to a model in a particular call.
- EN: **few-shot**: Examples of expected responses included in context.
- EN: **context budget**: Tokens available for input and the generated response.

## Know first

- [Tokenizacja tekstu (BPE, WordPiece, SentencePiece) (Text tokenisation (BPE, WordPiece, SentencePiece))](https://aiatlasgraph.com/t/tokenization.md)
- [Strategie dekodowania (Decoding strategies)](https://aiatlasgraph.com/t/decoding.md)

## Examples

- PL: Prompt templates · context budget · few-shot · chain of thought · ReAct

## Subtopics (4 direct, 4 in total)

- [Budowa polecenia: instrukcje, rola i znaczniki (Prompt structure: instructions, roles and delimiters)](https://aiatlasgraph.com/t/promptstructure.md): Laying out a prompt with clear instructions, purpose, a role in the system prompt, data sections separated by delimiters and an output format description.
- [Programowa optymalizacja promptów (Programmatic prompt optimisation)](https://aiatlasgraph.com/t/promptopt.md): Automatically tuning prompts, and sometimes weights, against an evaluation score.
- [Przykłady w poleceniu (few-shot) (Few-shot prompting and in-context learning)](https://aiatlasgraph.com/t/fewshotprompting.md): A few input–output pairs placed in the prompt show the model the task and answer format without changing its weights.
- [Zarządzanie oknem kontekstu (Context window management: placement, compaction and context rot)](https://aiatlasgraph.com/t/contextmanagement.md): Deciding which tokens enter a limited context and in what order: placement, trimming, summarisation and external notes.

## Related topics

Untyped, symmetric "see also" links.

- [Mapa dokumentów dla agenta (Repository map for agents)](https://aiatlasgraph.com/t/harnessdocs.md)
- [Miękkie prompty (prompt tuning, prefix tuning) (Soft prompts: prompt and prefix tuning)](https://aiatlasgraph.com/t/softprompts.md)
- [Role i tożsamość agentów (Agent roles and identity)](https://aiatlasgraph.com/t/agentroles.md)
- [Wersjonowanie i rejestr promptów (Prompt management and versioning)](https://aiatlasgraph.com/t/promptversioning.md)
- [Zbiory testowe i regresje (Evaluation datasets and regression tests)](https://aiatlasgraph.com/t/evalsets.md)
- [Łańcuch myśli (chain-of-thought) (Chain-of-thought prompting)](https://aiatlasgraph.com/t/cot.md)

## Courses

- [AI Prompting for Everyone](<https://www.deeplearning.ai/courses/ai-prompting-for-everyone>)

## Sources

- [Hugging Face · Agents Course](<https://huggingface.co/learn/agents-course/en/unit0/introduction>) `agents` · reference: Agenci, narzędzia, frameworki, agentic RAG i ewaluacja.
- [FSDL · LLM Bootcamp (2023, archiwum)](<https://fullstackdeeplearning.com/llm-bootcamp/spring-2023/>) `bootcamp` · reference: Aplikacje LLM, prompting, retrieval, UX i LLMOps.
- [DeepLearning.AI — course catalogue](<https://www.deeplearning.ai/courses>) `dlai` · course catalogue: 42 topic labels with counts, about 130 courses.
- [Anthropic Courses · Prompt evaluations](<https://github.com/anthropics/courses/tree/master/prompt_evaluations>) `anthropic-prompt-evals` · by Anthropic
- [LLM Course (Maxime Labonne)](<https://github.com/mlabonne/llm-course>) `mlabonne-llm-course` · by Maxime Labonne

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/prompting · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
