TwilioMaria Bermudez11 min readintermediate
How we AI-updated 1,138 Error-code Docs Pages
Summary
Twilio built a two‑phase pipeline that first scores each error‑code doc with a deterministic script, then feeds only low‑scoring pages to an LLM (gpt‑5.4) using a strict prompt. The model’s diff is applied via git, linted, and opened as a PR for a reviewer. In 12 weeks they updated 1,138 pages (≈34.6 s/page) with a human reviewing every change, cutting manual effort from an estimated 18 k hours a…
- Score docs with a simple, deterministic script (structure 50, content 35, resources 15) and only send pages < 70 to the LLM to avoid unnecessary edits.
- Use a prompt that (a) enforces a direct instructional voice, (b) forbids fabrications, (c) caps added links, and (d) allows the model to reply "I can't find anything to add" when no improvement is needed.
- Apply model output as a git diff (single hunk) and run a lint step before opening a PR; keep batch size small (30 → 100 pages) so reviewers can stay on top of changes.
- Maintain a tracking file to avoid duplicate PRs and to skip files with local modifications.
Accurate error‑code documentation directly reduces support tickets and improves developer experience. Twilio’s systematic, AI‑assisted approach shows how to scale doc maintenance for large, fast‑moving API catalogs while preserving quality through human review.
6/10



