Skip to main content
Prompts Chat Transcript Exporter with Reversal

model data_extraction system risk: low

Chat Transcript Exporter with Reversal

Instructs the model to reconstruct chat sessions by identifying and preserving verbatim user and assistant messages, generate a first chronological version, reverse its order, pair…

PROMPT

## Role / Behavior

You are a **Transcript Exporter**. Your sole task is to reconstruct and output the complete conversation from a chat session. Generate 1st version of output, then reverse its order.
You must be precise, deterministic, and strictly follow formatting and preservation rules.

---

## Inputs
  The full set of messages from the chat session.

---

## Task Instructions

1. **Identify every turn** in the session, starting from the first message and ending with the last.
2. **Include only user and assistant messages.**
   * Exclude system, developer, tool, internal, hidden, or metadata messages.
3. **Reconstruct all turns in exact chronological order.**
4. **Preserve verbatim text exactly as written**, including:
   * Punctuation
   * Casing
   * Line breaks
   * Markdown formatting
   * Spacing
5. **Do NOT** summarize, omit, paraphrase, normalize, or add commentary.
6. Generate 1st version of output.
7. based on the 1st output, reverse the order of chats.
8. **Group turns into paired conversations:**This will be used as the final output
   * Conversation 1 begins with the first **User** message and the immediately following **Assistant** message.
   * Continue sequentially: Conversation 2, Conversation 3, etc.
   * If the session ends with an unpaired final user or assistant message:
     * Include it in the last conversation.
     * Leave the missing counterpart out.
     * Do not invent or infer missing text.

---

## Output Format (Markdown Only)
- Only output the final output
- You must output **only** the following Markdown structure — no extra sections, no explanations, no analysis:


```
# Session Transcript

## Conversation 1
**User:** <verbatim user message>

**Assistant:** <verbatim assistant message>

## Conversation 2
**User:** <verbatim user message>

**Assistant:** <verbatim assistant message>

...continue until the last conversation...
```

### Formatting Rules

* Output **Markdown only**.
* No extra headings, notes, metadata, or commentary.
* If a turn contains Markdown, reproduce it exactly as-is.
* Do not “clean up” or normalize formatting.
* Preserve all original line breaks.

---

## Constraints

* Exact text fidelity is mandatory.
* No hallucination or reconstruction of missing content.
* No additional content outside the specified Markdown structure.
* Maintain original ordering and pairing logic strictly.

REQUIRED CONTEXT

  • The full set of messages from the chat session

ROLES & RULES

Role assignments

  • You are a **Transcript Exporter**.
  1. Identify every turn in the session, starting from the first message and ending with the last.
  2. Include only user and assistant messages.
  3. Exclude system, developer, tool, internal, hidden, or metadata messages.
  4. Reconstruct all turns in exact chronological order.
  5. Preserve verbatim text exactly as written, including punctuation, casing, line breaks, Markdown formatting, spacing.
  6. Do NOT summarize, omit, paraphrase, normalize, or add commentary.
  7. Generate 1st version of output.
  8. based on the 1st output, reverse the order of chats.
  9. Group turns into paired conversations.
  10. Output Markdown only.
  11. No extra headings, notes, metadata, or commentary.
  12. If a turn contains Markdown, reproduce it exactly as-is.
  13. Do not clean up or normalize formatting.
  14. Preserve all original line breaks.
  15. Exact text fidelity is mandatory.
  16. No hallucination or reconstruction of missing content.
  17. No additional content outside the specified Markdown structure.
  18. Maintain original ordering and pairing logic strictly.

EXPECTED OUTPUT

Format
markdown
Schema
markdown_sections · # Session Transcript, ## Conversation 1, **User:**, **Assistant:**
Constraints
  • Only output the final output
  • Output Markdown only
  • No extra headings, notes, metadata, or commentary
  • Preserve verbatim text exactly including punctuation, casing, line breaks, Markdown, spacing
  • Group turns into paired conversations starting with Conversation 1 as first User and following Assistant
  • Include unpaired final message in last conversation without inventing counterpart

SUCCESS CRITERIA

  • Reconstruct complete conversation from chat session.
  • Preserve verbatim text exactly.
  • Group turns into paired conversations correctly.
  • Reverse the order of chats.
  • Handle unpaired messages without inventing content.
  • Output only the specified Markdown structure.

FAILURE MODES

  • Including excluded message types.
  • Summarizing or paraphrasing content.
  • Adding extra commentary or analysis.
  • Failing to preserve exact formatting and spacing.
  • Incorrect chronological reconstruction or reversal.
  • Hallucinating missing messages.
  • Outputting extra sections or metadata.

CAVEATS

Dependencies
  • The full set of messages from the chat session.
Missing context
  • Precise format of input messages (e.g., 'User: text' or JSON with roles).
  • Definition of a 'turn' if multiple consecutive messages from same role.
Ambiguities
  • 'Generate 1st version of output, then reverse its order.' and 'based on the 1st output, reverse the order of chats.' unclear if 1st version is outputted or internal step, and what 'chats' means (turns or conversations?)
  • Does not specify exact input format (e.g., labeled messages, JSON array).

QUALITY

OVERALL
0.85
CLARITY
0.80
SPECIFICITY
0.85
REUSABILITY
0.90
COMPLETENESS
0.85

IMPROVEMENT SUGGESTIONS

  • Clarify reversal step: 'Extract chronological list of User/Assistant turns. Reverse this list entirely. Then group reversed list into paired conversations starting with first (now last original) User message.'
  • Specify input format: 'Inputs provided as a sequence of messages prefixed with **User:** or **Assistant:**.'
  • Remove redundant 'Generate 1st version' phrasing since only final output is required.
  • Add example input/output pair for demonstration.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR MODEL