- Dataset: A set of test inputs (and optionally, expected outputs).
- Target function: The part of your application you want to test—this might be a single LLM call with a new prompt, one module, or your entire workflow.
- Evaluators: Functions that score your target function’s outputs.
Prerequisites
Before you begin, make sure you have:- A LangSmith account: Sign up or log in at smith.langchain.com.
- A LangSmith API key: Follow the Create an API key guide.
- An OpenAI API key: Generate this from the OpenAI dashboard.
- UI
- SDK
1. Set workspace secrets
In the LangSmith UI, add your model provider’s API key as a workspace secret:- Open Settings. If your organization has workspaces, select Workspace at the top of the sidebar and pick the workspace that needs the secret. Under Configuration, select Secrets.
- Click + Secret. Under Provider, select your model provider, enter your API key, and click Save.
2. Create a prompt
The Playground makes it possible to run evaluations over different prompts, new models, or test different model configurations.- In the LangSmith UI, click Playground in the sidebar.
-
Under the Prompts panel, modify the system prompt to:
Leave the Human message as is:
{question}.
3. Create a dataset
- Click Set up Evaluation, which will open a New Experiment table at the bottom of the page.
-
In the Select or create a new dataset dropdown, click the + New button to create a new dataset.


-
Add the following examples to the dataset:
- Click Save and enter a name to save your newly created dataset.
4. Add an evaluator
- Click + Evaluator and select Correctness from the Prebuilt Evaluator options.
- In the Correctness panel, click Save.
5. Run your evaluation
-
Select Start on the top right to run your evaluation. This will create an experiment with a preview in the New Experiment table. You can view in full by clicking the experiment name.


Next steps
- For more details on evaluations, refer to the Evaluation documentation.
- Learn how to create and manage datasets in the UI.
- Learn how to run an evaluation from the Playground.
Connect these docs to your agent of choice via MCP for real-time answers.



