Optimizing AI Workflows: What I Learned from Four Text-Analysis Trials
Описание и применение
Оптимизация AI‑рабочих процессов через разделение задач, улучшение системных сообщений и удаление лишнего текста сократили токены и стоимость на 16 %.
Задача
Complex AI workflows become expensive due to repeated small design decisions, leading to high token usage and cost.
Результат
Improved system messages and caching cut uncached input cost by ~73% and overall cost by ~16%. Removing unnecessary natural‑language output reduced output tokens by ~15% and saved ~$2.8 per run. A single mis‑instruction caused repeated function calls, highlighting that cache stats alone don’t guarantee efficiency.
Рабочий процесс
- Extract sentences with GPT 5.6 Sol (low reasoning)
- Tokenize sentences with GPT 5.4 mini
- Extract multi‑word terms with GPT 5.6 Terra (medium reasoning)
- Batch token classifications (5 tokens per batch) using Terra
- Reuse previous outputs to reduce decision space
- Record configuration, timestamps, token usage, and context for each model call
- Apply caching and remove unnecessary final assistant messages
Доказательства
Between the two TEXT 1 trials, the estimated cost of uncached input fell by almost 73%.
The output cost also fell by almost 15%.
Removing the single full stop instruction caused the model to generate explanatory text, increasing output from 234,000 to 426,000 tokens.
- Дата записи: 2026-09-22T13:00:36.159Z