RLing Qwen to Write Better
Retraining a small LLM with RL to follow my rules for clear writing
Contents
↑ Back to topI saw a funny comment on X that LLMs have become good at everything except writing. We all know the “style” (or lack thereof) of writing that LLMs use, filled with passive, obfuscated slop. Tired of pasting my list of rules for stronger writing into every prompt, I tried retraining a model on those rules so it gets it right the first time. Inspired by Kevin Wu’s blog post on RL to retrain an LLM, I took Qwen3-1.7B, a small local model, and used reinforcement learning to teach it my writing rules.
Training on cleaned-up examples and then running RL produced a model that follows my rules 6.5 points more often than the base model. I found that the harder problem was stopping models from claiming fabricated results.
Why do LLMs write like that?
Large language models are phenomenal at marketing, speaking in sycophantic slogans and flowery writing that lacks substance. Good writing is marked instead by how clearly it communicates an idea. Human raters score polite, tidy drafts highly, so the model learns that em dashes, “delve”, “tapestry” and the “it’s not just X, it’s Y” turn earn a high reward, and the same pressure sands off the tangents and idiosyncratic humor that mark a person’s writing (Thompson, 2025; NYT, 2025). It also pulls models from different labs toward one safe corporate register. A model has no lived experience and no read on what its reader already knows, so it over-explains, falls into neat roadmaps and tidy conclusions, and prefers abstraction, as it is unable to provide the specific details that a human would (Reinhart et al., 2025).
Why should we care?
When a model drafts an email for you, it can fail in two ways. It can sound generic, and it can state something false that you then send under your name. Neither problem goes away with a stronger model or a longer prompt. With my style guide as its system prompt, the base Qwen3-1.7B did slightly worse than with no prompt at all, 41.5% against 45.0% on the measure defined below. Claude Opus 5.5 passed every rule on 16% of drafts from a bare prompt and on 50% with the guide. This guide can help a frontier model, but half of its drafts still violate my rules.
Why can’t a model just follow the rules?
Some constraints are free to enforce. To ban a letter, you can block every token containing it at decoding time. My rules live in grammar and phrasing. Spotting a passive takes a parse, and a superlative takes a phrase list, so no token mask can carry them. So I had to write each rule into the reward as a checker.
Here are the rules, each scored by its own checker:
- Active voice: name who acts, so “The results were validated” fails. This rule counts three times as much as any other because of how dramatically it improves readability and clarity.
- No superlatives: no “best”, “most important”, “groundbreaking” or “novel”.
- No banned phrasing: no stock clichés, and no “I” plus a present-tense verb for ongoing work, such as “I aim” or “I study”.
- No performed tone: no put-on curiosity or dramatic openers like “Imagine…”.
- No contrastive framing: no “rather than”, “instead of” or “not just X but Y”.
- Punctuation: no em dashes, and at most one colon per paragraph.
- Short lists: no more than three items in a list.
- Sentence flow: no run-ons, and no choppy strings of very short sentences.
- No origin stories: no “ever since I…”.
- Length: stay in the word range for the genre, with no fragments or repetition.
Experiment 2 added two more:
- No invented facts: a number, date or name the prompt never gave should be a [blank] instead.
- Agency: at most a quarter of the sentences may hide who acts behind an abstract subject or a weak verb.
A judge model also rates every draft from 1 to 5 on two axes:
- Coherence: does the draft read as clear, connected writing?
- Responds: does it answer what the prompt asked for?
I scored every draft in this post with one measure. A draft is usableEvery rule checker passes, and a judge model rates the draft at least 4 of 5 on coherence and on answering the request. The judge never sees the rules. when it passes every rule and the judge accepts it.
A checker also invites gaming. A model that learns my checker bans “I aim” can write “My goal is”, which passes and changes nothing a reader would notice. So I also had the eval log substitute probesCounters that never enter the reward, such as spaced hyphens in place of em dashes. If a rule improves while its probe rises, the model may be dodging the rule. for each rule.
Why RL, and why GRPO?
Each answer is one episode: the prompt sets the starting state, each token is an action, and one reward arrives at the end (Sutton and Barto, 2018). Value methods such as DQN estimate the worth of every action, which suits a small set of moves (Mnih et al., 2015). A language model picks from many thousands of tokens at every step, so I used a policy gradientRaises the probability of the tokens in answers that scored well and lowers it for answers that scored badly (Williams, 1992)..
A raw reward means little alone, because 0.93 is good or bad only next to what the model usually writes for that prompt. PPO trains a second network to estimate that number (Schulman et al., 2017). GRPOGroup Relative Policy Optimization. It samples a group of answers per prompt and scores each one against the group’s mean (Shao et al., 2024). skips that network and uses the mean of a group of samples, which saved me a whole network on my laptop.
The group baseline also predicts which rules can move. Two answers with equal scores give the gradient nothing, so a rule pushes the model only when its score differs between samples from the same prompt.
Experiment 1: Examples, then RL
I first fine-tuned the model on examples, then ran RL against my rules and a judge.
Setup
- Model: Qwen3-1.7B with thinking off, trained through a rank-16 LoRAA small trainable add-on to a frozen model’s weights (Hu et al., 2022)..
- Examples: 95 answers from Qwen3-4B, given my guide, that passed every rule and the judge.
- RL: 125 steps of GRPO with 4 prompts × 8 samples, temperature 0.7, and a KL penalty that holds the policy near the fine-tuned model.
- Reward: 0.5 × rule score + 0.5 × judge score, with Qwen3-4B as a local judge.
- Metric: usable rate on 50 held-out prompts × 4 samples, with 90% intervals from a paired bootstrap over prompts.
Results
| Method | Usable | Change vs. base [90%] |
|---|---|---|
| Base | 45.0% | reference |
| Base + style guide in the prompt | 41.5% | −3.5 pts [−10.5, +3.0] |
| Fine-tuned on examples | 29.5% | −15.5 pts [−22.5, −8.5] |
| Fine-tuned, then RL | 53.0% | +8.0 pts [+2.0, +13.5] |
Here are the base and RL models on the same prompts. I highlighted the phrase behind each failure:
Findings
- Fine-tuning made my model worse: 29.5% usable, 15.5 points below base. A note I gave the example writer about sentence length came out as clipped sentences, and fine-tuned blurbs passed the flow rule 22% of the time against 100% for base.
- Active voice didn’t move: it sat at 73 to 74% for every model. Its reward score already averaged about 0.95, which left GRPO almost no difference between samples to learn from.
Takeaways
- A rule a parser can check is a rule RL can push, as long as its score varies between samples.
- Example data sets the model’s habits. RL polishes those habits and doesn’t question them.
So RL mostly undid what fine-tuning broke. But look at the third pair above! The RL email invents a loss of 0.25 after 1000 epochs and a 15% gain, and my reward scored that email as usable.
What the score missed
A bug in my own checker. My superlative pattern matched the sign-off “Best regards”, so for a day the base model sat at 16.5% and RL looked far ahead. One regular expression moved my baseline by 28 points! Since then, I’ve re-scored the baseline after every checker fix.
Invented facts. A writing assistant knows only what the prompt tells it. Every RL status email stated results that the prompt never gave, and a third of my training examples stated facts the prompt never gave too. It also leaves fewer blanks than base.
| Any invented fact | Status emails | Leaves a blank | |
|---|---|---|---|
| base | 1.5% | 8.3% | 34.0% |
| sft | 19.0% | 100.0% | 10.0% |
| rl | 17.0% | 100.0% | 16.5% |
| SFT data | 33.7% | 92.3% | 29.5% |
Answers that state a number, date or name the prompt never gave.
Slop. I also flagged sentences that hide who acts, such as “The project highlighted the importance of interdisciplinary collaboration”. That sentence passes every rule I wrote. No rule paid for naming an actor, so RL had no reason to keep doing it.
| Any slop flag | Abstract subject | Weak main verb | |
|---|---|---|---|
| base | 52% | 24% | 6% |
| sft | 28% | 16% | 3% |
| rl | 38% | 26% | 7% |
Share of sentences with a flag.
Reading the outputs. I read 20 random RL answers. None dodged a rule mechanically, and all 9 failures were real. But 6 of the 11 passes still broke my guide in ways the checkers miss, such as “invaluable” as an unsupported superlative. The eval also flagged possible gaming: “I aim” fell from 62 uses to 18, usually replaced by “My goal is to”.
Experiment 2: Clean data and two new rules
Both holes pointed to the same fix, so I retrained with better examples and a reward that pays for what the first one ignored.
Setup
- Examples: 57 of the 95 original examples that invent nothing, plus 32 new ones that pass the new checks.
- New rules:
no_inventedpays for facts the prompt gave and for blanks, andagencypays for sentences that name who acts. - Training and metric: same as Experiment 1, reported on all 13 rules and on the first 11.
Results
| Usable, 13 rules | Usable, first 11 | Invents a fact | Passes agency | Flagged sentences | |
|---|---|---|---|---|---|
| base | 31.0% | 45.0% | 1.5% | 52.0% | 31.3% |
| rl | 21.5% | 53.0% | 17.0% | 42.5% | 31.4% |
| sft2 | 32.5% | 36.0% | 3.5% | 68.5% | 19.2% |
| rl2 | 37.5% | 51.5% | 4.0% | 57.5% | 20.4% |
| Comparison | 13 rules | 90% interval | First 11 | 90% interval |
|---|---|---|---|---|
| rl2 − base | +6.5 pts | [+2.0, +11.0] | +6.5 pts | [+0.0, +13.0] |
| rl2 − rl | +16.0 pts | [+9.0, +23.5] | −1.5 pts | [−7.5, +4.5] |
| rl2 − sft2 | +5.0 pts | [+0.5, +10.0] | +15.5 pts | [+8.5, +22.5] |
sft2 and rl2 train on the cleaned examples, and rl is the first run. Flagged sentences hide who acts or lean on a weak verb.
Findings
- Paying for agency worked: with no pay for it, the first RL run raised the flagged share from 21% to 31%. With pay, this one held it at 20%. The rule’s pass rate did fall from 68% to 57%, but that came from my rounding. RL merged short sentences, and shorter drafts got a smaller allowance.
- An old hole came back: the model used “I” a quarter less after RL while banned phrasing rose 14 points. Avoiding “I” dodges the rule, and the sentences stay as they were.
Takeaway: RL trades away whatever the reward leaves out. Paying for agency stopped that trade, and the model’s remaining flaws sit where my checkers don’t look.
Which brings me to the next hole. About 7 of 20 answers I read still claim results the prompt never gave, such as “improved performance”, and my check only looks for numbers, dates and names. Two answers also treated flux variability analysis as ecosystem gas flux, and the judge gave both 5 out of 5.
Experiment 3: Claims with no number
Can I catch a made-up claim when it has no number in it?
Setup
- Check:
claims.pyflags a sentence when the writer or the writer’s project asserts a fact the prompt never stated. - Labels: two Claude models labeled 120 drafts under one guide and agreed at kappa 0.90. Neither labeler is a person.
- Validation: precision 0.87 [0.82, 0.91] and recall 0.82 [0.76, 0.88] on 20 prompts I kept out of the building. I saw that score once before fixing a parsing bug, so it may run a little high.
Results
| Model | Claims per draft | Any claim | Essay | Blurb | |
|---|---|---|---|---|---|
| base | 1.68 | 60% | 0.66 | 1.19 | 3.27 |
| base_rules | 1.70 | 54% | 0.54 | 1.09 | 3.58 |
| rl | 3.00 | 66% | 1.41 | 1.68 | 6.09 |
| rl2 | 3.04 | 73% | 1.51 | 1.63 | 6.17 |
| sft | 4.04 | 68% | 1.16 | 2.71 | 8.50 |
| sft2 | 4.07 | 70% | 1.29 | 2.93 | 8.22 |
| opus_plain | 2.14 | 82% | 2.06 | 1.24 | 3.19 |
| opus_rules | 2.30 | 80% | 1.94 | 1.59 | 3.44 |
The 1.7B rows use 4 samples per prompt, and the Opus rows use 1. A claim here means a sentence the writer must check, and it may be true.
Findings
- Fine-tuning more than doubled the rate, from 1.68 to 4.04 claims per draft, and RL brought it back to 3.00.
- Clean data changed almost nothing: the first training examples carried 1.76 claims per draft and the cleaned ones 1.67, because I had cleaned them with a check that looks for numbers.
Experiment 4: A harness for any draft
RL changes one small model. But if the checks work on text, they can repair a draft from any model, or from a person. My first harness swapped invented specifics for blanks and sent flagged sentences to a reviser model. It lifted base drafts from 36% to 66% usable, which looked great! Then I read the rewrites. “The analysis provides insights into system resilience” became “The analysis analyzes system resilience”, and the false claims stayed in.
Setup
- Cutting claims: the harness cuts a claim after its verb and adds a blank, with no model involved. For example, “I’ve tested the model and it performs well” becomes “I’ve tested [what you tested]”. A cut can only remove words.
- Which claims: results in every genre, and personal claims in emails. Every other claim goes on a list for the writer, since a blurb has to describe its project.
- Checking rewrites: a rewrite fails if it brings in a verb or subject noun from outside its sentence and the request, or if it changes the main tense.
- Drafts: the first sample of 50 held-out prompts from four sources, on all 13 rules.
Results
| Drafts from | Claims per draft | In emails | Usable | Change [90%] | Slop sentences |
|---|---|---|---|---|---|
| base | 1.66 → 1.28 | 0.59 → 0.18 | 30% → 30% | +0 [−6, +8] | 53% → 44% |
| rl2 | 2.98 → 2.20 | 1.76 → 0.18 | 36% → 28% | −8 [−16, +0] | 26% → 21% |
| Opus 5.5, bare | 2.14 → 1.64 | 2.06 → 1.12 | 16% → 22% | +6 [+2, +12] | 21% → 17% |
| Opus 5.5, guide | 2.30 → 1.96 | 1.94 → 1.35 | 50% → 50% | +0 [−6, +6] | 18% → 16% |
50 drafts per row. rl2 is the second-run model, and "guide" means my style guide in the system prompt. The change column is in points.
Findings
- The big gain disappeared: on the same 11 rules as the first harness, base drafts now go from 36% to 40%, and a version with the blanks but no rewrite checks reached only 42%. So most of the fall arrived with the blanks.
- The judge marks down honest blanks: of the 9 drafts that lost usable status, 8 had claims cut to blanks and scored below 4 on responds. The usable rate penalizes a repair that removes a false claim.
Takeaway: the 30-point gain counted drafts that still carried false claims. The harness now removes those claims reliably and leaves the usable rate about where it found it.
Summary and next steps
To sum the results:
- RL against my rules: 45.0% → 53.0% usable on 11 rules.
- RL on clean data with two new rules: 31.0% → 37.5% usable on 13 rules, with invented facts at 4% against 17% for the first run.
- Claims with no number: a new check, at precision 0.87 and recall 0.82, finds 3.04 per draft from that same model.
- The harness: second-run drafts fall from 2.98 claims to 2.20, while usable drafts go from 36% to 28%.
Moving forward, I want to teach the judge that a blank is an honest answer, so the usable rate stops marking down a repair that removes a false claim. I’m also planning to stop rewriting the rules that ask for a new verb or subject, and list those sentences for the writer. The part I haven’t built is taste. My style guide is a list I wrote by hand, and every phrase I cut from a draft is a labeled example of what I want, so learning rules from a person’s edits is the next experiment. All of this rests on one seed per run and a small local judge, so I’d want more of both before trusting small differences.
Thanks for reading :)
References
- Hu, E. J., Shen, Y., Wallis, P., et al. (2022). LoRA: Low-rank adaptation of large language models. ICLR.
- Mnih, V., Kavukcuoglu, K., Silver, D., et al. (2015). Human-level control through deep reinforcement learning. Nature, 518, 529–533.
- Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. (2017). Proximal policy optimization algorithms. arXiv:1707.06347.
- Shao, Z., Wang, P., Zhu, Q., et al. (2024). DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv:2402.03300.
- Sutton, R. S., and Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd ed.). MIT Press.
- Williams, R. J. (1992). Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8, 229–256.