# Technical Document Extraction: Prompt Comparison Diagram
This document provides a detailed extraction of the textual and structural information contained in the provided image, which compares two different Large Language Model (LLM) prompt structures for translation tasks.
## 1. Document Overview
The image is a technical diagram illustrating the specific formatting used for two different models: **GPT-4** and **ALMA**. The image is divided into two horizontal sections separated by a dashed line.
---
## 2. Component Isolation
### Region 1: GPT-4 Prompt (Top Section)
This section outlines a structured prompt format utilizing "System" and "User" roles, typical of chat-completion APIs.
* **Header Label:** `GPT-4 Prompt` (Enclosed in a rectangular box)
* **System Role Definition:**
* **Label:** `System:`
* **Content:** "You are a helpful translator and only output the result."
* **User Role Definition:**
* **Label:** `User:`
* **Content Structure:**
* `### Translate this from <source language> to <target language>, <source language>:`
* `<source sentence>`
* `### <target language>:`
### Region 2: Divider
* **Visual Element:** A horizontal dashed line separates the GPT-4 section from the ALMA section.
### Region 3: ALMA Prompt (Bottom Section)
This section outlines a more direct, instruction-based prompt format without explicit role-based headers.
* **Header Label:** `ALMA Prompt` (Enclosed in a rectangular box)
* **Content Structure:**
* Line 1: `Translate this from <source language> to <target language>:`
* Line 2: `<source language>: <source sentence>`
* Line 3: `<target language>:`
---
## 3. Detailed Text Transcription
| Element | Transcribed Text |
| :--- | :--- |
| **Top Header** | GPT-4 Prompt |
| **GPT-4 System Instruction** | System: You are a helpful translator and only output the result. |
| **GPT-4 User Instruction** | User: ### Translate this from \<source language\> to \<target language\>, \<source language\>: \<source sentence\> ### \<target language\>: |
| **Bottom Header** | ALMA Prompt |
| **ALMA Instruction** | Translate this from \<source language\> to \<target language\>: \<source language\>: \<source sentence\> \<target language\>: |
---
## 4. Structural Analysis and Comparison
The diagram highlights the following technical differences between the two prompting strategies:
1. **Role Specification:** GPT-4 uses explicit `System:` and `User:` tags to define the context and the task. ALMA uses a flat text structure without role identifiers.
2. **Delimiters:** GPT-4 utilizes Markdown-style headers (`###`) to separate instructions from data fields. ALMA relies on line breaks and colons.
3. **Redundancy:** In the GPT-4 prompt, the `<source language>` is mentioned twice in the instruction line (e.g., "...to \<target language\>, \<source language\>:"). In the ALMA prompt, the instruction line is followed by a label for the source language on the next line.
4. **Completion Trigger:** Both prompts end with the `<target language>:` label, serving as a "stop sequence" or a trigger for the model to begin generating the translation.