# Budowa polecenia: instrukcje, rola i znaczniki

EN: **Prompt structure: instructions, roles and delimiters** · id `promptstructure` · aliases: prompt structure, XML tags in prompts, delimiters, role prompting, prompt templates, budowa promptu, struktura promptu

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Prompty i kontekst](https://aiatlasgraph.com/t/prompting.md) › Budowa polecenia: instrukcje, rola i znaczniki

## Description

- PL: Układ promptu z jasnymi instrukcjami, celem, rolą w prompcie systemowym, oddzielonymi znacznikami sekcjami danych i opisem formatu wyniku.
- EN: Laying out a prompt with clear instructions, purpose, a role in the system prompt, data sections separated by delimiters and an output format description.

## In one sentence

- PL: Dobre polecenie dla modelu ma porządek: co zrobić, po co, na jakich materiałach i w jakiej formie oddać wynik.
- EN: A good instruction to a model is orderly: what to do, why, from which material and in what form to hand back the result.

## Problem it solves

- PL: Gdy w jednej prośbie mieszają się polecenia, wklejone dokumenty i przykłady, model myli jedno z drugim i odpowiada nie tak.
- EN: When instructions, pasted documents and examples blur together in one request, the model mixes them up and answers wrongly.

## What it does

- PL: Przypomina dobrze zorganizowany segregator z przekładkami: osobno zadanie, osobno materiały, osobno wzór, więc nic się nie miesza.
- EN: It resembles a well-organised binder with dividers: the task, the material and the template each in their own section, so nothing gets mixed up.

## Everyday example

- PL: Prosisz o streszczenie umowy: najpierw wklejasz dokument w wyraźnie oznaczonej sekcji, a na końcu piszesz pytanie i żądaną formę odpowiedzi.
- EN: You ask for a contract summary: first you paste the document in a clearly marked section, then end with the question and the answer format you want.

## This concerns you if you…

- PL: wklejasz do czatu długie dokumenty razem z pytaniem
- PL: piszesz polecenia, z których korzystają też inni
- EN: paste long documents into a chat along with a question
- EN: write instructions that other people also use

## Keywords

system prompt · XML tags · role prompting · prompt templates · Jinja · markdown headings · instruction hierarchy · output format

## How it works

- PL: Prompt systemowy ustala rolę i stałe zasady, a wiadomość użytkownika zawiera zadanie, kontekst i dane. Sekcje oddziela się znacznikami XML lub nagłówkami markdown, długie dokumenty umieszcza na początku, a pytanie na końcu; dodanie uzasadnienia polecenia i pozytywnych instrukcji formatu poprawia zgodność.
- EN: The system prompt sets the role and standing rules, while the user message holds the task, context and data. Sections are separated by XML tags or markdown headings, long documents go first and the question last; explaining why an instruction exists and stating format positively improves adherence.

## Limits

- PL: Najlepsze praktyki różnią się między modelami i ich wersjami, więc prompt trzeba testować po każdej zmianie. Struktura nie chroni przed instrukcjami ukrytymi w danych ani nie dodaje wiedzy, której model nie ma.
- EN: Best practices differ between models and versions, so a prompt must be retested after each change. Structure does not protect against instructions hidden in data, nor does it add knowledge the model lacks.

## Key terms

- PL: **prompt systemowy**: Stałe instrukcje nadrzędne wobec wiadomości użytkownika.
- PL: **ogranicznik**: Znacznik oddzielający instrukcje od danych w prompcie.
- PL: **szablon promptu**: Prompt z polami wypełnianymi danymi przy każdym wywołaniu.
- EN: **system prompt**: Standing instructions that take precedence over user messages.
- EN: **delimiter**: A marker separating instructions from data in a prompt.
- EN: **prompt template**: A prompt with slots filled with data on every call.

## Know first

- [Szablony czatu i formaty rozmów (Chat templates and conversation formats)](https://aiatlasgraph.com/t/chattemplates.md)

## Related topics

Untyped, symmetric "see also" links.

- [Korepetytorzy na modelach językowych z zabezpieczeniami pedagogicznymi (LLM tutors with pedagogical guardrails)](https://aiatlasgraph.com/t/llmtutors.md)
- [Role i tożsamość agentów (Agent roles and identity)](https://aiatlasgraph.com/t/agentroles.md)

## Sources

- [Prompting best practices (Claude Docs)](<https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices>) `claude-prompting-best-practices` · by Anthropic · sponsored

---

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