> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用AI撰写提示词

提示画布让您能够借助大语言模型轻松编辑提示词。这不仅能让您更快地迭代长篇提示词，还能更方便地对提示词进行整体风格或语调的调整。您可以通过点击提示中任意消息上方的发光魔杖图标进入提示画布：

<img src="https://mintcdn.com/hhh-8c10bf0c/PHzfKFWRV-Ltob7s/langsmith/images/prompt-canvas-open.gif?s=490fc2760165fa92f30ca719a622bbe5" alt="打开提示画布" width="1000" height="539" data-path="langsmith/images/prompt-canvas-open.gif" />

## 聊天侧边栏

您可以使用聊天侧边栏来询问关于提示词的问题，或者用自然语言向大语言模型发出指令，指导它如何重写您的提示词。

<img src="https://mintcdn.com/hhh-8c10bf0c/PHzfKFWRV-Ltob7s/langsmith/images/prompt-canvas-rewrite.gif?s=191ee41e607b9450b0617bf2ea6cc8c0" alt="提示画布重写" width="1000" height="539" data-path="langsmith/images/prompt-canvas-rewrite.gif" />

<Note>
  您也可以直接编辑提示词——**不一定**要使用大语言模型。如果您清楚要做什么修改，并希望直接进行编辑，这会很有用。
</Note>

## 快捷操作

通过快捷操作，只需一次鼠标点击即可更改提示词的阅读难度或长度：

<img src="https://mintcdn.com/hhh-8c10bf0c/PHzfKFWRV-Ltob7s/langsmith/images/prompt-canvas-quick-actions.gif?s=e07f514ac235211f7f10021d1e85797e" alt="提示画布快捷操作" width="1000" height="539" data-path="langsmith/images/prompt-canvas-quick-actions.gif" />

## 自定义快捷操作

您还可以保存自己的自定义快捷操作，以便在LangSmith中处理所有提示词时都能方便地使用：

<img src="https://mintcdn.com/hhh-8c10bf0c/PHzfKFWRV-Ltob7s/langsmith/images/prompt-canvas-custom-quick-action.gif?s=3166e1c9d7af329fb1c2633c6f1d7eff" alt="提示画布自定义快捷操作" width="1000" height="539" data-path="langsmith/images/prompt-canvas-custom-quick-action.gif" />

## 差异对比

您还可以通过选择画布右上角的差异对比滑块，查看提示词每个版本之间的具体差异：

<img src="https://mintcdn.com/hhh-8c10bf0c/PHzfKFWRV-Ltob7s/langsmith/images/prompt-canvas-diff.gif?s=1c7f551862798028ca903cedaa334862" alt="提示画布差异对比" width="1000" height="539" data-path="langsmith/images/prompt-canvas-diff.gif" />

## 保存和使用提示词

最后，您可以通过点击右下角的“使用此版本”按钮，将画布中创建的提示词保存下来：

<img src="https://mintcdn.com/hhh-8c10bf0c/PHzfKFWRV-Ltob7s/langsmith/images/prompt-canvas-save.gif?s=ce13490690a5a0bef4d80c80f2344e9f" alt="提示画布保存" width="1000" height="539" data-path="langsmith/images/prompt-canvas-save.gif" />

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/i18n\zh-CN\langsmith\write-prompt-with-ai.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
