AI NewsProductivityAnnouncement

LangChain fine-tuned GLM 5.3 Flash on its traces for $12 per 1,000

LangChain fine-tuned GLM 5.3 Flash on its own docs-agent traces. The fine-tune scores 0.735, close to GPT-6.1 Sol at 0.748, at $12 per 1,000 questions.

AI News

Editorial2 min read

LinkedInX
Scatter chart showing a fine-tuned open model near the quality of a larger closed model, at a fraction of the cost

Why it mattersProduction traces are training data a team already owns. A fine-tuned small model can match a bigger closed model on a narrow job, at a fraction of the cost.

LangChain wrote up how it fine-tuned GLM 5.3 Flash on traces from Chat LangChain. Chat LangChain is its own documentation agent. The fine-tuned model now runs in production beside GPT-6.1 Sol and Gemini 3.5 Flash Lite. LangChain posted the method, the scores and the cost on its blog.

The scores and the cost

LangChain scores agent runs from -0.5 (confidently wrong) to 1 (correct and complete). The base GLM 5.3 Flash scores 0.679 on its held-out benchmark. GPT-6.1 Sol scores 0.748. The fine-tune scores 0.735. That is close to the bigger closed model, on a small open one.

The real difference shows up in cost. LangChain says Sonnet 5.5 costs $192 per 1,000 questions on this job. Opus 5.5 costs $330. Gemini 3.5 Flash Lite costs $20. The fine-tune costs $12. So the fine-tune matches GPT-6.1 Sol quality at under 7 percent of Sonnet 5.5's bill.

How they did it

Chat LangChain answers questions about the LangChain stack from the docs and the public support base. Every run is already logged as a trace. LangChain grouped the traces into usage patterns. It then built answer keys and automated graders on top of each pattern. The held-out benchmark has 128 questions. LangChain picked questions the base model got wrong, so the benchmark is harder than production traffic by design.

The team tried three training methods and kept the best one.

  • SFT trains the student on full runs from a larger teacher.
  • GRPO is reinforcement learning that penalises extra tool calls.
  • Answer-only DPO tunes on the final answers and ignores the reasoning steps.

All three beat the base model. The winning one scored highest on groundedness. Groundedness, in LangChain's words, measures whether an answer is backed by the docs the agent retrieved.

The caveats LangChain states

The fine-tune is about twice as slow as Gemini 3.5 Flash Lite. At first, 18.7 percent of runs took more than 30 seconds. That is now 5.9 percent, after work on the serving stack. LangChain also tracks user follow-up rate as a sign of frustration. For the fine-tune it is 36 percent. For Gemini it is 41 percent.

LangChain also notes research overhead went up with some methods. SFT doubled tool calls per question. The held-out benchmark was built to be hard. So a 0.056 score gain over the base model on it is worth more than it looks.

The method here is the real takeaway. A team with a running agent and clean traces can try a small open model on its own data. They can grade it with the same rules they already use in production. Then they can publish the version that wins. The cost column is the strongest reason to do this work this quarter.

Source

SourceLangChain

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project