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.
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.
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:
To help with iterating on your prompts in LangSmith, we’ve created Prompt Canvas — an interactive tool to build and optimize your prompts. Learn about how to use Prompt Canvas.
You can also tag specific commits to mark important moments in your commit history: