Create Better Formatting Prompts
Step 1: Identify the Formatting Issue
First, recognize when your Agent.ai output needs better formatting. If you’re looking at data that’s hard to read or doesn’t have clear visual organization, it’s time to improve the formatting.Step 2: Ask ChatGPT to Generate a Better Prompt
Take your unformatted output to ChatGPT and ask it to create a prompt specifically designed for better formatting. For example: “I have a list of tweets with data about the tweets, etc. It’s in a raw, non-human readable format. I’d like you to generate a prompt that’ll do two things:- Generate a summary of the tweets
- Return each tweet in a readable form”
Step 3: Use the New Prompt in Agent.ai
ChatGPT will provide you with a more detailed prompt that includes specific formatting instructions. It might look something like: “I have a dataset of tweets in JSON format. Perform the following tasks:- Generate a summary of the tweets
- For each tweet, reformat it so it looks like this: [Example of nicely formatted output]”
Step 4: Run Your Agent with the New Prompt
When you run your agent with the improved prompt, you’ll get much more readable output. For example, instead of jumbled text about tweets, you might get: Summary of tweets: [Clear summary of main topics] Most notable tweet: [Highlighted important tweet] Tweet Details: Date: [Date] Content: [Tweet content] Retweets: [Number] Impressions: [Number]Create Markdown Tables
Step 1: Set Up Your Agent’s Data Collection
First, create an agent that collects the data you want to display. For example, you could create a news agent that:- Takes a topic as input
- Uses an API (like Google News) to fetch relevant articles
- Stores the results in a variable
Step 2: Add a Formatting Action
After collecting your data, add a new action that will format the results into a markdown table:- Create a new action in your agent workflow
- Use the following prompt structure to instruct the AI to create a markdown table: Format the following [data type] into a markdown table. The table should include the following columns: [list your columns] Ensure the output is properly formatted for markdown rendering and all links are properly formatted using markdown syntax.
Format the following JSON list into a markdown table. The table should include the following columns: Title, Source, and Link Ensure the output is properly formatted for markdown rendering and all links are properly formatted using markdown syntax.
Step 3: Configure the Output Format
When setting up your final response:- Pass the formatted markdown table to your output
- In the output settings, select “Format as Markdown” to ensure proper rendering
Create Interactive HTML Output
Structuring Your Content
When designing an agent that outputs HTML, it’s important to define a consistent structure. Common sections for informational agents might include:- Overview
- Financials
- Products
- Competitors
- News
- Additional Resources
Engineering the HTML Prompt
To generate HTML, add a final instruction asking the agent to format the response accordingly. Example prompt:“Format the response as a complete HTML document. Include a Table of Contents linking to each section (Overview, Financials, Products, Competitors, News, Additional Resources). Organize the information with clear headings, bullet points, and tables where appropriate.”You can instruct the agent to create anchor links for navigation and use lightweight formatting for better readability. At the end of the prompt, add:
“Format the response as HTML.”This tells Agent.ai to render the final output as HTML rather than plain text.
Best Practices
- Use section headers (<h2>, <h3>) to organize information.
- Add anchor links (<a href=“#section-id”>) for easier navigation.
- Use tables for structured data like financials or product comparisons.
- Keep formatting lightweight and focused on clarity.