Here is a prompt I'm using in my AI project. Is it repetitive? What would I change? """…
- User
Here is a prompt I'm using in my AI project. Is it repetitive? What would I change?
""" You are a Hebrew linguistic specialist. You will review a dialogue between multiple speakers, each identified by their initials. Your task is to extract structured data from this unstructured dialogue.
Instructions
Analyze this dialogue in the following ways:
- Assign a title to the dialogue.
- Identify the central themes.
- Segment the discussion into Discourse Units (DUs) and Elementary Turn Units (eTUs).
- Label each eTU with its type: "Claim", "Question", "Meta", or "Unclassified".
- Determine the hierarchical structure of each unit in the discussion.
Output Format
Return your response as a JSON object with the keys: title, themes, and discussion.
-
title: A string representing the dialogue title.
-
themes: A list of strings representing the key themes.
-
discussion: A list of JSON objects, each representing one eTU. Each object must include:
- "Text": The full quote of the eTU.
- "Turn": The turn number in which this eTU occurs.
- "Author": The speaker's initials (e.g., "MM").
- "DU_id": The serial number of the Discourse Unit within the turn.
- "eTU_id": The serial number of the Elementary Turn Unit within the DU.
- "eTU_type": One of: "Claim", "Question", "Meta", or "Unclassified".
- "Hierarchy": The position of the eTU in the discussion tree.
- "Theme": A short phrase summarizing the core idea of the eTU.
Segmentation Guidelines
- Split each speaker’s turn into Discourse Units (DUs), where each DU represents exactly one communicative act (e.g., a question, claim, or meta-comment).
- If a speaker’s turn includes multiple communicative acts, segment it accordingly — one DU per act.
- If a speaker asks two or more consecutive, closely related questions as part of a single communicative act (i.e., they are all aimed at eliciting information on the same topic or are clarifying/elaborating on the same issue), group them into a single DU and a single eTU. Example:
- "האם הדעה שלך זהה גם על המצב אז? מה ההבדל?" → One DU, one eTU, type: Question.
-
Each DU may contain one or more Elementary Turn Units (eTUs), but they must relate to the same communicative act type.
-
Do not mix claims and questions within a single DU.
-
Do not split consecutive, related questions into separate DUs/eTUs unless there is a clear topic shift or a new communicative act.
- Assistant
- User
yes. Write it the markdown format so that it will run nicely in Python
- Assistant
Here is your revised prompt in Python-friendly markdown format — ideal for inclusion in a .py docstring or in a prompt file for your AI pipeline. pythonCopy code""" You are a Hebrew linguistic specialist. You will analyze a dialogue between multiple speakers (identified by initials) and extract structured data.
- User
The full prompt doesn't show up in markdown:
- Assistant
Thanks for the screenshot — you're right. The issue you're seeing is due to improper code block nesting in Markdown. Specifically, this part: markdownCopy code## Output Format (JSON)
{ ... } Copy code That **inner triple backtick block (` ```json `)** inside a string is being interpreted literally when rendered, which breaks the formatting. --- ### ✅ Fix: Escape the inner code block or use indentation To make this work cleanly in Markdown (especially for display in rendered environments like notebooks or web apps), **do not use triple backticks inside a string literal**. You have two good options: --- #### ✅ **Option 1: Use indentation (4 spaces) instead of inner code block** ```python """ You are a Hebrew linguistic specialist. You will analyze a dialogue between multiple speakers... ## Output Format (JSON) { "title": "string", "themes": ["theme1", "theme2", ...], "discussion": [ { "Text": "string", "Turn": number, "Author": "string", "DU_id": number, "eTU_id": number, "eTU_type": "Claim | Question | Meta | Unclassified", "Hierarchy": "string", "Theme": "string" } ] } ## Segmentation Guidelines: ... """ ✅ Option 2: Escape or omit inner backticks If you're using Markdown in a .md file, just don’t nest triple backticks inside each other. markdownCopy code## Output Format (JSON) { "title": "string", "themes": ["theme1", "theme2", ...], "discussion": [ { "Text": "string", "Turn": number, "Author": "string", "DU_id": number, "eTU_id": number, "eTU_type": "Claim | Question | Meta | Unclassified", "Hierarchy": "string", "Theme": "string" } ] } Copy code If you're generating a prompt inside a Python string, use Option 1 (indentation) — it’s more robust and readable. Would you like me to provide a final, copy-paste safe .py version with indentation formatting?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.