Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

LangChain 6 min read Announcement easyNovice

Aligning LLM-as-a-Judge with Human Preferences

LangSmith evaluators now store human corrections to LLM-as-a-Judge scores as few-shot examples, optionally with explanations, and inject them into the judge prompt on later runs so the evaluator aligns with team preferences without manual prompt engineering. LLM judges work because they can see information the generator lacked, such as reference answers, and because judging is easier than generating. Common uses are detecting RAG hallucinations, RAG correctness and toxic outputs, in both online and offline evaluation. The design draws on few-shot learning and Shreya Shankar's Berkeley paper "Who Validates the Validators?".

Assumes: LLM promptingfew-shot learning

Related posts

  • Why human insight is a strategic advantage for building better agents

    LangChain easyNovice

    Human review of agent traces supplies the domain judgment that automated evals lack, and it works best when reviewers see the full multi-turn conversation rather than an isolated step. Reviewer scores and written reasoning, captured in annotation queues, can be reused to align LLM judges by comparing their scores against human labels, to fix online evaluators that keep missing the same failure, and to seed golden datasets for offline regression testing. LangSmith now supports whole threads as annotation-queue items, shown as a readable trajectory, and Fetch Rewards uses this to check tool grounding, product images and offer availability before tuning its automated judges.

  • Evaluating the Evaluators: Investigating LLM Judges for Personalized Writing Style Assessment

    Apple Machine Learning Research hardMaster

    LLM judges used to check whether generated text matches a user's preferred writing style (e.g., "upbeat") agree with human pairwise preferences only unevenly, and judge quality correlates weakly with general ability as measured by MMLU (Pearson's ρ ≤ 0.2). Using four generator LLMs across three long-form writing tasks, agreement varied by task and by criterion (general helpfulness vs. style personalization). Judges were more consistent and accurate with paired comparisons than with independent scoring. The strongest LLMs did not best reproduce human judgments, possibly because they are overly sensitive to subtle details humans ignore.

  • Rethinking LLM Evaluation with 3C3H: AraGen Benchmark and Leaderboard

    Hugging Face hardMaster

    AraGen is a generative benchmark and leaderboard for Arabic LLMs built on 3C3H, an LLM-as-judge measure that scores responses on Correctness and Completeness (binary) plus Conciseness, Helpfulness, Honesty and Harmlessness (1-5, normalized to [0,1]). Any incorrect answer zeroes every other dimension, and the six scores are averaged across samples. The 279 mostly human-verified questions cover QA, reasoning, orthographic/grammatical analysis and safety, in single-turn, conversational and follow-up formats, with follow-up first answers weighted 2:1. To limit contamination, test sets stay private for three-month cycles and are then released with the evaluation code, and candidate judges such as GPT-4o were compared empirically before one was chosen.

  • Expert Support case study: Bolstering a RAG app with LLM-as-a-Judge

    Hugging Face mediumAdept

    Digital Green's Farmer.chat, a GPT-4o ReAct agent backed by a RAG pipeline over ~46,000 agricultural research papers (semantic chunking, Qdrant), uses LLM-as-a-judge to evaluate prompt clarity, question type, answered rate and RAG faithfulness at scale. The faithfulness judge, a RAGAS-inspired binary NLI prompt that checks atomic statements against retrieved context, correlated well with human raters on ~360 questions. Benchmarking four LLMs on 700+ queries showed Gemini-1.5-Pro was most faithful (91%) but left 19.4% unanswered, so the team chose Gemini-1.5-Flash for its balance of 89% faithfulness and only 4.5% unanswered.

  • From Static Help Content to a RAG-Based Onboarding Agent for Partners

    Booking.com Data Science mediumAdept

    Booking.com's registration-flow chatbot for self-managed partners gave weak answers even though retrieval surfaced the right documents, and the cause turned out to be upstream data quality rather than the model. A manual audit of the embedding store found navigation and breadcrumb noise, chunks too small to carry needed context, and irrelevant partner-specific content. These fixes were built into the periodic ingestion script, and the agent was re-architected to choose among separate retrievers: general help articles, a registration-process knowledge base with rephrase-and-retry, and pre-approved templated answers for legally sensitive questions. In an A/B experiment scored across about 2,000 conversations, LLM-judged task completion rose 1.33x and answer relevance and refusal rate improved, with the lesson that automated judges flag weak retrieval but human inspection of retrieved chunks is needed to find the fix.

The quest for software engineering knowledge.

Look:
Layout: