Context and constraints at PMG's Pinterest hackathon
Preserving product fidelity while adapting ad creatives to Pinterest trends at PMG's hackathon.
At the beginning of June, I joined PMG's hackathon in Breckenridge, Colorado, working alongside Pinterest partners who were embedded directly on our team from day one.
The best part was the people — the long build sessions and the conversations during the breaks. The surprise was how much it reminded me of a hackathon I participated in last year with Google. On the surface, the two projects were opposites. Last year, the goal was to swap the product while preserving the scene. This year, it was to preserve the product while adapting the scene around Pinterest trends. Different direction. Same challenge.
In both cases, the hard problem wasn't image generation. It was defining what could change, what couldn't, and how to enforce those boundaries.
For the Pinterest project, our team built a system that takes an existing ad creative and reimagines it around Pinterest trends while preserving the product itself — a challenge that sounds straightforward until you start defining what "preserving the product" actually means.
Every generation had to balance multiple sources of truth: what was present in the original creative, which objects belonged to the brand and could never change, Pinterest best practices, and the trend we were adapting to.
One lesson stood out: we didn't trust the LLM to write the final generation prompt. The model could propose ideas. The system enforced the rules. The final prompts were assembled by code and wrapped in constraints designed to preserve product fidelity while allowing the surrounding scene to change.
Our team won "Most Innovative," and I was named the team's MVP. None of it was solo. The team: Avery Comer, Bo Arnold, Caroline Schafer, Jaiden Ritter, Prem Kumar Rasakonda, Tanishka Shah, and Vitaly Iskrin. And our Pinterest partners: Haley Hash and Madison Doerr.
The more I work with generative AI systems, the more I come back to the same conclusion: Generating content is a commodity. Defining the context, constraints, and invariants that make that content trustworthy is where the real engineering happens.
#PMGHackathon #AIEngineering #ContextEngineering #EngineeredForImpact #BuildWithAlli


