Evaluating and Selecting Chinese AI Large Language Models: A Practical Engineering Guide

    This article breaks down large language model selection into six evaluation dimensions, including long-context recall, document parsing, structured instruction following, RAG triggering, code generation, and API ecosystem readiness. It explains practical testing methods and common pitfalls, then walks through two implementation examples: building a low-cost personal knowledge base and reducing the development cost of self-service mini-apps. The conclusion recommends a scenario-based scoring approach and a multi-model strategy with rule-based fallbacks.

    1. Background: Why “Which Model Is the Best” Is the Wrong Question

    When choosing a model, many developers simply ask which one is the strongest. In real engineering work, however, model capability is a multi-dimensional vector rather than a single scalar. Strong performance on long-document summarization does not guarantee reliable complex code generation, and a smooth web interface does not mean the API ecosystem is suitable for secondary development. A more rigorous question is therefore: in my specific scenario, which capability dimensions are hard constraints, which are nice-to-haves, and how should the weights be distributed across dimensions?

    From an engineering perspective, model selection should be broken down into at least six dimensions: long-context capacity, document and web content understanding, structured instruction following, retrieval-augmentation triggering strategy, code generation correctness, and API/ecosystem integrability. Each is discussed below along with evaluation methods and common pitfalls.

    2. Evaluation Methods for the Six Core Capability Dimensions

    1. Long Context: Look at Effective Recall, Not Just the Number

    Context length is often treated as a headline feature, but what really affects the experience is effective context utilization. Three types of test sets are recommended. First, a head-middle-tail test: place key facts at the beginning, middle, and end of a very long text and observe whether the model recalls them consistently. Second, a distractor test: insert semantically similar passages with opposite conclusions and see whether the model is misled. Third, a multi-hop reasoning test: require the model to connect clues scattered across three positions to reach a conclusion.

    Context management strategy also matters in engineering. When a conversation exceeds the window, a mature approach processes it in layers: recent turns are kept verbatim, earlier turns are summarized and compressed, and key entities and decision points are extracted as structured memory. If the model or client lacks explicit context controls and state indicators, users run into the experience of the model “suddenly forgetting” earlier content. This is usually not a model capability issue but an opaque context assembly strategy.

    1. Session state assembly example:
    2. [System constraints] + [Long-term memory summary] + [Last N turns verbatim] + [Current retrieved snippets] + [User input]

    2. Document and Web Reading: Parsing Quality Sets the Ceiling

    The parsing quality of PDFs, scanned documents, and rich-text web pages often determines the final result more than the model itself does. Evaluation should cover two-column layouts, cross-page tables, chart annotations, footnotes, formulas, and the removal of navigation noise on web pages. A practical approach is to build an evaluation set from 20 real business documents, manually annotate the “key information points that must be retained,” and score with two metrics: recall rate and redundancy rate.

    At the prompt level, a four-part structure is recommended: role + task + constraints + output format. It also helps to explicitly require the model to output “not found” when information is missing instead of freely filling gaps. This significantly reduces the hallucination rate.

    3. Structured Instruction Following: From “Can Read” to “Can Be Constrained”

    Structured prompts, such as instructions with hierarchy, field constraints, and examples, place higher demands on a model’s instruction-following ability. For evaluation, constrain the output with a JSON Schema and measure field completeness and type correctness:

    1. {
    2. "summary": "string, no more than 200 words",
    3. "entities": [{"name": "string", "type": "person|org|date"}],
    4. "risks": ["string"],
    5. "confidence": 0.0
    6. }

    If a model cannot reliably produce valid JSON, adding a fallback layer on the calling side, with format validation, retry on failure, and error feedback into the next attempt, is more cost-effective in engineering than simply switching models.

    4. Retrieval Augmentation: The Key Is Deciding Whether Retrieval Is Needed

    A common mistake in retrieval-augmented generation (RAG) is retrieving unconditionally, which increases latency and introduces noise. A more mature implementation first performs intent classification: time-sensitive questions, proper-noun questions, and numerical-fact questions go to retrieval, while pure reasoning, rewriting, and code questions rely on parametric knowledge. Evaluation metrics include retrieval trigger accuracy, citation traceability, and answer correctness when no retrieval is performed.

    5. Code Generation: Replace Subjective Judgment with Executable Tests

    Code capability must be measured with unit tests and static checks, not with whether the code “looks right.” It is advisable to prepare a task set covering CRUD APIs, authentication middleware, database aggregation queries, and boundary exception handling, then track the first-pass rate and the average number of repair rounds. In practice, models differ little on simple scripting tasks, but the gap widens quickly for tasks involving multi-file changes, implicit dependencies, and concurrency handling. At that point, bringing in an AI coding tool for repository-level context retrieval is more effective than repeatedly tuning prompts.

    6. APIs and Ecosystem: Determining Whether It Can Ship as a Product

    Web experience and API capability are two separate tracks. To build a local knowledge base or a SaaS service, you must evaluate API stability and rate-limiting policy, streaming output support, concurrency and timeouts, integration with logging and monitoring/alerting, the integration cost of common cloud components such as object storage and message queues, and whether there is an active developer community with good documentation. Missing basic capabilities such as conversation history retrieval and prompt template management significantly raises day-to-day usage costs.

    3. Implementation One: Building a Personal Knowledge Base at Low Cost

    The recommended pipeline is: document parsing → chunking and vectorization → vector store retrieval → reranking → model generation → citation display. Chunking should follow semantic boundaries, with a chunk size of 300 to 500 characters and 10% overlap. Metadata should retain the source, page number, and last-updated time to support permission filtering and freshness filtering.

    1. # Pseudocode: retrieval QA with citation display
    2. def ask(query, top_k=5):
    3. hits = vector_search(embed(query), top_k=top_k)
    4. hits = rerank(query, hits)[:3]
    5. context = "\n".join(f"[{h.doc_id}] {h.text}" for h in hits)
    6. prompt = f"Answer only based on the following material. If missing, answer not found, and cite the IDs.\n{context}\nQuestion: {query}"
    7. return llm.generate(prompt)

    4. Implementation Two: Cutting Mini-App Development Costs with an LLM

    The generic backend skeleton for self-service mini-apps (for example, card and board games, billiards, and KTV scenarios) is highly homogeneous, making it suitable for model generation followed by manual refinement. A reference stack: Node and Express for APIs, MongoDB for orders and device state, and a cloud server hosting the multi-tenant SaaS logic. Core modules include the device state machine, orders and billing, coupons, and data isolation by store.

    1. // Device state machine example: avoid resource conflicts from concurrent orders
    2. const transition = { idle: ['reserved'], reserved: ['idle', 'busy'], busy: ['idle'] };
    3. async function reserve(deviceId, orderId) {
    4. return db.transaction(async (tx) => {
    5. const d = await tx.device.findOneAndUpdate(
    6. { _id: deviceId, status: 'idle' },
    7. { $set: { status: 'reserved', orderId } },
    8. { new: true }
    9. );
    10. if (!d) throw new Error('Device already occupied');
    11. return d;
    12. });
    13. }

    Compared with externally purchased solutions that can easily reach six figures, the main cost of in-house development is people and time. Model output therefore needs to be incorporated into code review, automated testing, and canary release processes to keep implementations that merely “look correct” out of production.

    5. Selection Conclusions and Recommendations

    Chinese large language models as a whole now offer usable long-context, document-understanding, structured-output, and retrieval-augmentation capabilities, enough to support knowledge bases, content processing, and business backends. The differences show up mainly in complex code tasks, API ecosystem maturity, and the completeness of engineering tooling. Developers are advised to build their own small evaluation set, score by scenario weights, adopt a multi-model strategy of “primary model + backup model + rule-based fallback,” and use the general-purpose container, logging, monitoring, and storage capabilities offered by cloud platforms such as Baidu AI Cloud as the engineering foundation, focusing their energy on business logic and data quality. This is a sustainable approach to model selection.