Skip to main content

Prompt Engineering Quick Start (UI)

This quick start will walk through how to create, test, and iterate on prompts in LangSmith.

QuickStart

This tutorial uses the UI for prompt engineering, if you are interested in using the SDK instead, read this guide.

1. Setup

The only setup needed for this guide is to make sure you have signed up for a LangSmith account.

2. Create a prompt

To create a prompt in LangSmith, navigate to the Prompts section of the left-hand sidebar and click on the “+ New Prompt” button. You can then modify the prompt by editing/adding messages and input variables.

3. Test a prompt

To test a prompt, set the model configuration you want to use, add your LLM provider's API key, specify the prompt input values you want to test, and then click "Start".

To learn about more options for configuring your prompt in the playground, check out this guide. If you are interested in testing how your prompt performs over a dataset instead of individual examples, read this page.

4. Save a prompt

One you have run some tests and made your desired changes to your prompt you can click the “Save” button to save your prompt for future use.

5. Iterate on a prompt

LangSmith makes it easy to iterate on prompts with your entire team. Members of your workspace can select a prompt to iterate on in the playground, and once they are happy with their changes, they can simply save it as a new commit.

To improve your prompts:

You can also tag specific commits to mark important moments in your commit history:

6. Next steps


Was this page helpful?


You can leave detailed feedback on GitHub.