DEV Community

Cover image for Advent of AI 2025 - Day 8: Messy Data to Structured Output
Nick Taylor
Nick Taylor Subscriber

Posted on

Advent of AI 2025 - Day 8: Messy Data to Structured Output

I've edited this post, but AI helped. These are meant to be quick posts related to the Advent of AI. I don't have time if I'm doing one of these each day to spend a couple hours on a post. ๐Ÿ˜…

The advent of AI series leverages Goose, an open source AI agent. If you've never heard of it, check it out!

GitHub logo block / goose

an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM

goose

a local, extensible, open source AI agent that automates engineering tasks

Discord CI

goose is your on-machine AI agent, capable of automating complex development tasks from start to finish. More than just code suggestions, goose can build entire projects from scratch, write and execute code, debug failures, orchestrate workflows, and interact with external APIs - autonomously.

Whether you're prototyping an idea, refining existing code, or managing intricate engineering pipelines, goose adapts to your workflow and executes tasks with precision.

Designed for maximum flexibility, goose works with any LLM and supports multi-model configuration to optimize performance and cost, seamlessly integrates with MCP servers, and is available as both a desktop app as well as CLI - making it the ultimate AI assistant for developers who want to move faster and focus on innovation.

Watch the video

Quick Links

Need Help?

โ€ฆ

Day 8: Structured Data is All About Examples

For Day 8 of Advent of AI, I tackled the classic "messy napkin notes" problem. Don't know if it's classic but it's definitely classic Advent of Ai 2025 classic. The festival coordinator Dmitri had a vendor list scribbled on a coffee-stained napkin, and I needed to turn it into structured JSON, then a fully styled HTML site.

This challenge was easier than some of the previous days, but it highlighted an important lesson: when working with AI to generate structured data, good examples are everything.

The Messy Vendor List

Here's what I was working with:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘          DMITRI'S NAPKIN NOTES (with stains!)            โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  Joes hot cocoa - main plaza - hot drinks & pastries     โ•‘
โ•‘  TACO TRUCK DEL FUEGO!!! north entrance mexican food     โ•‘
โ•‘  sweet treats bakery, near the ice rink... cookies       โ•‘
โ•‘  Pierogi Palace - east side - polish food                โ•‘
โ•‘  Waffle Wonderland next to storytelling tent WAFFLES     โ•‘
โ•‘  mamas meatballs - food court area - italian             โ•‘
โ•‘  The Pretzel Pretender - west plaza - pretzels           โ•‘
โ•‘  Curry in a Hurry mobile cart roams around               โ•‘
โ•‘  Sushi on Ice - near skating rink - sushi                โ•‘
โ•‘  PIZZA PALACE - main stage area - pizza slices           โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
Enter fullscreen mode Exit fullscreen mode

All caps, inconsistent capitalization, coffee stains, and wildly varying formatting. Perfect.

The Key: Show, Don't Tell

Instead of trying to explain in words how I wanted the JSON structured, I gave Goose one solid example:

