Skip to main content

Output Formatters & Templates

Context: Use these templates to force the LLM to output structured data that can be parsed by code or easily pasted into other tools.

📄 JSON Enforcers

Generic JSON

Output the result ONLY as valid JSON. Do not include any markdown formatting (like \`\`\`json). The format should be:
\{
\"summary\": \"string\",
\"items\": [
\{ \"id\": 1, \"content\": \"string\" \}
]
\}

Strict Schema

You are an API that returns comprehensive user profiles.
Output JSON:
\{
\"user\": \{
\"firstName\": \"String\",
\"lastName\": \"String\",
\"attributes\": \{
\"skills\": [\"Array of Strings\"]
\}
\}
\}

📊 Markdown Tables

Format the comparison as a Markdown table.
Columns: [Strategy Name] | [Pros] | [Cons] | [Estimated Cost] | [Time to Implement]

💻 Code Blocks

Provide the solution as a single Python script.
- Use \`argparse\` for input.
- Include docstrings for every function.
- Wrap the code in a standard markdown block: \`\`\`python ... \`\`\`

📈 Mermaid Diagrams

Flowchart

Generate a Mermaid JS flowchart describing the user login process.
Start with \`graph TD\`.
Include nodes for: Login Page, Auth Service, Database, Error Handling.

Sequence Diagram

Generate a Mermaid JS sequence diagram for a Payment System.
Participants: User, WebApp, StripeAPI, Database.
Show the happy path only.

📝 CSV Format

Output the list of leads as CSV data, ready to be pasted into Excel.
Headers: Name, Company, Email, LinkedIn URL
No other text.