Testing Prompt Optimization Built Up 1–2 Years Ago Through Small Experiments
Back to TopTo reach a broader audience, this article has been translated from Japanese.
You can find the original version here.
This is the Day 4 article of the Mamezou Developer Site Advent Calendar 2026.
1. Background and Challenge | Models Have Evolved. What Should We Do with Our Internal Prompt Collection?
#One or two years ago, some of you may have created internal prompt guides and prompt collections alongside the introduction of generative AI. Each time the models of that era overlooked an item, you added a cautionary note; each time the output broke down, you added examples or verification procedures. In this way, you eventually created a prompt that could finally be used reliably.
When you update the model, a question suddenly arises: “Is this sentence still necessary?” Removing it makes the prompt shorter, but comparing many outputs to make sure past failures do not recur requires human effort. Since the current guide is still getting the job done, reviews tend to be postponed.
For agent skills, Anthropic distinguishes between those that compensate for tasks models struggle with and those that communicate team-specific procedures and decision criteria. Whether the need for the former has diminished along with model advances can be verified through evaluation. The same question seems applicable to internal prompts. Operations that older models repeatedly got wrong may be omitted with newer models. On the other hand, we still need to communicate what kinds of results are usable in our own business. Anthropic, “Two kinds of skills” in “Improving skill-creator”
2. Solution and Motivation | Using Scores to Decide the Next Instruction to Try
#I referred to Pattern 20, “Prompt Optimization,” in Chapter 6 of 『生成AIデザインパターン』. There are also libraries that can be used to try this pattern.[1] What I wanted to know was which exact sentences had been changed and which parts of the output had changed as a result. I also wanted to track what was tried next after observing those changes. Therefore, I built a small experiment myself where changes before and after could be followed visually. O'Reilly Japan, 『生成AIデザインパターン』
The subject is a single scene: “a park in a residential neighborhood lit by the morning sun.” I have a generative model draw the park as SVG and turn it into a 600×400-pixel image. The evaluator scores the image and returns the reasons for its score. The optimizer reads the current prompt and the scoring reasons, then proposes one change to try next. Drawing again with the modified instructions lets us check how the intended parts changed.
3. Experimental Environment
#This experiment assumes a situation where prompts that were heavily refined for models one or two years ago are reviewed after a model update. For example, GPT-4o (May) and Claude 3.5 Sonnet (June) were released in 2024. Claude 3.7 Sonnet (February), GPT-4.1 (April), and Claude Sonnet 4 (May) were released in 2025.[2] Are the instructions added at that time while examining outputs still necessary today?
To reproduce the prompt refinement done at the time, I used a local LLM with thinking disabled as the old model (Qwen3.6-35B-A3B). For the “new model,” I used GPT-6.2 Sol, OpenAI’s latest generation at the time of writing, released in November 2026. OpenAI’s announcement of GPT-6.2 Sol
First, I had the old model draw the park and added instructions while looking at the parts it failed to draw well. I then gave this detailed version to the new model and compared images using the same scoring criteria to investigate which instructions could be omitted while maintaining quality.
3-1. Experimental Method | Putting a Swing and a Bench into One Image
#The subject chosen was a swing and bench in an empty park. Both are familiar sights, but trying to explain them using words alone to someone who does not know their shapes is surprisingly difficult.
For a swing, two ropes extending from a crossbeam support a single seat board, and the seat needs space to swing forward and backward. For a bench, the backrest, seat, and legs must connect, and it needs to appear stable on the ground even when someone sits on it. Furthermore, beneath the same morning sunlight, the empty swing has a lingering sense of motion, while the bench beside it sits quietly in place. This subject lets us visually verify the effects of changing instructions, from the connections among parts to the impression created by the entire image.
The image below was generated by asking the old model to draw a park with a swing and a bench using a 244-character instruction. In the swing on the left, the two suspension ropes converge at a single point above. The brown horizontal bar below is also difficult to distinguish as either the seat board for a person to sit on or a component connecting the left and right supports.
I therefore added instructions specifying where on the crossbeam to hang the two ropes and how their ends should support the left and right sides of a single seat board. In this way, instructions compensate one by one for problems that become apparent only after seeing the image. This time, I use the old model to reproduce the process of heavily refining a prompt one or two years ago.
3-2. Experimental Procedure | Add Instructions with the Old Model, Remove Them with the New Model
#-
Detailing | Create a detailed version with the old model. Start with short instructions and add production instructions for parts that were not drawn successfully.
-
Evaluation 1 | Verify the effect of the additions. Draw three new images with the detailed version and compare them with the initial image. If all three pass, carry that detailed version over to the new model.
-
Simplification | Try shortening candidates with the new model. First, draw one park image with the detailed version and score it. Next, draw one image at a time with candidates that remove parts of the production instructions. Check whether each candidate image passed and how its total score changed compared with the detailed version, then decide what to remove next.
-
Evaluation 2 | Verify whether quality can be maintained after shortening. Draw three new images each with the shortest proposal selected based on the scores and with the original detailed version. If all three images from the shortened version pass and its average score is at least as high as the detailed version, conclude that quality was maintained under these conditions.
The procedure for this experiment. Verify the effect of detailed instructions with the old model, then compare quality when instructions are reduced with the new model.
3-3. Evaluation Method | Separating “Pass” from “Quality of Passing Images”
#The evaluator received the scene specification and image, while the prompt used and version name were withheld. The following five criteria are scored from 1 to 5 points each. Generation, scoring, and revision with the new model each called the same GPT-6.2 Sol separately.
| Evaluation criterion | Guideline for a score of 3 |
|---|---|
| Swing support | The board a person sits on is identifiable, and its support can be traced through the ropes and crossbeam to the supports standing on the ground. |
| Bench support | There is a seat on which a person can sit, and the legs supporting it touch the ground. |
| Light and shadows | Components and cast shadows correspond, and each left and right rope shadow can be traced from the crossbeam shadow to the seat-board shadow. |
| Composition and negative space | The swing and bench are naturally arranged within the same park. |
| Artistry | The colors, lines, and shapes are cohesive. A score of 5 is given if the motion of the swing and stillness of the bench are also conveyed symbolically. |
An image passes if it scores at least 3 points in every criterion. If even one criterion is 2 points or lower, the image fails even if the other criteria score highly. The quality of images that pass is compared using the total score across the five criteria, out of 25 points.
4. Experimental Results | Which Parts of the Image Changed When Instructions Were Removed?
#4-1. Preparation | Refining the Prompt with the Old Model
#In the initial image generated by the old model, the swing’s suspension ropes converge at a single point above, making it difficult to distinguish the seat board from the horizontal support bar.
I therefore specified the thickness and connection positions of the seat board, as well as the order in which the bench components should be layered. To make the left and right rope shadows cast on the ground distinguishable as well, I included an SVG code example that connects the crossbeam shadow and the seat-board shadow with two thin lines. After fixing the wording and drawing three new images under conditions not used for revision, each left and right rope shadow became traceable. The three verification images scored 16, 17, and 18 points, and all passed.
As images, there are also parts that may look odd at first glance. Please overlook those for now, and focus on whether the left and right rope shadows can each be traced.
Excluding line breaks, the prompt grew from 244 characters initially to 3,665 characters after refinement (about 15 times the initial length).
Reference: Prompt before revision (initial generation, 244 characters)
Please draw a park in a residential neighborhood lit by the morning sun. Create a single image in which a swing and a bench appear to be part of the same park scene. Use light, shadows, and negative space appropriate to the scene to compose the image. Return only standalone SVG code at 600 px wide by 400 px high.
1. Decide the extent of the ground and the placement of negative space. 2. Place the swing and bench on the same ground, and determine their relative size and depth. 3. Determine how light falls based on the scene specification, and apply it to both objects and the ground. 4. Confirm that the two objects are distinguishable and can be read as a single landscape before outputting the SVG.
Reference: Prompt after revision (final adopted version, 3,665 characters)
Save the entire response exactly as the contents of a file named park.svg. Make the first character <, begin with <svg xmlns="http://www.w3.org/2000/svg", and end with </svg>. Do not include Markdown backticks or explanatory text in the file.
Please draw an empty park in a residential neighborhood, with morning sun shining from beyond the houses. Two ropes extend from a crossbeam supported by wooden posts, and a thick, single wooden seat board with visible grain hangs from their ends. The seat board has the width and depth for one person to sit on and swings slightly forward from directly beneath the crossbeam. The taut ropes tilt in the same direction, creating a lingering sense of motion in the empty swing. Beside a park path, slightly away from the swing’s range of motion, is an unoccupied wooden bench. Morning sunlight illuminates the grain of the long seat board and its worn, rounded edges, while narrow shadows fall at the legs. Leave negative space between the swing and bench, and create a symbolic single image that conveys the motion of the swing and stillness of the bench within one landscape illuminated by the same morning sunlight. Return only standalone SVG code at 600 px wide by 400 px high.
Production procedure. Build using screen coordinates based on 600×400. The coordinates are guidelines to avoid drawing connections incorrectly and may be adjusted within a range where the two objects remain easy to see.
1. Place the horizon approximately at y=220, and draw the roofs of distant homes, gentle trees, the morning sky, and lawn extending toward the foreground in pale areas. A narrow path continues from the bottom of the screen, between the swing and bench, into the distance. Leave negative space in the background.
2. Swing on the left. Draw the crossbeam as one horizontal <path> from (110,148) to (270,148), with the coordinates consolidated in d. An example is <path d="M110 148H270" fill="none" stroke="#5F9EA0" stroke-width="4"/>. Extend legs from the left end to (82,308) and (128,292), and from the right end to (241,308) and (288,292). Use the same points for the crossbeam and leg ends. The two suspension ropes run from (153,148) to (165,250), and from (218,148) to (230,250). Place the upper edge of the seat board between (151,250) and (240,250), and connect it to another edge slightly in front to draw the top surface and thickness of the board. Add small fasteners to both ends of the ropes and wood grain to the seat board.
3. Bench on the right. As continuous components, determine the positions of the seat, backrest, and legs from the same coordinates. Draw the top of the seat with four points, (366,267), (486,247), (520,269), and (399,291), and the thin front side with (399,291), (520,269), (520,275), and (399,297). Run the two rear posts from (373,270) to (374,204), and from (486,251) to (488,184), all the way behind the seat. Draw the backrest using four points, (363,213), (497,190), (496,213), and (362,236), layered in front of the two posts. The front legs have upper ends at (406,295) and (508,275), and the rear legs at (373,267) and (485,250); layer each over the seat before extending it down to the ground. For example, the front feet are at (399,328) and (505,307), and the rear feet at (368,301) and (481,276). Layer in the order of legs/posts, seat, and backrest so that the posts appear uninterrupted from directly below the backrest to the seat. Add a little wood grain to the seat and backrest with thin lines.
4. Make upper surfaces bright and wooden side surfaces dark under morning sunlight from the upper left. If drawing the sun, place it in the upper left of the screen. After drawing the grass and path on the ground and before drawing the swing and bench bodies, layer the cast shadows as shadows on the ground falling toward the lower right from morning sunlight in the upper left. Make the swing support shadows four independent <line> elements extending from each foot toward the lower right, and be sure to include them as actually rendered elements at the beginning of the <g> in the following SVG fragment. For the starting points (x1, y1) of the four lines, use the same coordinates as the ground contact points of their corresponding physical supports. If you adjust the coordinates of the actual feet, use the same coordinates for the shadow starting points. Extend the four lines to (151,328), (197,312), (310,328), and (357,312), respectively, with a stroke width of 2–3 px. Ensure enough contrast to visually trace each line from its foot to its endpoint, including where it overlaps grass or the path. Within the same <g>, following the four support-shadow lines, place three independent <line> elements in order for the crossbeam, left rope, and right rope, then draw the seat-board shadow as one <polygon>. Render all seven lines and one seat-board surface in the following SVG fragment.
<g id="swing-shadow">
<line x1="82" y1="308" x2="151" y2="328" stroke="#53674F" stroke-width="2.5" stroke-linecap="round"/>
<line x1="128" y1="292" x2="197" y2="312" stroke="#53674F" stroke-width="2.5" stroke-linecap="round"/>
<line x1="241" y1="308" x2="310" y2="328" stroke="#53674F" stroke-width="2.5" stroke-linecap="round"/>
<line x1="288" y1="292" x2="357" y2="312" stroke="#53674F" stroke-width="2.5" stroke-linecap="round"/>
<line x1="151" y1="328" x2="310" y2="328" stroke="#53674F" stroke-width="2.5" stroke-linecap="round"/>
<line x1="194" y1="328" x2="174" y2="360" stroke="#4C6048" stroke-width="3" stroke-linecap="round"/>
<line x1="259" y1="328" x2="239" y2="360" stroke="#4C6048" stroke-width="3" stroke-linecap="round"/>
<polygon points="168,360 258,360 268,368 177,368" fill="#71836B"/>
</g>
The horizontal crossbeam-shadow line connects the ends of the shadows from the two front supports. Leave a vertical gap of 32 px between the crossbeam shadow at y=328 and the rear edge of the seat-board shadow at y=360. Extend the left and right rope shadows 20 px left and 32 px down from the crossbeam shadow, respectively, connecting them without interruption to the rear edge of the seat-board shadow. Draw both rope shadows in dark sage with a stroke width of 3 px. Make the grass and path overlapped by the lines lighter than the lines, and ensure enough contrast to trace each of the left and right lines visually from start to finish, including where the right rope shadow passes along the path. For the bench as well, extend one thin line from the foot of each leg toward the lower right. Examples connect (399,328)→(444,340), (505,307)→(550,319), (368,301)→(413,313), and (481,276)→(526,288). Place the bench-seat shadow as a pale quadrilateral following the four edges of the seat top, shifted onto the ground toward the lower right and separated from the body and leg shadows. For example, connect (428,348), (548,328), (582,350), and (461,372). Before outputting, verify that the shadow group contains seven independent <line> elements—the four supports plus the crossbeam, left rope, and right rope—and one <polygon> surface for the seat board. For each of the four support cast shadows, compare the starting point (x1, y1) with the coordinates of the corresponding physical support foot and verify that both x and y exactly match. Verify that the two ropes each touch the crossbeam and the rear edge of the seat board. Make ground contact dark and extending shadows pale. Use sage green for the lawn, ecru for morning light, golden brown for wood, and blue-green for supports; draw the background houses and trees more lightly than the main subjects. Show the contrast between the stationary bench and swinging seat board.
Depict soft morning light across the entire image. Transition the sky from bluish above to pale gold near the horizon, and the lawn from misty pale green in the distance to bluish green at the bottom of the screen. Add thin warm-colored edges to upper-left surfaces of the playground equipment, and darken lower-right sides. Draw the path and background with soft color areas, leaving the clearest light-dark contrast for the outlines of the swing and bench.
5. Write each attribute only once within an element. Verify the corresponding tags and the four connection points of the suspension ropes. The first character of the output must be <, and the last character must be >. Return only the SVG body.
4-2. Main Experiment | How Far Can Instructions Be Reduced with the New Model?
#There are countless ways to shorten a prompt, so this time I conducted two experiments using the same detailed version as the starting point but different methods. In Experiment 1, I omitted SVG code examples for drawing bench coordinates and shadows, reducing the prompt by 1,963 characters (53.6%). In Experiment 2, I retained the description of the desired scene while reducing the production instructions one sentence at a time, reducing the prompt by 2,896 characters (79.0%).
| Experiment | Character count (detailed → shortened) | Three detailed-version images (average) | Three shortened-version images (average) | Passing shortened-version images |
|---|---|---|---|---|
| Experiment 1 | 3,665 → 1,702 | 21, 19, 20 points (20 points) | 20, 21, 19 points (20 points) | 3/3 |
| Experiment 2 | 3,665 → 769 | 19, 19, 19 points (19 points) | 21, 20, 20 points (20.33 points) | 3/3 |
The character counts in the table exclude line breaks. Scores are out of 25 points, and all three detailed-version images passed in both experiments.
The version shortened by 53.6% had the same average score as the detailed version. The version shortened by 79.0% also retained in words where to connect the left and right ropes to the seat board and how far to trace the two shadows falling on the ground, exceeding that run’s detailed version by an average of 1.33 points. In other words, in this park, both the roughly half-reduced version and the roughly 80%-reduced version met the quality-maintenance conditions across all three shortened images. Because the scores of the detailed version also varied across runs, this comparison cannot determine whether shorter prompts produce higher scores.
Reference: Prompt adopted in Experiment 1 (1,702 characters excluding line breaks)
Save the entire response exactly as the contents of a file named park.svg. Make the first character <, begin with <svg xmlns="http://www.w3.org/2000/svg", and end with </svg>. Do not include Markdown backticks or explanatory text in the file.
Please draw an empty park in a residential neighborhood, with morning sun shining from beyond the houses. Two ropes extend from a crossbeam supported by wooden posts, and a thick, single wooden seat board with visible grain hangs from their ends. The seat board has the width and depth for one person to sit on and swings slightly forward from directly beneath the crossbeam. The taut ropes tilt in the same direction, creating a lingering sense of motion in the empty swing. Beside a park path, slightly away from the swing’s range of motion, is an unoccupied wooden bench. Morning sunlight illuminates the grain of the long seat board and its worn, rounded edges, while narrow shadows fall at the legs. Leave negative space between the swing and bench, and create a symbolic single image that conveys the motion of the swing and stillness of the bench within one landscape illuminated by the same morning sunlight. Return only standalone SVG code at 600 px wide by 400 px high.
Production procedure. Build using screen coordinates based on 600×400. The coordinates are guidelines to avoid drawing connections incorrectly and may be adjusted within a range where the two objects remain easy to see.
1. Place the horizon approximately at y=220, and draw the roofs of distant homes, gentle trees, the morning sky, and lawn extending toward the foreground in pale areas. A narrow path continues from the bottom of the screen, between the swing and bench, into the distance. Leave negative space in the background.
2. Swing on the left. Draw the crossbeam as one horizontal <path> from (110,148) to (270,148), with the coordinates consolidated in d. An example is <path d="M110 148H270" fill="none" stroke="#5F9EA0" stroke-width="4"/>. Extend legs from the left end to (82,308) and (128,292), and from the right end to (241,308) and (288,292). Use the same points for the crossbeam and leg ends. The two suspension ropes run from (153,148) to (165,250), and from (218,148) to (230,250). Place the upper edge of the seat board between (151,250) and (240,250), and connect it to another edge slightly in front to draw the top surface and thickness of the board. Add small fasteners to both ends of the ropes and wood grain to the seat board.
3. Bench on the right: draw a deep seat with a front edge whose thickness is visible, and have four legs connected to the seat touch the ground. Layer the backrest in front of the two rear posts, ensuring that the posts appear uninterrupted from directly below the backrest to the seat. Add thin wood grain to the seat and backrest.
4. Make upper surfaces bright and wooden side surfaces dark under morning sunlight from the upper left. If drawing the sun, place it in the upper left of the screen. After drawing the grass and path on the ground and before drawing the swing and bench bodies, layer the cast shadows as shadows on the ground falling toward the lower right from morning sunlight in the upper left. Extend the shadows of the four swing supports and each bench leg long and thin from their respective contact points toward the lower right, making the feet dark and the extending shadows pale. For the swing, connect the ends of the shadows from the two front supports with a horizontal crossbeam shadow, then extend the left and right rope shadows toward the lower left from there and connect them to the rear edge of the seat-board shadow drawn as a surface. Maintain enough contrast for each support and rope shadow to be traceable from end to end even where they overlap grass or the path. Place the bench-seat shadow as a pale quadrilateral following the four edges of the seat and separated from the body and leg shadows toward the lower right. Use sage green for the lawn, ecru for morning light, golden brown for wood, and blue-green for supports; draw the background houses and trees more lightly than the main subjects. Show the contrast between the stationary bench and swinging seat board.
Depict soft morning light across the entire image. Transition the sky from bluish above to pale gold near the horizon, and the lawn from misty pale green in the distance to bluish green at the bottom of the screen. Add thin warm-colored edges to upper-left surfaces of the playground equipment, and darken lower-right sides. Draw the path and background with soft color areas, leaving the clearest light-dark contrast for the outlines of the swing and bench.
5. Write each attribute only once within an element. Verify the corresponding tags and the four connection points of the suspension ropes. The first character of the output must be <, and the last character must be >. Return only the SVG body.
Reference: Prompt adopted in Experiment 2 (769 characters excluding line breaks)
Please draw an empty park in a residential neighborhood, with morning sun shining from beyond the houses. Two ropes extend from a crossbeam supported by wooden posts, and a thick, single wooden seat board with visible grain hangs from their ends. The seat board has the width and depth for one person to sit on and swings slightly forward from directly beneath the crossbeam. The taut ropes tilt in the same direction, creating a lingering sense of motion in the empty swing. Beside a park path, slightly away from the swing’s range of motion, is an unoccupied wooden bench. Morning sunlight illuminates the grain of the long seat board and its worn, rounded edges, while narrow shadows fall at the legs. Leave negative space between the swing and bench, and create a symbolic single image that conveys the motion of the swing and stillness of the bench within one landscape illuminated by the same morning sunlight. Return only standalone SVG code at 600 px wide by 400 px high.
Leave negative space between the swing on the left and bench on the right, and draw a narrow park path that runs from the foreground through the space between them toward pale houses.
Connect both ends of the crossbeam to the same points as the two supports that touch the ground on each side, tilt the two taut suspension ropes in the same direction, and connect them with four fasteners in total to the crossbeam and the upper surface of the seat board that swings slightly forward.
Connect the bench’s four legs without gaps to the underside of the thick seat and to the ground, and show the two rear posts supporting the backrest uninterrupted from below the backrest to the seat.
Layer shadows below the objects on the ground, extending the shadow of every leg of both playground objects long and thin from its actual contact point toward the lower right, making the feet dark and the ends pale.
Connect the ends of the shadows of the swing’s two front legs with a horizontal crossbeam shadow, then extend the shadows of the left and right ropes toward the lower left and connect them to the rear edge of the seat-board shadow, maintaining enough contrast to trace each separately even over grass or the path.
Transition the sky from bluish above to pale gold at the horizon, and the grass from hazy pale green in the distance to blue-green in the foreground; warmly illuminate the grain and rounded edges with morning sunlight from the upper left, darken lower-right sides, and emphasize the outlines of the swinging seat board and quiet bench.
5. Discussion and Summary
#5-1. Instructions That Could Be Removed and Instructions That Were Retained
#In the two experiments, describing in words what we wanted to see in the completed image allowed us to omit coordinate and shadow-drawing code examples. What remained were conditions such as “the bench’s four legs support the seat and touch the ground” and “each left and right rope shadow can be traced from the crossbeam shadow to the seat-board shadow.”
| Decision in this experiment | Specific example | Basis for the decision |
|---|---|---|
| Could be removed | Bench seat and leg vertex coordinates, fixed shadow coordinates, and production procedures redundant with SVG code examples for drawing shadows | In Experiment 1, all three verification images passed even after these were omitted. The average score was 20 points both before and after removal. |
| Could be removed | Coordinates for the swing crossbeam, supports, and ropes, as well as the SVG code example for drawing the crossbeam | Experiment 1 retained the coordinates and code example. Experiment 2 communicated the way components should connect in words and omitted the coordinates and code example. All three verification images passed; the average score was 19 points before removal and 20.33 points after removal. |
| Retained | The four legs support the bench seat and touch the ground, and the rear posts are visible from beneath the backrest to the seat | This was retained in both Experiments 1 and 2. When this sentence was removed in Experiment 2, the first image failed. |
| Retained | The swing’s two ropes tilt in the same direction and connect the crossbeam and seat board with fasteners | When the sentence specifying how the supports and ropes were attached was removed in Experiment 2, only one of the three images passed. |
| Retained | Each left and right rope shadow can be traced from the crossbeam shadow to the seat-board shadow | When specifications for the swing body were removed together in Experiment 1, the right rope shadow could not be traced and the image failed. When only the sentence specifying the connections of the left and right shadows was removed in Experiment 2, the first image also failed. |
When reviewing old prompts, consider, “What in the completed product do I want to verify with this sentence?” This lets you test how far detailed procedures can be omitted while preserving the underlying intent.
5-2. What to Decide Before Optimizing Your Own Subject
#Through this experiment, I found three points particularly important for prompt optimization.
Make the intent clear. In this case, I made “draw the bench naturally” concrete as “the four legs support the seat and touch the ground.” For example, for a request such as “fix the display when search results have zero items,” determine exactly what is displayed for each number of results. For zero results, display “No matching products were found”; for one or more results, display product names. Verify both through tests.
Align users and the passing threshold. The acceptance criteria differ between someone who says “it is usable if the overall atmosphere is good” and someone who says “it is unusable if a rope shadow is missing.” This experiment adopted the latter acceptance criterion. If agreement is difficult using only the wording in a scoring table, one approach is to prepare a single example and verify together whether it should be adopted and what was examined to make that decision.
Automate the verification procedure so that enough trials can be run. This time, drawing the park with shortened instructions, examining scores, and selecting what to remove next was repeated about 20 times in total across Experiments 1 and 2. It takes effort for people to review the result and provide the next instruction every time a candidate is tried, so delegate the selection of the next candidate to scripts or AI as well.
5-3. Summary
#Using the new model, I drew the park using both the original instructions and shortened instructions, then compared the images. Even after reducing the instruction character count by 53.6% in Experiment 1 and 79.0% in Experiment 2, the average image score was equal to or higher than before shortening in both cases.
This time, I focused on one scene and built a simple procedure myself. Even so, because images of the same park were compared using the same criteria, I could verify both how much an old prompt could be shortened and which sentences, when removed, caused the intent to stop being conveyed.
If you are reviewing an internal prompt collection, it may be best to start with a sentence for which you still remember why it was added. If you understand what that sentence was intended to fix, you will also know what to verify after removing it.
DSPy includes optimization features that adjust prompt instructions and examples based on evaluation metrics. See MIPROv2 in the official DSPy documentation. ↩︎
Refer to the official announcements for each model. GPT-4o/Claude 3.5 Sonnet/Claude 3.7 Sonnet/GPT-4.1/Claude Sonnet 4 ↩︎





