Skip to content

[agentic-token-optimizer] Optimize: Daily AI Poem — prompt compaction and output trimming #471

Description

@github-actions

Target Workflow

Daily AI Poem (daily-ai-poem.md) — selected as the highest-AIC workflow not optimized in the last 14 days. All higher-spend workflows (Daily AIC Usage Audit, Agentic Workflow AIC Usage Optimizer, Daily AI Research Digest, Daily XKCD Comic) were optimized within the last 14 days.

Analysis Period

2026-08-20 → 2026-08-26 · 7 runs analyzed

Spend Profile

Metric Value
Total AIC 111.57
Avg AIC / run ~15.94
Total tokens (1 obs.) 48,906
Avg turns / run 2
Avg action time 5 min
Conclusions 7 / 7 success, 0 retries

Token data available for 1 of 7 runs; per-run estimates are extrapolated from that observation. All 7 runs succeeded on first attempt with no retries.

Ranked Recommendations

1 · Remove the "Inspiration Note" output requirement

Est. savings: ~1.5 AIC/run (~9%)

The prompt requires a one-sentence "Inspiration Note" appended to every poem. This meta-commentary is invisible to most readers (GitHub Discussion body scrolls past it) and adds ~100–200 extra output tokens per run.

Action: Delete the following line from the ## Output section:

Write a one-sentence "Inspiration Note" explaining what sparked today's theme.

And remove the *{inspiration note}* line from the body template.

Evidence: The Inspiration Note appears in every run's output but adds no functional value to the poem itself.


2 · Compact the Theme Selection and Instructions sections (~25% prompt reduction)

Est. savings: ~1.2 AIC/run (~8%)

The current ## Theme Selection block lists each theme with a bold label and a separate plain-English description (~80 words). This can be condensed to a single numbered list without the verbose formatting. Similarly, the ## Instructions section repeats quality guidance ("A developer reading this should nod and smile", "not generic") that overlaps with the ## Theme Selection framing.

Action: Replace the current Theme Selection block with a compact inline list:

## Theme Selection

Use `(day_of_month % 7)` to pick a theme:
0 · agent habits · 1 · debugging · 2 · LLMs & humans · 3 · code review
4 · prompt engineering · 5 · developer tools · 6 · open source

Trim the Instructions bullet list by removing the final evaluative sub-bullets ("Be funny or touching, not generic — a developer reading this should nod and smile"; "A developer should be able to share this on their team Slack without embarrassment") — the introductory voice description ("playful, clever, and warm") already covers this intent.

Evidence: The current prompt body is ~340 words; this change removes ~80 words. Based on the 48,906-token run, input context makes up a significant share of per-turn cost.


3 · Cap poem to 3 stanzas (remove the "3–4" range)

Est. savings: ~0.5 AIC/run (~3%)

The current instruction asks for "3–4 stanzas (4 lines each)". When given a range, the model tends toward the upper bound. Pinning to exactly 3 stanzas trims ~16 lines of output.

Action: Change 3–4 stanzas to 3 stanzas in Instruction step 2.


Run evidence (7 runs)
Run Date AIC Conclusion Attempts
§32947913666 2026-08-26 15.94 success 1
§32826749296 2026-08-25 15.93 success 1
§32706639947 2026-08-24 15.87 success 1
§32628256505 2026-08-23 15.95 success 1
§32562270824 2026-08-22 16.06 success 1
§32463291979 2026-08-21 15.86 success 1
§32348907251 2026-08-20 15.95 success 1

AIC is remarkably stable (range: 15.86–16.06), indicating consistent token usage across runs.

Caveats

  • Token counts available for only 1 of 7 runs; savings estimates assume proportional input/output distribution.
  • AIC variance is low (~1.2%) so absolute savings per run are modest; changes are low-risk given 100% success rate.
  • No tools are configured for this workflow, so no tool-usage optimizations apply.
  • No inline sub-agent candidates: the workflow has a single atomic task (write and post a poem) with 2 turns and no parallelizable sub-tasks.

References:
§32947913666 · §32826749296 · §32706639947

Generated by Agentic Workflow AIC Usage Optimizer · 163 AIC · ⊞ 21.6K ·

  • expires on Sep 2, 2026, 2:42 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions