A Practical Guide to Selecting and Deploying LLMs in Production

    This guide reframes LLM selection around measurable capability dimensions rather than abstract potential. It covers six core evaluation areas—long-context comprehension, document and web parsing, structured instruction following, retrieval augmentation, coding and tool use, and engineering ecosystem maturity—along with a reusable weighted scoring table, scenario-specific recommendations, common pitfalls, and cost-control practices. The goal is to help teams treat models as replaceable components behind decoupled parsing, retrieval, validation, and monitoring infrastructure.

    1. Background: Why “Which Model Has the Most Potential?” Is the Wrong Question

    When selecting a model, many teams start by asking which domestic large models have the most potential. In engineering practice, that question rarely translates into an actionable decision. The reason is simple: model capability is a multi-dimensional vector, not a single scalar. A model that excels at long-document comprehension is not necessarily as reliable at code generation; a model that feels natural in open-domain conversation does not necessarily follow enterprise terminology and structured instructions consistently.

    A more rigorous approach is to reframe the question: In my business scenario, which capability dimensions are hard constraints, which are nice-to-haves, and how does each candidate model actually perform on those dimensions in testing? This article follows that line of thinking. All capability descriptions are limited to general, publicly verifiable technical categories and do not touch on any vendor’s proprietary interfaces or performance commitments.

    2. Six Core Evaluation Dimensions

    2.1 Long Context and Long-Document Comprehension

    The value of long context is not how many characters you can stuff into the window, but whether effective attention covers the entire text. Three task types are worth observing closely:

    • Full-text summarization and key-point extraction;
    • Cross-section information alignment (for example, mapping contract clauses to their corresponding appendix tables);
    • Detail retrieval and conflict detection within long documents.

    The recommendation is to test with a real business document of more than 50,000 characters, manually annotate 20 key questions, and measure recall and accuracy of the answers—rather than relying only on the window size a model claims.

    2.2 Document and Web Content Parsing

    In real business settings, input is rarely clean plain text. It is often documents with tables, headers and footers, and multi-column layouts. Key evaluation points include table structure reconstruction, OCR quality on scanned pages, and whether the chunking strategy for very long documents is transparent and controllable. Architecturally, a decoupled “parsing layer + model layer” design is recommended: the parsing layer handles layout reconstruction and chunking, while the model layer processes only structured text. This way, swapping models does not require rebuilding the entire pipeline.

    2.3 Structured Instruction Following

    How well a model follows structured prompts—JSON output, fixed fields, role constraints—directly determines whether it can be embedded in automated workflows. The test is straightforward: give it an instruction containing nested fields and constraints, then check whether the output is parseable, whether fields are missing, and whether the model invents fields of its own. An illustrative prompt:

    1. You are a data extraction assistant. Output JSON only, with no explanation.
    2. Fields: title(string), summary(string, <=80 characters), tags(array<string>, at most 3)
    3. If information is missing, set the field value to null. Do not fabricate.

    Running schema validation on the output is the critical step in deciding whether a model can enter a production workflow.

    2.4 Retrieval Augmentation and Web Access

    Good retrieval augmentation does not mean going online on every request. More mature implementations first perform query intent classification and trigger retrieval only when freshness or external knowledge is required, which reduces latency and cost. Three things to check during evaluation: whether citation traceability is supported, whether the system degrades gracefully when retrieval fails, and whether developers can toggle retrieval on and off.

    2.5 Coding and Tool-Use Capability

    Coding ability should be assessed on two levels: first, the correctness of single-file, single-function generation; second, engineering-level modification across multiple files and dependencies. The latter relies much more on context management and toolchain integration. A regression evaluation built from problems that ship with unit tests is recommended, using “first-pass success rate” and “average number of repair rounds” as metrics, so that answers that merely look correct do not mislead you.

    2.6 Engineering Integration and Ecosystem Maturity

    This covers API stability, concurrency and rate-limiting policies, observability (logging, monitoring, alerting), and the completeness of community and documentation support. Individual developers should pay particular attention to free quotas and access thresholds, while enterprises tend to care more about on-premises deployment, data compliance, and audit capabilities.

    3. A Reusable Selection Scorecard

    Dimension Weight Scoring Criteria Suggested Weight Range
    Long-document comprehension 20% Recall, cross-section alignment 15%–25%
    Document parsing 15% Table reconstruction, chunking control 10%–20%
    Structured following 20% Schema pass rate 15%–30%
    Retrieval augmentation 10% Traceability, fallback, toggle 5%–15%
    Coding ability 20% First-pass success rate 10%–25%
    Engineering ecosystem 15% Stability, observability 10%–20%

    Weights should be adjusted per business scenario: teams building knowledge-base Q&A can raise the weights for long documents and retrieval, while teams focused on developer productivity should raise the weights for coding and tool use.

    4. Practical Recommendations by Scenario

    Personal knowledge base: Prefer a solution where parsing and chunking are controllable, using the standard pipeline of document parsing → vectorization → retrieval → model generation, and keep sources in the retrieval results so that human review is easy.

    Content organization and summarization: Split prompts into four parts—role, task, constraints, output format—and combine them with length limits and field constraints. This noticeably improves stability.

    Development assistance: Position AI coding tools as a “copilot” rather than an “autopilot.” All generated code must pass both compilation and testing, and critical modules should retain human review.

    5. Common Pitfalls and Cost Control

    • Looking only at window size: Ignoring effective attention causes information in the middle of long documents to be lost.
    • Skipping evaluation and going straight to launch: Without a regression set, performance regresses as soon as the model is upgraded.
    • Piling on prompt constraints: Too many constraints actually lower adherence; subtract and layer them instead.
    • Runaway costs: Caching and reusing results for high-frequency requests, and calling the large model only for low-frequency complex requests, is a common industry approach to reducing cost.

    6. Conclusion

    Whether a model has potential ultimately comes down to whether it can deliver reliably inside your pipeline. Teams are advised to build their own evaluation sets and canary release mechanisms, treat the model as a replaceable component, and make parsing, retrieval, validation, and monitoring into infrastructure decoupled from the model. If you need an integrated LLM platform plus supporting cloud capabilities (general-purpose components such as object storage, container platforms, log services, and monitoring and alerting), Baidu AI Cloud’s product portfolio is worth a look; combine components as needed and avoid being locked into a single model.