LLM Post-Training with Reinforcement Learning and Capability Evaluation: A Practical Guide
As large language models mature, post-training has become the main engine of capability improvement. This article explains the reinforcement learning paradigms used in post-training, from supervised fine-tuning (SFT) and preference alignment to reinforcement learning with verifiable rewards, along with the core mechanisms of PPO-style and DPO-style methods. It then covers capability evaluation through composite intelligence indices and category-specific benchmarks, the difficulty of assessing multimodal and aesthetic quality, the strong verifiable signal offered by coding tasks, and practical strategies for controlling inference and API costs. It closes with recommendations for task-driven model selection, building internal evaluation sets, and ongoing regression testing so that model improvements translate into reliable business value.
Introduction: Why Post-Training Became the Main Battleground
During the evolution of large language models, pre-training determines a model’s breadth of knowledge and its upper bound on language capability, while post-training determines whether those capabilities can be unlocked and expressed in a way that aligns with human expectations. In recent years, as high-quality public corpora have gradually been exhausted, simply scaling up pre-training has started to yield diminishing returns. As a result, more and more technical teams are investing resources in the post-training stage, especially in alignment and reasoning improvements driven by reinforcement learning (RL).
The core idea behind this “re-training” approach is that a model acquires world knowledge during pre-training, yet its performance on tasks such as complex reasoning, code generation, and aesthetic judgment remains unstable. By using reinforcement learning to let the model receive reward signals across large numbers of interactions, its performance on long-chain reasoning, instruction following, and subjective quality dimensions can be markedly improved. This article discusses reinforcement learning principles, capability evaluation systems, multimodal and coding evaluation, and inference cost optimization.
1. Reinforcement Learning Paradigms in Post-Training
1.1 From Supervised Fine-Tuning to Reinforcement Learning
A typical post-training pipeline consists of three stages:
- Supervised Fine-Tuning (SFT): Uses high-quality human-annotated or curated question-answer data to teach the model the distribution of “correct answers.” Its strengths are stability and controllability; its limitation is that it is constrained by the style of the labeled data and struggles with open-ended questions.
- Preference Alignment: Collects preference pairs of the form “response A is better than response B,” trains a reward model, and then uses reinforcement learning to push the policy model toward higher rewards.
- Reinforcement Learning with Verifiable Rewards (RLVR): In domains with objectively correct answers, such as code and math, deterministic signals from rules or from compilers/test cases are used directly as rewards, avoiding the inherent bias of a reward model.
1.2 Core Mechanisms of Reinforcement Learning
Mainstream RL alignment methods fall into two categories: policy-gradient methods based on Proximal Policy Optimization (PPO), and direct preference optimization (DPO) and its variants that bypass an explicit reward model. The trade-off between them lies in engineering complexity and stability.
The illustrative pseudocode below shows the general training loop structure of policy-gradient methods:
# Illustrative pseudocode: a reward-driven policy optimization loopfor step in range(num_steps):prompts = sample_batch(prompt_pool, batch_size)responses = policy.generate(prompts) # sample model outputsrewards = reward_model.score(prompts, responses) # score (model- or rule-based)advantages = compute_advantages(rewards) # compute the advantage functionloss = policy_loss(responses, advantages) + kl_penalty(policy, reference)loss.backward()optimizer.step() # update policy parameters
Here kl_penalty plays a key role: it constrains the policy model from drifting too far from the reference model (the SFT model), preventing “reward hacking” — where the model emits degraded, repetitive, or abnormal text in pursuit of high rewards. In verifiable-reward settings, reward_model.score can be replaced directly with a unit-test pass rate or an answer-matching result, yielding a more reliable training signal.
1.3 The Meaning of “Re-Training”
The so-called re-training through days or even months of reinforcement learning is essentially multi-round iterative tuning of data, reward design, and training strategy. Each iteration requires balancing inference efficiency, stability, and the ceiling on capability. For engineering teams, this means substantial compute investment, meticulous reward design, and rigorous regression testing — not a one-off training job.
2. Capability Evaluation Systems
Evaluation is central to judging whether a post-training run succeeded. The industry commonly uses a combination of “composite metrics plus category-specific benchmarks.”
2.1 Composite Intelligence Index
The Intelligence Index is a ranking metric that aggregates standardized scores from multiple independent evaluation benchmarks via weighting. Its value lies in:
- Cross-model comparability: Placing different models on the same “ruler” to make selection easier.
- Reflecting overall capability: Avoiding one-sided conclusions drawn from a single dimension (such as only one subject).
It is worth noting that rankings of a composite index fluctuate with the composition of the evaluation set, version updates, and weight settings. Any “climbed to a certain rank” claim should be understood in light of the specific evaluation methodology and should not be treated as absolute truth.
2.2 Category-Specific Benchmarks
Beyond composite indices, category-specific benchmarks better reveal a model’s capability profile. Common dimensions include:
- Knowledge and reasoning: Question-answering across science, logic, math, and other subjects.
- Code generation and repair: Measuring correctness and maintainability on real programming tasks.
- Instruction following: Whether the model strictly adheres to constraints on format, length, tone, and so on.
- Multimodal understanding: The quality of parsing and describing images, charts, and documents.
A healthy evaluation system should ensure that training and evaluation data distributions do not overlap (preventing data leakage), that the evaluation process is reproducible, and that results are reported with confidence intervals.
3. Multimodal Capability: The Difficulty of Evaluating Aesthetics and Understanding
Beyond plain text, multimodal capability is becoming an important axis of model differentiation. When evaluation involves image generation or visual understanding, assessing subjective dimensions such as “visual aesthetics” is particularly difficult, for two reasons:
- No single correct answer: Aesthetics are subjective and hard to measure with a simple accuracy metric.
- Evaluator bias: Human evaluation is easily influenced by individual preferences and evaluation order.
In practice, teams typically combine “human blind evaluation + automatic metrics”: human blind evaluation controls for subjective bias and covers fine-grained aesthetic dimensions, while automatic metrics (such as image-text consistency and composition quality) enable large-scale, fast screening. For visual generation tasks, attention must also be paid to detail consistency, instruction adherence, and whether obvious artifacts are present.
4. Coding Capability: A Strong Signal in Verifiable Tasks
Coding is one of the few task types with objective means of verification, which gives it special value in reinforcement learning post-training. Common approaches for evaluating code capability include:
- Unit test pass rate: Using real test cases to judge the correctness of generated code.
- Code repair success rate: Given a defect and tests, evaluating the model’s ability to locate and fix the problem.
- Cross-language and cross-framework generalization: Testing whether the model can transfer across different languages and frameworks.
# Illustration: a test-based code capability verification flowgenerated candidate -> compile/parse -> run test suite├─ all pass -> positive sample (usable as an RL positive reward)├─ partial pass -> record pass rate (continuous reward signal)└─ compile fail -> negative sample (usable for preference pair construction)
Because test feedback is deterministic, such signals are well suited as verifiable rewards for reinforcement learning, continuously improving model reliability in real programming scenarios.
5. Inference Cost Optimization: A Practical Consideration for Enterprise Adoption
Capability gains often come with increases in parameter count and inference cost. For enterprises and developers, controlling API costs without sacrificing experience is a core engineering concern beyond model selection. The following strategies apply broadly.
5.1 Understanding the Cost Structure
API cost is generally determined by input tokens, output tokens, and the number of calls combined. The bloated context on the input side is often the largest cost driver, especially in multi-turn conversations where message history keeps accumulating.
5.2 General Optimization Strategies
- Context trimming: Cut irrelevant comments, logs, and redundant documents, keeping only necessary information.
- Prompt and result caching: Cache high-frequency, stable requests to reduce repeated billing.
- Tiered routing: Route simple tasks to lightweight models and reserve stronger models for complex tasks.
- Batching and streaming output: Use batching APIs appropriately to improve throughput, and streaming output to improve experience.
# Illustration: multi-level routing + token-budget control calling frameworkdef route_and_call(task):if task.is_simple(): # lightweight taskmodel, budget = "lite", 512else: # complex taskmodel, budget = "strong", 4096prompt = trim_context(task.context, max_tokens=budget) # trim the contextreturn client.chat(model=model, messages=prompt) # generic call abstraction
It should be emphasized that specific billing rules, API parameters, and model specifications should be based on each cloud provider’s official documentation. On platforms such as Baidu AI Cloud, generic capabilities like logging, monitoring and alerting, and usage statistics can provide visual tracking and alerts for API costs, enabling fine-grained cost governance.
6. Practical Recommendations for Enterprise Selection
Drawing on the dimensions above, enterprises adopting large model capabilities should follow these principles:
- Select around the task: First define the business’s core task (question-answering, coding, visual understanding, etc.), then examine the corresponding category-specific benchmarks rather than blindly chasing composite rankings.
- Build your own evaluation set: Construct a small evaluation set from real business data to validate model performance in actual scenarios, instead of relying solely on public leaderboards.
- Prioritize cost control: At comparable quality, prefer the option with better API cost efficiency, and combine context trimming with tiered routing to control long-term spending.
- Consider stability and compliance: Evaluate the service’s availability, rate-limiting policies, and data compliance capabilities to ensure reliability in production.
- Run continuous regression testing: Model versions iterate, so run a regression evaluation before upgrading to prevent capability fluctuations from affecting production performance.
Conclusion
Reinforcement learning post-training is becoming the key engine for improving large model capabilities, while capability evaluation and cost optimization determine whether those capabilities truly translate into business value. For developers and enterprises, understanding the complete chain of “pre-training as the foundation, post-training as the trigger, evaluation as the gatekeeper, and cost as the constraint” is more meaningful in the long run than chasing the short-term ranking of a single model. By viewing composite indices rationally, valuing category-specific evaluations and internal validation, and pairing them with refined cost governance, you can build sustainable, deployable solutions in the era of large models.
