bailian-model-recommend
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese百炼模型推荐
Tongyi Wanli Model Recommendation
从阿里云百炼平台模型库中,根据用户场景推荐最合适的模型并提供调用示例代码。
Recommend the most suitable model from the model library of Alibaba Cloud Tongyi Wanli platform and provide sample calling code based on user scenarios.
适用场景
Applicable Scenarios
显式选型:
- "推荐一个模型"、"选哪个模型"、"用什么模型好"
- "帮我对比一下XX和XX模型"
隐式选型(用户描述想做的事,隐含需要选模型):
- "我想做一个XX"(客服机器人、翻译工具、代码助手...)
- "帮我实现XX功能"(图片生成、语音合成、文本摘要...)
- "怎么用 AI 来做XX"、"大模型能做XX吗"
- "XX场景有什么方案"、"我想接入XX能力"
技术选型:
- "XX和XX哪个更适合做YY"
- "低成本/高并发/高精度 场景怎么选"
不适用:
- 用户已确定模型,只问怎么调用 → 直接给调用代码
- 纯粹查询模型参数/价格 → 使用 bailian-docs-llm-wiki skill
与 bailian-docs-llm-wiki 的边界: 当用户同时涉及模型查询和模型选择时,优先使用本 skill(本 skill 内部会读取模型数据完成推荐)。仅当用户已确定模型、只需查参数/价格/调用方式时,由 bailian-docs-llm-wiki 处理。
Explicit Selection:
- "Recommend a model", "Which model to choose", "Which model is good to use"
- "Help me compare XX and XX models"
Implicit Selection (users describe what they want to do, implying the need to select a model):
- "I want to build a XX" (customer service robot, translation tool, code assistant...)
- "Help me implement XX function" (image generation, speech synthesis, text summarization...)
- "How to use AI to do XX", "Can large models do XX"
- "What solutions are there for XX scenarios", "I want to access XX capabilities"
Technical Selection:
- "Which is more suitable for YY, XX or XX"
- "How to choose for low-cost/high-concurrency/high-precision scenarios"
Not Applicable:
- Users have confirmed the model and only ask how to call it → directly provide calling code
- Purely querying model parameters/prices → use the bailian-docs-llm-wiki skill
Boundary with bailian-docs-llm-wiki: When users involve both model query and model selection at the same time, prioritize using this skill (this skill will read model data internally to complete the recommendation). Only when users have confirmed the model and only need to check parameters/prices/calling methods, it will be handled by bailian-docs-llm-wiki.
前置检查
Pre-check
执行推荐前确认依赖的 skill 已安装且数据可用。
bailian-docs-llm-wiki检测逻辑:
- 检查 skill 是否已安装(通过查找已安装 skill 目录中是否存在
bailian-docs-llm-wiki)bailian-docs-llm-wiki/models/models.jsonl - 如果未安装,执行安装:
npx skills add modelstudioai/skills --skill bailian-docs-llm-wiki -y
安装失败则告知用户并中止。禁止在没有数据的情况下凭记忆推荐模型。
Before executing the recommendation, confirm that the dependent skill is installed and data is available.
bailian-docs-llm-wikiDetection Logic:
- Check if the skill is installed (by checking if
bailian-docs-llm-wikiexists in the installed skills directory)bailian-docs-llm-wiki/models/models.jsonl - If not installed, execute installation:
npx skills add modelstudioai/skills --skill bailian-docs-llm-wiki -y
If installation fails, inform the user and abort. It is forbidden to recommend models based on memory without data.
推荐流程
Recommendation Process
第一步:理解需求(Agent 直接完成,不输出给用户)
Step 1: Understand Requirements (Completed directly by Agent, not output to users)
从用户描述中快速提取结构化需求信息。JSON 结构定义见 references/requirement-schema.md,推断规则见 references/capability-codes.md。
要快: 简单字段映射,不做复杂推理。如果需求不清晰,直接追问具体场景,不输出中间分析。
Quickly extract structured requirement information from user descriptions. The JSON structure definition can be found in [references/requirement-schema.md], and the inference rules can be found in [references/capability-codes.md].
Be Fast: Simple field mapping, no complex reasoning. If requirements are unclear, directly ask for specific scenarios, do not output intermediate analysis.
第二步:筛选候选
Step 2: Filter Candidates
从 和 中综合筛选匹配的模型(10~50 个),结构化字段和语义信息同时参与筛选:
models/models.jsonlmodels/groups/<slug>.json- 去除历史快照版本(如 ),只保留主版本
model-2025-04-28 - 按模态过滤(输入/输出模态必须兼容)
- 按能力、特性、上下文窗口、质量定位评分排序
- 读取 group 文件的 description(group 级 + item 级),将场景关键词(如"科研"、"代码"、"长文本"、"客服")与用户需求做语义匹配,提升匹配模型的排序
- 同一家族最多保留少量模型,避免同质化
- 候选不足时放宽过滤条件
数据源字段说明见 references/data-source.md。
Comprehensively filter matching models (10~50) from and , with both structured fields and semantic information participating in the filtering:
models/models.jsonlmodels/groups/<slug>.json- Remove historical snapshot versions (e.g., ), only retain the main version
model-2025-04-28 - Filter by modality (input/output modalities must be compatible)
- Sort by capability, features, context window, and quality positioning score
- Read the description of group files (group-level + item-level), perform semantic matching between scenario keywords (such as "scientific research", "code", "long text", "customer service") and user requirements to improve the ranking of matching models
- Retain only a small number of models from the same family at most to avoid homogenization
- Relax filtering conditions when there are insufficient candidates
For data source field descriptions, see [references/data-source.md].
第三步:精选推荐
Step 3: Select Recommended Models
从候选列表中选出 3 个推荐:
| 位置 | 策略 |
|---|---|
| 推荐 #1(最佳推荐) | 最符合用户预算和质量偏好的最佳模型 |
| 推荐 #2(次优选择) | 另一个档次的模型,说明与 #1 的 tradeoff |
| 推荐 #3(备选参考) | 不同视角的选择,说明场景差异 |
排序逻辑:
- 用户要省钱 → #1 必须是性价比最高的,不是旗舰
- 用户要最好 → #1 必须是能力最强的旗舰
- 用户无倾向 → #1 选综合匹配度最高的
- 推荐最适合场景的,不是最强的;偏好从用户表达中推断,不预设倾向
约束:
- 理由必须关联用户具体需求(禁止"性能强大"等空话),三条理由角度不同
- 有定价信息时结合预算权衡,帮用户做成本决策
- 避免推荐同家族多个模型,优先稳定版本
- 提供多档次选择和 tradeoff 说明,由用户自己决定
pipeline 场景: 相邻步骤的模型模态必须兼容,不兼容时添加提示。
Select 3 recommendations from the candidate list:
| Position | Strategy |
|---|---|
| Recommendation #1 (Best Recommendation) | The best model that best meets the user's budget and quality preferences |
| Recommendation #2 (Second-best Option) | A model of another tier, explaining the tradeoff with #1 |
| Recommendation #3 (Alternative Reference) | A choice from a different perspective, explaining scenario differences |
Sorting Logic:
- If the user wants to save money → #1 must be the most cost-effective, not the flagship
- If the user wants the best → #1 must be the most powerful flagship model
- If the user has no preference → #1 selects the model with the highest comprehensive matching degree
- Recommend the most suitable model for the scenario, not the most powerful; infer preferences from user expressions, do not preset tendencies
Constraints:
- Reasons must be associated with the user's specific needs (empty words like "powerful performance" are prohibited), and the three reasons should be from different angles
- When pricing information is available, combine budget trade-offs to help users make cost decisions
- Avoid recommending multiple models from the same family, prioritize stable versions
- Provide multi-tier options and tradeoff explanations, allowing users to decide for themselves
Pipeline Scenario: Models in adjacent steps must be modality-compatible; add a prompt if incompatible.
第四步:输出推荐结果
Step 4: Output Recommendation Results
对每个推荐模型,读取对应的 group JSON 文件()获取 字段中的调用示例代码。示例代码获取方式和输出格式见 references/samples-format.md。
models/groups/<slug>.jsonsamples用自然语言直接输出推荐(如"根据你的需求,我推荐以下模型..."),每个模型包含:
- 模型名称和 ID
- 推荐理由 — 关联用户具体需求,附 tradeoff 对比
- 亮点 — 关键优势标签
- 规格信息 — 上下文窗口、最大输出、定价(如有)
- 调用示例代码 — 从 group 文件的 samples 字段获取(优先 openai.python,同时提供 curl)
输出约束:
- 不暴露内部流程术语(禁止出现"Stage"、"意图画像"、"候选召回"、"精排"等词汇)
- 所有推荐基于 的实际数据,不凭记忆推荐
bailian-docs-llm-wiki
For each recommended model, read the corresponding group JSON file () to obtain the sample calling code in the field. For the sample code acquisition method and output format, see [references/samples-format.md].
models/groups/<slug>.jsonsamplesOutput recommendations directly in natural language (e.g., "Based on your needs, I recommend the following models..."), each model includes:
- Model Name and ID
- Recommendation Reason — Associated with the user's specific needs, with tradeoff comparison
- Highlights — Key advantage tags
- Specification Information — Context window, maximum output, pricing (if available)
- Sample Calling Code — Obtained from the samples field of the group file (prioritize openai.python, also provide curl)
Output Constraints:
- Do not expose internal process terms (terms like "Stage", "Intention Portrait", "Candidate Recall", "Reranking" are prohibited)
- All recommendations are based on actual data from , do not recommend models based on memory
bailian-docs-llm-wiki