LLM Tool Selection and Development Practice: A Guide for Engineering Teams

    Choosing a large language model is not about finding the single best one, but about matching model capabilities to specific scenarios. This guide explains how to build a weighted scoring model, structure tools into capability layers, run reproducible evaluations on your own task set, control hidden costs and reliability risks, and embed security and compliance into the request pipeline. It also outlines a practical selection strategy that favors a switchable gateway architecture and an auditable governance system over betting on one "strongest" model.

    1. The Real Problem: Scenario Fit, Not “Which One Is Best”

    Many teams start selection by asking which model is the best. That question does not hold up in engineering terms. LLM capability is a multi-dimensional vector that includes at least code understanding and generation, general knowledge coverage, long-context handling, Chinese expression, multimodal and voice interaction, tool calling and structured output, and response latency and throughput stability. Rankings across these dimensions often reverse from one benchmark to another, so the more reasonable approach is to define the business scenario first, assign weights second, and run a small-scale comparison test last.

    Common public evaluation practices measure code capability with function-level generation correctness benchmarks, general knowledge with multi-discipline multiple-choice benchmarks, and Chinese writing mostly through human or model review. These metrics work as an initial screening threshold, but they cannot replace validation on your own datasets. A practical scoring model looks like this:

    1. weights = {
    2. "code": 0.30, # Code generation and completion
    3. "knowledge": 0.20, # General knowledge and reasoning
    4. "writing_zh": 0.15, # Chinese writing and summarization
    5. "latency": 0.15, # Time to first token and throughput
    6. "tool_call": 0.10, # Structured output and function calling
    7. "cost": 0.10, # Cost per task
    8. }
    9. def score(candidate, metrics):
    10. return sum(weights[k] * metrics[k] for k in weights)

    The point of weights is to turn “feels good to use” into numbers that can be reviewed. For teams focused on engineering productivity, code and tool calling should carry significantly more weight than writing; for content and customer support scenarios, Chinese expression and latency deserve higher weight.

    2. Capability Layers: Split Tools by Responsibility

    In practice, a layered combination is more reliable than betting the entire business on a single model.

    The first layer is general conversation and knowledge Q&A, handling document comprehension, draft proposals, and concept explanation. It requires broad knowledge coverage, a sufficient context window, and stable refusal behavior and factual control.

    The second layer is intelligent coding, handling completion, unit test generation, code review, and defect localization. The key metrics are cross-file context understanding, compile pass rate, and controllability of changes, rather than raw problem-solving accuracy.

    The third layer is interaction and voice, handling real-time conversation, speech transcription and synthesis, and multi-turn experiences that are not interrupted. It focuses on end-to-end latency, robustness in noisy environments, and interruption recovery.

    The fourth layer is platform and governance, including the model gateway, quotas and rate limiting, logging and auditing, monitoring and alerting, and content safety filtering. This layer is often overlooked, yet it determines whether a system can move from demo to production.

    3. Evaluation Method: Reproducible Validation on Your Own Task Set

    Build an evaluation set of roughly a hundred items that covers real business cases. Fix the prompts, temperature, and maximum output length, and record three data points: task success rate, time to first token, and cost per task. An illustrative flow:

    1. 1. Sample real requests (anonymized) → 2. Label expected outputs and judging rules
    2. → 3. Batch-call candidate models → 4. Automated judging + manual spot checks
    3. → 5. Output a radar chart and a distribution of failure types

    Failure types are more valuable than a total score. Common categories include factual errors, instruction-following deviations, structured output parsing failures, loss of information in the middle of long documents, and code dependency version mismatches. Once failures are clustered, the selection conclusion often shifts from “pick one” to “use one capability class as primary and route the rest to fallbacks.”

    4. Cost and Stability: Free Quotas Are Not Zero Cost

    For individual use, tools with generous free quotas are usually sufficient. Enterprise scenarios, however, must account for hidden costs: repeated consumption from retries, input inflation from long contexts, manual review hours, and task queuing caused by rate limiting. On the engineering side, trimming prompts, pruning context, caching identical requests, and routing by difficulty tier can significantly reduce overhead.

    For stability, pay attention to rate limiting policies, peak throughput, and failure degradation paths. It is recommended to implement multi-backend routing with timeout circuit breaking at the gateway layer so that a single backend failure does not interrupt the business:

    1. def route(task):
    2. if task.type == "code":
    3. return ["primary", "fallback_a"]
    4. if task.type == "voice":
    5. return ["low_latency", "primary"]
    6. return ["primary", "fallback_b"]

    5. Security and Compliance: Build Controllability into the Pipeline

    Enterprise deployment must consider keeping data within its boundary, encryption in transit and at rest, key management, call auditing, and content safety. Sensitive data should be anonymized and minimized before it reaches the model, and logs should avoid retaining raw personal information. If data boundary requirements are strict, general cloud product capabilities such as container platforms, object storage, logging services, and monitoring and alerting offered by Baidu AI Cloud can be used to build a private pipeline, achieving unified governance of the model gateway, data retention, and permission auditing while preserving room to switch backends as business needs change.

    6. Conclusion: A Prudent Selection Strategy

    If you keep only one AI application, prioritize a general assistant with generous free quotas, no ad interference, balanced code and Chinese capabilities, and a stable update cadence as the daily entry point; then add a voice-oriented tool with better interaction and a coding-focused tool as needed. Real competitiveness does not come from betting on a single “strongest model,” but from establishing a reproducible evaluation mechanism, a switchable gateway architecture, and an auditable governance system, so model capabilities can be replaced smoothly as the business evolves.