Skip to main content

How to use structured formats

  1. Provide a template or example output.
  2. Use clear delimiters and labels. For example, label sections and use delimiters to separate different parts of the response.
  3. Use formatting conventions. For example, “generate a Markdown-formatted summary with headings and bullet points”.

Common structured formats

  • JSON/XML: Ideal for data interchange between systems.
  • Bullet points/lists: Useful for summaries or step-by-step instructions.
  • Tables: Great for comparing data or presenting multiple related items.
  • Headings and subheadings: Organizes content for readability, especially in longer texts.
  • Custom templates: Tailored formats specific to your application’s needs.

Examples

A structured format allows the support team quickly identify the issue category (Billing), prioritize the request (High), and provides a ready-to-send response.Prompt:
Based on the customer's query, generate a response in the following format:  Issue Category: [Billing/Technical Support/General Inquiry] Priority Level: [High/Medium/Low] Suggested Response: [Your response to the customer]  Customer query: I was charged twice for my subscription this month. Can you help fix this? 
By specifying CSV format, the extracted data can be directly imported into databases or spreadsheets, saving time on data entry.Prompt:
Extract the following information from the email and present it in CSV format:  - First Name - Last Name - Email Address - Company Name  Email: Hello, my name is Maria Gonzalez from Tech Innovators. You can reach me at maria.gonzalez@techinnovators.com. 
The structured prompt ensures all key marketing elements are included.Prompt:
Create a social media post promoting our new product using this structure:  Headline: Catchy headline Body: Brief description (50 words max) Call to Action: Encouraging users to visit our website Hashtags: Include relevant hashtags  Product: UltraBoost Wireless Earbuds 
The structured outputs help healthcare professionals quickly review critical patient information.Prompt:
Summarize the patient's medical report using the following template:  Patient Name: [Name] Age: [Age] Diagnosis: [Diagnosis] Prescribed Treatment: [Treatment Plan] Follow-Up Instructions: [Instructions]  Medical Report: [Insert detailed medical report here] 

Tips for effective structured formatting

  • Choose straightforward formats that the model can easily replicate.
  • Experiment with different prompts and refine them based on the model’s outputs.
  • Include any necessary background information to aid model understanding.
  • Implement checks to validate that the responses meet your format requirements.

Additional questions or feedback? Reach out to help@helicone.ai or schedule a call with us.
⌘I