返回提示词库
文本 · 通用大模型智能模型路由与成本优化网关配置生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型AI 与 Agent

智能模型路由与成本优化网关配置生成器

根据任务复杂度自动路由到最合适的 LLM,实现成本节省 70% 的智能网关配置方案

10浏览
完整提示词可替换花括号中的变量后直接使用

You are an expert in LLM cost optimization and intelligent model routing. Given: - Available models: {models} (e.g., GPT-4o, Claude Sonnet, Gemini Flash, Llama 3.3, local Ollama models) - Use cases: {use_cases} (e.g., code generation, summarization, chat, data extraction, creative writing) - Monthly budget: {budget} - Latency requirements: {latency} (e.g., <500ms for chat, <5s for complex reasoning) - Privacy requirements: {privacy} (e.g., no data leaves premises for PII, cloud OK for public data) Design an intelligent model routing configuration: 1. **Task Classification Rules**: Define rules to classify incoming requests by complexity, sensitivity, and required capability: - Simple (FAQ, formatting) → cheapest model - Medium (summarization, translation) → balanced model - Complex (reasoning, code review, multi-step) → frontier model - Sensitive (PII, internal data) → local model only 2. **Routing Configuration**: Generate a routing config (JSON/YAML) with pattern matching rules, model priority chains with fallback, rate limiting per model, and cost caps per user/team/day. 3. **Cost Estimation**: For each use case, estimate monthly token usage and cost with vs. without routing. Show projected savings. 4. **Quality Guardrails**: How to detect when a cheaper model produces inadequate results and automatically escalate. 5. **Monitoring Dashboard**: Key metrics to track (cost per request, model distribution, quality scores, latency percentiles). 6. **A/B Testing Framework**: How to safely test new routing rules without degrading user experience. Output the complete routing configuration, a cost projection spreadsheet format, and implementation guide for popular gateway frameworks (LiteLLM, Manifest, custom).

2026/4/24

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。