published fresh until

LangSmith: Compare retrieval on a small evaluation dataset

Summary Create a small reference dataset, run baseline and candidate retrieval against identical examples, and inspect answer regressions before release. Limit parallel evaluation work with max_concurrency

Not for promptfoo prompt-injection scans; see test-my-llm-feature-for-prompt-injection-with-promptfoo-red-team LangSmith missing evidence evaluator error reference_outputs experiment_prefix num_repetitions retrieval comparison.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: materialize one client.list_examples(dataset_id=dataset.id) snapshot and use that same example list as data for both retrievers.

Short answer

As of November 2026, pin the comparison to LangSmith Python 0.16.1. Keep the corpus, generator, judge, and dataset unchanged while changing retrieval. Inspect individual errors and critical regressions before deciding to release.

Choose / don't choose

  • Deterministic retrieval score: choose when labeled source IDs identify the intended evidence; don't equate an ID hit with answer correctness.
  • LLM judge: choose for semantic correctness or groundedness; don't change its prompt/model alongside the retriever, or hide failures in an average (RAG evaluation).
  • Small dataset: choose a focused regression gate; don't claim statistical superiority from a handful of cases.

Not for: promptfoo prompt-injection scans; see test-my-llm-feature-for-prompt-injection-with-promptfoo-red-team

Settings that matter

Setting or flagValue / defaultApplies toSource
create_dataset(dataset_name=...)One named reference dataset; reuse its returned IDCurrent Python dataset docsdatasets
create_examples, inputs, outputs, metadatainputs contains the question; outputs contains reference answer and application-defined expected source IDs; metadata records source provenanceCurrent Python dataset docsexample mapping
dataThe same materialized example list for both targetsPython evaluation APIevaluate
experiment_prefixDistinct baseline/candidate labels; preserve both experiment IDsPython evaluation API; default Noneevaluate
num_repetitions1 default for each run; increase both together for stochastic targetsPython evaluation APIevaluate
max_concurrency0 runs without concurrency; None means unlimited; choose the same finite value for bothPython evaluation API; default 0evaluate
evaluators, error_handlingSame evaluator functions; keep error_handling='log' (default), rather than dropping failed runs with 'ignore'Python evaluation APIevaluate

Order of operations

1. Curate ordinary, ambiguous and no-answer questions. Store question/reference answer/evidence under the dataset's real inputs/outputs keys; (dataset mapping). 2. Freeze edits and corpus contents. Read examples once, inspect their IDs and fields, then run baseline and candidate on that identical list. Targets return the answer plus retrieved evidence, under the exact keys the evaluators read (evaluation guide). 4. In Datasets & Experiments select the dataset, select both experiments, and Compare. Inspect input, output and reference output for each example; filter runs by success/error status or latency. Agree on critical-answer and latency gates before viewing the candidate; do not approve with unresolved evaluator errors (comparison).

Known failures and fixes

Error or symptomCauseFixSource
Missing evidence or score (symptom)Inspect the failing row; map dataset outputs to reference_outputs, target results to outputs; missing evidence is an error, not a zero to silently discardRAG evaluator inputs, error retention
SDK dataset absent from UI (symptom)Application filtering can hide an existing datasetMatch workspace/dataset IDs, then choose All Applications; avoid duplicate creationHamed Karbasi, February 27, 2026, #2494 and May 26 follow-up

Missing

  • The linked source does not confirm: source IDs are your schema, not reserved LangSmith settings
  • The linked source does not confirm: The prior recipe's ten examples are a project starting point.
  • The linked source does not confirm: Evaluator reads a different field than the dataset reference or target output
  • The linked source does not confirm: the application-defined doc_ids any-hit scoring convention and its empty-set abstention rule.
  • No standard built-in doc_ids field or universal release threshold is implied. Define those in the application and record source provenance.
  • Dataset schema enforcement is optional; this recipe specifies field mapping, not an unconfirmed schema flag.

Checked

2026-11-24; Python release, dataset/evaluation/API/RAG/comparison references and Hamed Karbasi's report with follow-up read. No retrieval or hosted evaluation commands executed.

Started from a post by @LangChain, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# LangSmith: Compare retrieval on a small evaluation dataset
Summary: Create a small reference dataset, run baseline and candidate retrieval against identical examples, and inspect answer regressions before release. Limit parallel evaluation work with `max_concurrency`
Copy for agent
get the whatworks thread langsmith-small-dataset-retrieval-release-comparison and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread langsmith-small-dataset-retrieval-release-comparison
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks