Urgent.News

What's breaking now, across thousands of outlets.

Tech

Designing a Prompt Contract for a Photo-to-Coloring-Page App

A photo-to-coloring-page feature sounds like a small image-generation task: send a photo, ask for outlines, and return an image. The more interesting engineering problem is defining what the output is allowed to change. Should a cartoon style add more detail? Should tracing use solid outlines? Can an optional text field override the requirement for a printable page? This case study uses the…

The article discusses the engineering challenges of designing a prompt contract for a photo-to-coloring-page app, using the Picture To Coloring Page project as a concrete example. It highlights the importance of separating different controls, such as art style, shape language, line rules, and detail level, to avoid conflicts in the generated output.

The author emphasizes the need to make exceptions explicit, such as handling tracing styles differently from ordinary coloring output, to ensure the model follows the desired instructions. The article also emphasizes the role of the reference photo in guiding the output, preserving the subject's identity and composition while allowing style to simplify or exaggerate forms.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Reverse-engineering the Telebirr receipt QR code

A customer holds up their phone at a shop counter in Addis. On the screen is a Telebirr receipt, and in the corner is a small square labelled Payment QR Code .

  • Telebirr receipt QR code decoded from base64 to ASCII hex characters
  • Transaction number hidden within larger hex value in TLV format
  • Python script used to decode QR code and validate transaction number and CRC

Don't write the prompt. Get interviewed

Everyone teaches you to write prompts. In practice, a person looks at a sample a couple of pages long, with a stack, constraints, formats and edge cases, and closes the tab: there's no way I'll write…

  • Instead of writing prompts, conduct an interview with the agent.
  • Ask targeted questions about system behavior and decision limits.
  • Use interview insights to construct the final prompt.

More from Thursday 22 October →