Skip to content

Conversation

katmayb
Copy link
Contributor

@katmayb katmayb commented Sep 22, 2025

This PR improves the prompt engineering quickstart guide for LangSmith. Intention is to make this accessible for new users, improve the flow of the page, and provide definitions for different features of prompt engineering.

Latest preview:

https://langchain-5e9cc07a-preview-improv-1758917983-96b2a4b.mintlify.app/langsmith/prompt-engineering-quickstart

@github-actions github-actions bot added the langsmith For docs changes to LangSmith label Sep 22, 2025
Copy link

Preview ID generated: preview-improv-1758567116-d5a93eb

@katmayb katmayb force-pushed the improve-prompt-quickstart branch from cd233b2 to e1149c7 Compare September 22, 2025 19:21
Copy link

Preview ID generated: preview-improv-1758568908-c397378

@katmayb katmayb marked this pull request as ready for review September 22, 2025 19:27
@katmayb katmayb requested a review from lnhsingh as a code owner September 22, 2025 19:27
Copy link
Collaborator

@lnhsingh lnhsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@tanushree-sharma tanushree-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not have time to double check code snippets yet but left some feedback about content!


To create a prompt, you'll define a list of messages that you want in your prompt and then push to LangSmith.

Use the language-specific constructor and push method:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use the language-specific constructor and push method:
Use the language-specific constructor and push method:

for language specific things, can we show/hide based on the language selected in the code group

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not right now with CodeGroup, but it's on my to do list to figure out how to do this more elegantly.

Copy link

Preview ID generated: preview-improv-1758804059-48f4d49

Copy link

Preview ID generated: preview-improv-1758804721-d3d3f4e

@katmayb katmayb force-pushed the improve-prompt-quickstart branch from 980fa0c to 6b79d6d Compare September 26, 2025 20:19
Copy link

Preview ID generated: preview-improv-1758917983-96b2a4b


</CodeGroup>

You can view your prompts with the [SDK](https://docs.smith.langchain.com/reference/python/reference) or the [UI](https://smith.langchain.com). With the SDK, call [`list_prompts`](https://docs.smith.langchain.com/reference/python/client/langsmith.client.Client#langsmith.client.Client.list_prompts) (Python) or [`listPrompts`](https://docs.smith.langchain.com/reference/js/classes/client.Client#listprompts) (TypeScript) to display the prompts in your [workspace](/langsmith/administration-overview#workspaces).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can view your prompts with the [SDK](https://docs.smith.langchain.com/reference/python/reference) or the [UI](https://smith.langchain.com). With the SDK, call [`list_prompts`](https://docs.smith.langchain.com/reference/python/client/langsmith.client.Client#langsmith.client.Client.list_prompts) (Python) or [`listPrompts`](https://docs.smith.langchain.com/reference/js/classes/client.Client#listprompts) (TypeScript) to display the prompts in your [workspace](/langsmith/administration-overview#workspaces).
Follow the resulting link to view the newly created Prompt Hub prompt in the LangSmith UI.


You can view your prompts with the [SDK](https://docs.smith.langchain.com/reference/python/reference) or the [UI](https://smith.langchain.com). With the SDK, call [`list_prompts`](https://docs.smith.langchain.com/reference/python/client/langsmith.client.Client#langsmith.client.Client.list_prompts) (Python) or [`listPrompts`](https://docs.smith.langchain.com/reference/js/classes/client.Client#listprompts) (TypeScript) to display the prompts in your [workspace](/langsmith/administration-overview#workspaces).

## 3. Test a prompt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would combine step 3 and 4. 3 is a little anti-climactic because you're just loading the prompt. So flow could be

  1. you’ll pull the prompt you created in step 2
  2. create a new version of a prompt - edit the system message


# Push the updated prompt making sure to use the correct prompt name
# Tags can help you remember specific versions in your commit history
client.push_prompt("my-prompt", object=new_prompt, tags=["Spanish"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this actually creates a prompt tag, not a commit tag. i dont think we have a way to leave commit tags from the SDK. i'd remove this for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
langsmith For docs changes to LangSmith
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants