promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_

Prompting for real output — composition, control, and the eight knobs that matter — step 8 of 8

Checkpoint

One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.

Final image drill. Reuse score_image_prompt and write rank_prompts(prompts) that takes a dict of {id: prompt_string} and returns a list of (id, score) tuples sorted by score DESCENDING, ties broken by id ASCENDING (so the result is deterministic).

Five prompts run, ranging from "a girl with red hair" (zero knobs) to a full 8-knob prompt. Expected output:

P5: score=8
P4: score=7
P3: score=5
P2: score=3
P1: score=0

full-screen editor opens — close anytime to keep reading.