π LangSmith
Descriptionβ
< What is it? >β
- Definition: LangSmith is a platform for observing, debugging, and evaluating LLM applications. It also provides prompt-management and deployment capabilities. It works with multiple frameworks and model providers; using LangChain is not a requirement. See LangSmith observability.
- Example: a developer can inspect a RAG request to identify the retrieved documents, model response, tool calls, and the stage responsible for a failure.
Key pointsβ
< Tracing an application >β
- Trace: a record of an application execution, including its instrumented component runs. Parentβchild relationships connect retrieval, model calls, and tool execution to the overall request.
- Recorded information: depending on instrumentation, runs include inputs, outputs, timings, errors, and metadata. Tracing records what the application exposes; it does not automatically reveal every internal operation.
- Ecosystem role: dashed arrows in the LangChainβLangGraphβLangSmith diagram represent tracing events. Recording those events is separate from selecting the workflow's next action.
< Evaluating answer quality >β
- Datasets and experiments: run application versions against a dataset and compare their results. Evaluators can use code, human review, or model-based judgments.
- Offline evaluation: test selected examples before releasing a change, including previously observed failures.
- Online evaluation: assess production interactions using configured evaluators. A trace supplies evidence about execution; quality assessment requires evaluation criteria. See the LangSmith evaluation guide.
Comparisonβ
< Observability vs. evaluation in LangSmith >β
-
Different questions: tracing and evaluation complement each other.
Capability Question Example Observability What happened during this request? Retrieval returned D17, and the model answered β60 daysβEvaluation Did the result satisfy the task? Fail a factual-consistency check because D17states β30 daysβ
Examplesβ
< Turn a failed answer into a regression case >β
- Illustrative input: βHow long do I have to return headphones?β The retrieved policy states β30 days,β but the application answers β60 days.β
- Inspection: use the trace to check the retrieved policy and the context actually passed to the model. This helps distinguish retrieval errors from answer-generation errors.
- Evaluation case: save the question, relevant context, and expected fact of
30 daysas a test case. Compare the original and revised application using a criterion that checks factual agreement, including paraphrased answers. These are illustrative records, not results from a live LangSmith experiment.
Related ideasβ
- LangChain contains the ecosystem diagram and tool comparison.
- LangGraph controls stateful application workflows.
- Agentic RAG Observability explains what to record and how to debug it.
- Agentic RAG Evaluation explains datasets, metrics, and evaluation design.