diff --git a/docs/docs/cloud/how-tos/img/studio_playground.png b/docs/docs/cloud/how-tos/img/studio_playground.png new file mode 100644 index 000000000..daa4117df Binary files /dev/null and b/docs/docs/cloud/how-tos/img/studio_playground.png differ diff --git a/docs/docs/cloud/how-tos/iterate_graph_studio.md b/docs/docs/cloud/how-tos/iterate_graph_studio.md new file mode 100644 index 000000000..0453be39b --- /dev/null +++ b/docs/docs/cloud/how-tos/iterate_graph_studio.md @@ -0,0 +1,15 @@ +# Prompt Engineering in LangGraph Studio + +In LangGraph Studio you can iterate on the prompts used within your graph by utilizing the LangSmith Playground. To do so: + +1. Open an existing thread or create a new one. +2. Within the thread log, any nodes that have made an LLM call will have a "View LLM Runs" button. Clicking this will open a popover with the LLM runs for that node. +3. Select the LLM run you want to edit. This will open the LangSmith Playground with the selected LLM run. + +![Playground in Studio](../img/studio_playground.png){width=1200} + + + +From here you can edit the prompt, test different model configurations and re-run just this LLM call without having to re-run the entire graph. When you are happy with your changes, you can copy the updated prompt back into your graph. + +For more information on how to use the LangSmith Playground, see the [LangSmith Playground documentation](https://docs.smith.langchain.com/prompt_engineering/how_to_guides#playground). diff --git a/docs/docs/how-tos/index.md b/docs/docs/how-tos/index.md index 0887af667..d27eb5ae8 100644 --- a/docs/docs/how-tos/index.md +++ b/docs/docs/how-tos/index.md @@ -290,6 +290,7 @@ LangGraph Studio is a built-in UI for visualizing, testing, and debugging your a - [How to test your graph in LangGraph Studio (MacOS only)](../cloud/how-tos/invoke_studio.md) - [How to interact with threads in LangGraph Studio](../cloud/how-tos/threads_studio.md) - [How to add nodes as dataset examples in LangGraph Studio](../cloud/how-tos/datasets_studio.md) +- [How to engineer prompts in LangGraph Studio](../cloud/how-tos/iterate_graph_studio.md) ## Troubleshooting