---
name: xml-markdown-struktur
technik: XML-/Markdown-Abschnitte als Struktur
klasse: { A: hilft, B: hilft, C: hilft }
thinking: egal
konfidenz: tentativ
quelle: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices | https://developers.openai.com/api/docs/guides/reasoning-best-practices | https://developers.openai.com/cookbook/examples/gpt4-1_prompting_guide | https://ai.google.dev/gemma/docs/core/prompt-formatting-gemma4
stand: 2026-09-20
anweisung: |
  Kontext, Anweisung und Beispiele bei längeren oder mehrteiligen Eingaben mit klar benannten Abschnitten trennen, etwa XML-Tags oder Markdown-Überschriften.
gegenanweisung: |
  Bei Gemma-Modellen im Funktionsaufruf-Kontext keine rohen Pipe-Zeichen oder `<|…|>`-Token in String-Werten verwenden; für reine Prompt-Gliederung unproblematisch.
---
Evidenz (Abrufdatum aller Web-Quellen: 2026-09-20):

- **A, hilft, belegt (zwei unabhängige Anbieter).** `https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices` (2026-09-20), Abschnitt „Structure prompts with XML tags": *"XML tags help Claude parse complex prompts unambiguously, especially when your prompt mixes instructions, context, examples, and variable inputs. Wrapping each type of content in its own tag […] reduces misinterpretation."* Zweite Quelle: `https://developers.openai.com/api/docs/guides/reasoning-best-practices` (2026-09-20): *"Use delimiters like markdown, XML tags, and section titles to clearly indicate distinct parts of the input, helping the model interpret different sections appropriately."* Nuance derselben Seite (betrifft die Ausgabe, nicht die hier gemeinte Struktur der Eingabe): *"Starting with o1-2024-12-17, reasoning models in the API will avoid generating responses with markdown formatting"* per Default.
- **B, hilft, belegt.** `developers.openai.com/cookbook/examples/gpt4-1_prompting_guide` (2026-09-20): *"XML performed well in our long context testing"*; *"We recommend starting here, and using markdown titles for major sections and subsections."*
- **C, hilft, tentativ (Geltungsbereich eingeschränkt gegenüber Ausgangsmatrix).** `https://ai.google.dev/gemma/docs/core/prompt-formatting-gemma4` (2026-09-20, Stand der Seite 2026-06-03): *"A single token, `<|"|>`, is used as a delimiter for all string values within the structured data blocks"* und *"All string literals in your function declarations, calls, and responses must be enclosed using this token."* Diese Kollisionsgefahr ist auf Funktionsaufruf-/Tool-Antwort-Datenblöcke begrenzt, nicht auf gewöhnliche Prompt-Gliederung mit XML-Tags oder Markdown-Überschriften — die pauschale Aussage der Ausgangsmatrix („keine Pipe-Tags, kollidieren mit Gemma-4-Steuertoken") ist zu weit gefasst und wird auf den Funktionsaufruf-Kontext eingeschränkt; für reine Prompt-Struktur bleibt die Technik `hilft`, aber `tentativ` statt `belegt`.
