面向企业级大语言模型编程助手的任务到模型优化:一种数据驱动的成本最优路由框架 Task-to-Model Optimization for Enterprise LLM Coding Assistants: A Data-Driven Framework for Cost-Optimal Routing 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-08-09
👁️ 预览文献
💡 AI 中文简介
企业AI编程助手推理开销巨大,单纯按token省钱往往因重试、升级和开发者等待而失效。本文提出T2MO方法,把每次开发者会话视为一个任务,经过发现、分类、难度分级、基准测试,再路由到能在质量和延迟约束内完成的最便宜模型。框架包含九阶段流水线,以“每完成一个任务的成本”为目标,并推导出更便宜模型值得部署的最低通过率边界。它支持成本预测和从静态策略到智能路由的渐进过渡,适合生产部署。
领域企业级AI系统 / 大语言模型推理成本优化与模型路由
适合谁读需要一定专业背景(了解LLM推理、成本工程与生产部署的读者)
核心贡献1. 提出以“每完成一个任务成本”为目标的T2MO框架,将路由决策从token/prompt层面提升到任务类别×难度层级,并显式计入失败升级成本;2. 推导出路由边界与更便宜模型在给定单元上值得部署的最低通过率,并给出按实际美元影响排序的流量加权节省瀑布。
关键数据企业编程助手月支出达数百万美元,约98%集中在两个前沿级模型上;框架为九阶段流水线,决策组织为任务类别×难度层级的二级层次结构。
推荐理由如果你关心企业里LLM编程助手怎么真正省钱,这篇把“按任务而不是按token路由”讲得很透,还给出了可落地的通过率边界和节省排序方法。
关键词["大语言模型路由", "企业编程助手", "成本优化", "任务难度分级", "推理成本", "模型选择"]

原文摘要

查看英文原文摘要

Enterprise AI coding assistants incur substantial inference spend, and naive token-cost minimization often fails to reduce end-to-end cost once retries, escalations, and developer wait time are included. We present Task-to-Model Optimization (T2MO), a data-driven methodology for optimizing model selection in production coding workflows. We treat each developer session as a task that can be discovered, classified, graded for difficulty, benchmarked in a production-like harness, and routed to the cheapest model able to complete it within quality and latency constraints. The framework is a nine-stage pipeline spanning telemetry instrumentation, taxonomy discovery, difficulty grading, benchmark construction, candidate evaluation, optimal mix derivation, forecasting and version planning, staged routing deployment, and continuous governance. Unlike token-centric routing rules, our objective is cost per completed task, with failure escalation priced in explicitly. We show that this expected-completion-cost objective weakly dominates token-cost minimization under escalation, and we derive the routing boundary, the minimum pass rate a cheaper model must reach on a given cell to be worth deploying. Decisions are organized as a two-level hierarchy of task category difficulty tier, and per-cell displacement opportunities are aggregated into a traffic-weighted savings waterfall that ranks replacement candidates by realized dollar impact. The framework supports developer guidance, spend forecasting, and a staged transition from static policies to shadow-mode classifiers, verified cascades, and ultimately an intelligent router. We describe the methodology, optimization objective, evaluation protocol, and governance loop in a form suitable for production deployment and future empirical study.