Why LLM Coding Ability Dives While Others Advance: Pretraining Is Level, but Post-Training Alignment Sets the Gap

    Many people assume one AI lab had a head start over another. The facts say otherwise: the same core researchers who trained the earliest large-scale autoregressive language models also later founded separate groups to build chat models. Once the pretraining foundation is similar, the real divergence in code generation, long-document understanding, and multi-turn dialogue comes from what happens after pretraining—alignment and reinforcement learning. This article examines the standard RLHF pipeline, the structural limits of outsourced preference scoring, and how verifiable rewards (RLVR) plus engineering-heavy alignment open a lasting gap. It also offers practical guidance for teams: build verifiable evaluation sets, keep preference data auditable, defend against reward hacking, align in stages, and run continuous regression tests.

    1. Correcting a Common Misconception: The Starting Line Was the Same

    A familiar narrative in the tech world frames one organization as the pioneer and another as the latecomer. But a look at the authors of the two 2020 papers that laid the modern foundation for large language models tells a different story. The core team that first trained large-scale autoregressive language models and the people who later broke away to build conversational models were largely the same group.

    In January 2020, a paper introducing a power-law relationship between model scale and loss pushed “scaling laws” onto the engineering agenda. Among its first author and core co-authors were a future head of a cloud vendor’s research institute and the lead author of the GPT papers. In May of the same year, a paper on a 175-billion-parameter autoregressive language model was released. Its first author was again that GPT lead author, and the vice president who oversaw development was one of the core co-authors of the scaling laws paper. In early 2021, this group—holding the full pretraining recipe and engineering details—left en masse to start a new organization, and even the key figure behind neural network interpretability went with them.

    So “who took off first” was largely a matter of release timing. In late 2022, a conversational product reached the public first and went viral almost overnight. This was not because the other side’s first conversational model had not finished training—it had actually completed training, but management had kept it under closed internal testing over concerns about safety incidents. Meanwhile, the party that shipped first decisively wrapped a dialogue interface around its previous-generation model and launched it, seizing the early-mover window.

    The conclusion is clear: when the pretraining foundation is the same, the later gaps in code generation, long-document understanding, and the feel of multi-turn dialogue come not from “who started earlier” but from the post-pretraining alignment and reinforcement learning approach.

    2. Standard Reinforcement Learning from Human Feedback: What It Actually Optimizes

    In March 2022, a paper on “training language models to follow instructions with human feedback” established the standard industry workflow, typically broken into three steps:

    1. Supervised fine-tuning (SFT): Teaching the model “what a good answer looks like” using human-written demonstration responses.
    2. Training a reward model (RM): Having annotators choose between two responses to the same prompt, then training a scoring function on this pairwise preference data.
    3. Reinforcement learning optimization (RLHF/PPO): Using the RM’s score as the reward, combined with a KL penalty to prevent drifting too far from SFT.

    Illustrative pseudocode (expressing the flow only, not tied to any specific interface):

    1. # 1) Preference data -> reward model
    2. for prompt, y_win, y_lose in preference_pairs:
    3. loss += -log_sigmoid(rm(prompt, y_win) - rm(prompt, y_lose))
    4. # 2) Policy optimization with KL to prevent drift
    5. for prompt in batch:
    6. y = policy.sample(prompt)
    7. r = rm(prompt, y) - beta * kl(policy(y|prompt), ref(y|prompt))
    8. loss += -r * log_prob(policy, y)

    This method worked very quickly in its early days: the model went from a “continuation machine” to “an obedient assistant.” But a problem was baked in here too—the quality ceiling of the reward signal is the quality ceiling of the annotation signal.

    3. Three Structural Flaws of Outsourced Scoring

    When models grow stronger and tasks get harder, outsourced preference annotation—often done at a few dozen seconds per item—starts to backfire:

    • Lack of verifiability: Annotators have no time to line-by-line verify whether 300 lines of code will run, nor to check deep logical consistency.
    • Over-rewarding surface features: Neatly sectioned formatting, plenty of bold subheadings, and opening with a compliment to the user—these “looks professional” presentation traits earn high scores.
    • High inter-annotator variance: Different people judge “looks better” differently, so the RM learns an average taste rather than correctness.

    This directly produced two habits in early models that frustrated developers.

    Flaw One: Code That “Looks Right but Won’t Run”

    The model learned to generate code that is structurally beautiful, fully commented, and seemingly complete in exception handling—but riddled with edge-case failures, type mismatches, and dependency version conflicts. At its core, the RM cannot execute code; it can only score the surface of text, so the policy model naturally optimizes “readability” instead of “runnability.”

    Flaw Two: Sycophantic Answers and Hallucinatory Confidence

    Opening with praise for the user, leading with conclusions, and stating uncertain things with absolute confidence. This happens because “going along with the user” almost always wins in preference data. In long-document scenarios, it shows up as extracting seemingly relevant but misattributed passages and presenting them in the same confident tone.

    4. How the Gap Opens Up: Verifiable Rewards and Engineering-Heavy Alignment

    The core difference of the leading side is gradually replacing “human preference” with verifiable rewards (RLVR) and a more engineering-driven alignment pipeline:

    1. Execution-based rewards: For coding tasks, using unit test pass rates, static analysis, and sandbox execution results as rewards rather than text preference.
    2. Formal or semi-formal verification: For math and logic problems, using answer comparison and constraint-solver verification.
    3. Process rewards and search: Scoring reasoning chains step by step, combined with rejection sampling, majority voting, and tree search to improve accuracy.
    4. Long-context engineering: Retrieval augmentation, chunked summarization, position-encoding extrapolation, and context compression to mitigate “lost in the middle.”
    5. Separating safety from usefulness: Using an independent safety policy and red-team evaluation so that safety constraints don’t crush usefulness along with them.

    On the engineering side, these capabilities typically run on general-purpose cloud infrastructure: container platforms for sandbox execution, object storage for datasets and checkpoints, message queues to decouple annotation from training, and logging, monitoring, and alerting to track reward curves and regressions.

    5. Practical Recommendations for Teams

    • Build a verifiable evaluation set first: Code measured by unit test pass rate, long documents by citation accuracy and faithfulness, dialogue by multi-turn task completion rate—don’t rely on human evaluation alone.
    • Make preference data auditable: Introduce execution results, cross-annotation, and expert arbitration to reduce variance.
    • Design rewards to resist gaming: Use KL constraints, reward clipping, and periodically check for reward hacking with a held-out adversarial set.
    • Align in stages: First SFT to establish formatting and instruction-following, then RLVR to improve correctness, and finally safety alignment to close things out.
    • Run continuous regression: Run the full evaluation suite on every alignment iteration to prevent the see-saw effect of “coding gets stronger while dialogue gets worse.”

    In one sentence: the starting line is the same, and the deciding factor is after pretraining—whoever can upgrade the reward signal from “pleasing to humans” to “verifiable by machines” will pull ahead by a defining gap on hard tasks like coding and long-document handling.