Get a Slide Outline That Fits Per-Slide Character Limits
Put title and bullet character limits in the prompt for a 6-slide outline, then count characters and check dropped report items with a script. 24 runs.
You asked for titles of 30 characters or fewer and bullets of 60 or fewer, and the title still wraps to two lines once it is pasted into the deck. Count while you still have the outline, not after. This post turns one report into a 6-slide outline and checks character counts and dropped report items with a script. Meeting a character limit on its own is covered in Hit a strict character limit when AI shortens your text.
[1] Put the source in a file. It is a fictional returns-handling pilot report with 8 numbered items, each carrying numbers.
[Returns Handling Pilot: Results] Fictional distribution site "Site A", three-month pilot 1. The average time from return intake to restocking dropped from 5.2 days to 2.8 days.2. The data-entry error rate at intake fell from 6.4% to 2.1%. The change came from replacing manual entry with barcode scanning.3. Returns inspection staff went from 12 people to 9, and the 3 who left the team were reassigned to the outbound line.4. The disposal rate of returned goods dropped from 3.5% to 1.9%. A three-level condition grade lets staff decide resale eligibility faster.5. The share of customer inquiries asking about return status fell from 31% to 18%.6. Barcode scanners and system integration cost $36,000, with a payback period expected at 14 months.7. Risk: during the December peak, return volume is expected to reach 1.6 times the usual level, and 6 temporary workers will be needed.8. Next steps: expand to "Site B" in January and re-measure the effect in March.[2] Write the prompt. It states the slide count, the number of bullets, the limits and what must not be dropped, one rule per line, and shows the output format as a template. That follows the Be clear and direct principle in Claude's prompting guide: state the output format and constraints concretely. The count the model writes in parentheses is there so it can be compared with the real count later.
Build a slide-deck outline from the report inside <report>. Rules:- Exactly 6 slides.- Each slide has one title and exactly 3 bullets.- A title is at most 30 characters including spaces; a bullet is at most 60 characters including spaces.- Cover all 8 numbered items of the report. Do not drop the numbers of an item (before and after values). Do not use any number that is not in the report.- At the end of each bullet, write its character count as (N chars). Do the same for the title.- Write nothing outside the format below. Format:## Slide 1Title: (title) (N chars)- (bullet) (N chars)- (bullet) (N chars)- (bullet) (N chars) <report>[3] Build the prompt file and run the same input six times. --tools "" and --max-turns 1 keep it to a single tool-free answer.
$ (cat head.en.txt report.en.txt; echo "</report>") > prompt.en.txt$ claude -p --model claude-sonnet-5-5 --max-turns 1 --tools "" --setting-sources "" --strict-mcp-config < prompt.en.txt > outline.en.2.txt$ head -14 outline.en.2.txt## Slide 1Title: Faster, Cleaner Returns (22 chars)- Intake to restock: 5.2 days down to 2.8 days (44 chars)- Entry error rate at intake: 6.4% to 2.1% (40 chars)- Barcode scanning replaced manual entry (38 chars) ## Slide 2Title: Staffing and Disposal (21 chars)- Inspection staff: 12 people to 9 (32 chars)- The 3 who left were reassigned to outbound (42 chars)- Disposal rate: 3.5% to 1.9% with three-level grade (50 chars) ## Slide 3Title: Inquiries and Cost (18 chars)[4] Write the checking script. It reads the slides, counts each title and bullet with len() (spaces included), strips the trailing count in parentheses and compares it with the real one, and looks for the report values in the outline. Items 1-5 are before/after pairs, so both values must be on the same line; items 6-8 hold two separate facts, so both just have to appear somewhere in the outline. This is a shortened transcription.
LIMITS = {"en": (30, 60)} # (title, bullet), spaces includedFACTS = [("1 turnaround", [["5.2"], ["2.8"]]), ("6 cost and payback", [["36,000", "36000"], ["14 months"]]), ...] # values each item must keep (alternates share a slot)...text, claim = split_claim(lang, line) # strip the trailing "(N chars)", keep Nn = len(text) # real countif n > limit: problems.append(...) # over the limitif claim != n: selfmis.append(...) # differs from what the model wrote (not counted as a failure)for name, groups in FACTS: # report items: a missing value -> "item missing" ...sys.exit(1 if (problems or newnums) else 0) # wrong slide/bullet count, overflow, missing item or number not in the report -> 1A number counts as a different number when digits, a dot or a comma touch it (so the 6 in 1.6 is not "6 workers"). A number that is not in the report is printed as NEW and also makes the exit code 1. A number followed by % must appear with % in the report too (the report has 14 months, so 14% is invented).
[5] Run it on that output.
$ python check_outline.py en outline.en.2.txt report.en.txtSELF slide 1 title: wrote 22, actual 23SELF slide 3 bullet2: wrote 38, actual 37slides=6 limit_or_structure_or_missing=0 selfcount_mismatch=2 missing_items=0 new_numbers=0Nothing went over a limit and no item was dropped, but two of the counts the model wrote were wrong. To avoid generalizing from one run, the same task ran with tighter limits (title 20, bullet 40), and in Korean with the Korean report (title 14 / bullet 30, tighter 10 / 18). Six runs per condition, 24 in all.
| Condition | Over a limit | Item dropped | Number not in report | Runs with a wrong written count (wrong / 144) |
|---|---|---|---|---|
| English, title 30 / bullet 60 | 0 runs | 0 runs | 0 runs | 3 (6) |
| English, title 20 / bullet 40 | 0 runs | 0 runs | 0 runs | 3 (4) |
| Korean, title 14 / bullet 30 | 0 runs | 0 runs | 0 runs | 2 (6) |
| Korean, title 10 / bullet 18 | 0 runs | 0 runs | 0 runs | 3 (6) |
In 0 of 24 runs did a title or bullet exceed its limit, and in 0 of 24 runs was a report item dropped. What was wrong is the count the model wrote in parentheses: 11 of 24 runs had at least one wrong count, and 22 of 576 titles and bullets (about 3.8%) were off. Most were off by 1; one was off by 2. The model wrote a larger number than the real count in 10 cases and a smaller one in 12. If you read only those parentheses you cannot tell whether a limit was exceeded. This time nothing was, and the script is how that was established.
With the tighter limits, 2 English bullets and 3 Korean bullets landed exactly on the limit. The model packs text right up to the edge, so a count that is wrong by one is the case that would push a line over next time.
[6] Check that the script catches broken input. The files below are not model output; they are a real output damaged by hand. Six kinds were tried (a bullet stretched past the limit, the cost bullet replaced with other wording, one number changed, two values of one item moved to different slides, an invented 14% and an invented 16%) and all six exited with code 1. A representative case, the cost bullet replaced:
$ python check_outline.py en bad_missing.en.txt report.en.txtFAIL item missing: 6 cost and paybackSELF slide 1 title: wrote 22, actual 23SELF slide 3 bullet2: wrote 26, actual 25slides=6 limit_or_structure_or_missing=1 selfcount_mismatch=2 missing_items=1 new_numbers=0[7] What this checks and what it does not.
- Checked: character limits, the number of slides and bullets, whether the report numbers are present, whether numbers that are not in the report appeared (a
%must match a%in the report). For items 6-8 the two values may sit in different bullets or slides and still pass. - Not checked: whether a bullet shortens the item faithfully. A bullet such as "A three-level grade decides resale eligibility faster" placed under a disposal-rate slide has to be read against the report by a person.
- When not to rely on it: a slide tool may count characters differently from
len()(full-width characters, line breaks). If the limit is really a box width, look at the slide once after pasting.