Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move canvas from concepts to how-tos #642

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions docs/prompt_engineering/concepts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,45 +124,3 @@ are streamed back as well as how many repitions there are in the test.
![](./static/test_over_dataset_in_playground.gif)

You can click on the "View Experiment" button to dive deeper into the results of the test.

## Prompt Canvas

The prompt canvas makes it easy to edit a prompt with the help of an LLM. This allows you to iterate
faster on long prompts and also makes it easier to make overarching stylisting or tonal changes to your prompt.
You can enter the promp canvas by clicking the glowing wand over any message in your prompt:

![](./static/prompt_canvas_open.gif)

### Chat sidebar

You can use the chat sidebar to ask questions about your prompt, or to give instructions in natural language to the LLM for how to rewrite your prompt.

![](./static/prompt_canvas_rewrite.gif)

### Write directly

You can also edit the prompt directly - you don't **need** to use the LLM. This is useful if you know what edits you want to make and just want to make them directly

### Quick actions

There are quick actions to change the reading level or length of the prompt with a single mouse click:

![](./static/prompt_canvas_quick_actions.gif)

### Custom quick actions

You can also save your own custom quick actions, for ease of use across all the prompts you are working on in LangSmith:

![](./static/prompt_canvas_custom_quick_action.gif)

### Diffing

You can also see the specific differences between each version of your prompt by selecting the diff slider in the top right of the canvas:

![](./static/prompt_canvas_diff.gif)

### Saving and using

Lastly, you can save the prompt you have created in the canvas by clicking the "Use this Version" button in the bottom right:

![](./static/prompt_canvas_save.gif)
1 change: 1 addition & 0 deletions docs/prompt_engineering/how_to_guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Organize and manage prompts in LangSmith to streamline your LLM development work

Quickly iterate on prompts and models in the LangSmith Playground.

- [Iterate on your prompts with the Prompt Canvas](./how_to_guides/playground/prompt_canvas)
- [Run the playground against a custom LangServe model server](./how_to_guides/playground/custom_endpoint)
- [Run the playground against an OpenAI-compliant model provider/proxy](./how_to_guides/playground/custom_openai_compliant_model)
- [Use custom TLS certificates](./how_to_guides/playground/custom_tls_certificates)
Expand Down
45 changes: 45 additions & 0 deletions docs/prompt_engineering/how_to_guides/playground/prompt_canvas.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
sidebar_position: 6
---

# Prompt Canvas

The prompt canvas makes it easy to edit a prompt with the help of an LLM. This allows you to iterate
faster on long prompts and also makes it easier to make overarching stylisting or tonal changes to your prompt.
You can enter the promp canvas by clicking the glowing wand over any message in your prompt:

![](./static/prompt_canvas_open.gif)

## Chat sidebar

You can use the chat sidebar to ask questions about your prompt, or to give instructions in natural language to the LLM for how to rewrite your prompt.

![](./static/prompt_canvas_rewrite.gif)

:::note Write Directly
You can also edit the prompt directly - you don't **need** to use the LLM. This is useful if you know what edits you want to make and just want to make them directly
:::

## Quick actions

There are quick actions to change the reading level or length of the prompt with a single mouse click:

![](./static/prompt_canvas_quick_actions.gif)

## Custom quick actions

You can also save your own custom quick actions, for ease of use across all the prompts you are working on in LangSmith:

![](./static/prompt_canvas_custom_quick_action.gif)

## Diffing

You can also see the specific differences between each version of your prompt by selecting the diff slider in the top right of the canvas:

![](./static/prompt_canvas_diff.gif)

## Saving and using prompts

Lastly, you can save the prompt you have created in the canvas by clicking the "Use this Version" button in the bottom right:

![](./static/prompt_canvas_save.gif)
Loading