I'll show you a few common ways to format hierarchical comments, using a simple Hacker News-style conversation example.
Original conversation structure:
Root Comment
├─ Reply 1
│ ├─ Reply 1.1
│ └─ Reply 1.2
└─ Reply 2
Here are different notation approaches:
- Indentation with dashes:
User1: This new AI model seems promising
- User2: Have you tested its performance?
-- User3: I ran some benchmarks, it's 20% faster
-- User4: What hardware did you use?
- User5: The documentation needs work though
- Markdown-style quotes with depth:
User1: This new AI model seems promising
> User2: Have you tested its performance?
>> User3: I ran some benchmarks, it's 20% faster
>> User4: What hardware did you use?
> User5: The documentation needs work though
- Nested JSON-like format:
{
"User1": "This new AI model seems promising",
"replies": [
{
"User2": "Have you tested its performance?",
"replies": [
{"User3": "I ran some benchmarks, it's 20% faster"},
{"User4": "What hardware did you use?"}
]
},
{"User5": "The documentation needs work though"}
]
}
- Parent-reference notation:
[1] User1: This new AI model seems promising
[2] User2 (reply to 1): Have you tested its performance?
[3] User3 (reply to 2): I ran some benchmarks, it's 20% faster
[4] User4 (reply to 2): What hardware did you use?
[5] User5 (reply to 1): The documentation needs work though
- Tree-style ASCII:
User1: This new AI model seems promising
├── User2: Have you tested its performance?
│ ├── User3: I ran some benchmarks, it's 20% faster
│ └── User4: What hardware did you use?
└── User5: The documentation needs work though
Each format has its advantages:
- Indentation with dashes: Simple, easy to read, works well for shallow hierarchies
- Markdown quotes: Familiar to many users, clear visual hierarchy
- JSON-like: Structured, machine-readable, good for programmatic processing
- Parent-reference: Linear, easy to process, maintains relationship clarity
- ASCII tree: Very visual, clear hierarchy, but can be harder to parse
For LLMs, the simpler formats (indentation with dashes or markdown quotes) often work best because:
- They're more similar to natural language formatting
- They take up less token space
- They're easier for the model to understand and maintain context
Example prompt using indentation:
Below is a conversation thread. Please summarize the main points while maintaining the discussion structure:
User1: This new AI model seems promising
- User2: Have you tested its performance?
-- User3: I ran some benchmarks, it's 20% faster
-- User4: What hardware did you use?
- User5: The documentation needs work though
This format is clear enough for the LLM to understand the hierarchy while being concise and natural.