{
  "vendors": [
    {
      "name": "Joe's Hot Cocoa",
      "location": "Main Plaza",
      "cuisine": "Hot drinks & pastries"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

That single example showed Goose exactly what I wanted:

  • Proper name capitalization (title case with apostrophes handled correctly)
  • Location formatting (major words capitalized, "the" stays lowercase)
  • When to include cuisine vs when to omit it

The result? Goose nailed the structured data on the first try. All ten vendors properly formatted, with "Curry in a Hurry" correctly having no cuisine field since it wasn't in the napkin notes.

From Console to Beautiful Website

Once I had the structured JSON, I asked Goose to update the TypeScript script to generate an HTML page with light and dark theme support. I pointed it to the styling from my Day 4 winter festival site as reference.

Goose created a complete page with:

  • Light/dark theme toggle that persists in localStorage
  • Animated snowflakes with wind drift
  • Responsive vendor cards with cuisine-specific emoji
  • Structured data (Schema.org JSON-LD) for SEO
  • Scroll progress bar and smooth animations

Everything styled with the same winter festival aesthetic from Day 4.

deployed site

The Netlify MCP Deploy

Here's where it got really smooth. Instead of manually deploying, I used the Netlify MCP server in Goose. One prompt to deploy and live!

The site is available at https://winter-festival-nickyt.netlify.app within seconds.

Note this works really well with the Vercel MCP server as well.

Why This Worked So Well

Three things made Day 8 surprisingly smooth:

1. Concrete examples beat abstract descriptions every time. Instead of explaining "capitalize proper nouns but leave articles lowercase," I just showed one formatted entry and let Goose figure out the pattern.

2. Reference existing work when possible. Pointing Goose to my Day 4 styling meant I didn't need to describe what "winter festival themed" meant. It could see it.

3. MCP servers are useful. The Netlify MCP integration turned a multi-step deploy process into a single command. No leaving the terminal, no manual uploads, just "deploy this."

The Full Flow

Here's what the actual workflow looked like:

# Initial structured data generation
User: Take this messy vendor list and structure it as JSON...
Goose: *creates vendors.json with proper formatting*

# Refinement
User: If there's no cuisine, omit the property entirely
Goose: *updates JSON to skip empty fields*

# HTML generation and deploy
User: Update the script to generate an HTML page with theme toggle. 
      Look at ../day-4/index.html for styling. Deploy with Netlify MCP.
Goose: *generates full HTML, uploads to Netlify*
Enter fullscreen mode Exit fullscreen mode

The whole thing took maybe 15 minutes.

What I Shipped

Everything's in my repo's day-8 folder:

GitHub logo nickytonline / advent-of-ai-2025

Advent of AI 2025 for nickytonline

Fortune Teller Output

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                                                                              โ•‘
โ•‘ ๐Ÿ”ฎ FORTUNE TELLER EXTRAORDINAIRE ๐Ÿ”ฎ                                            โ•‘
โ•‘                                                                              โ•‘
โ•‘ Your sarcastic fortune awaits...                                             โ•‘
โ•‘                                                                              โ•‘
โ•‘ "A mysterious stranger will enter your life soon. They'll probably want to borrow money." โ•‘
โ•‘                                                                              โ•‘
โ•‘                                                                              โ•‘
โ•‘ โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ โ•‘
โ•‘                                                                              โ•‘
โ•‘            โ•ญโ”€โ•ฎ                                                               โ•‘
โ•‘           (โ—”_โ—”)                                                              โ•‘
โ•‘          โ•ฑ     โ•ฒ                                                             โ•‘
โ•‘         โ•ฑ  ~~~  โ•ฒ                                                            โ•‘
โ•‘        โ•ฑ    ๐ŸŽฉ   โ•ฒ                                                            โ•‘
โ•‘       โ•ฑ___________โ•ฒ                                                          โ•‘
โ•‘          โ”‚ โ”‚ โ”‚ โ”‚                                                             โ•‘
โ•‘         โ•ฑโ•ฑ โ•ฑโ•ฑ โ•ฑโ•ฑ โ•ฑโ•ฑ                                                          โ•‘
โ•‘                                                                              โ•‘
โ•‘     "Honk honk, here's your                                                  โ•‘
โ•‘      'wonderful' fortune..."                                                 โ•‘
โ•‘                                                                              โ•‘
โ•‘                                                                              โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Wrapping Up

When you need AI to generate structured data, skip the long-winded explanations. Give it one or more good examples that shows exactly what you want. The pattern recognition in modern LLMs is really good at "oh, I see what you want" when you show rather than tell.

And if you're using Goose, definitely explore the MCP ecosystem. Having tools like Netlify available directly in your agent makes workflows way smoother than jumping between tools.

If you want to stay in touch, all my socials are on nickyt.online.

Until the next one!

Photo by Martijn Baudoin on Unsplash

Top comments (1)

Collapse
 
spo0q profile image
spO0q

I had quite the same experience recently, and realized I was losing my time explaining complicated structures while I could provide a short example instead.

It's less prone to errors and AI is really good at formatting.