-
Notifications
You must be signed in to change notification settings - Fork 32
Improve prompt engineering quickstart for new users #618
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
base: main
Are you sure you want to change the base?
Conversation
Preview ID generated: preview-improv-1758567116-d5a93eb |
cd233b2
to
e1149c7
Compare
Preview ID generated: preview-improv-1758568908-c397378 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
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.
Preview ID generated: preview-improv-1758804059-48f4d49 |
Preview ID generated: preview-improv-1758804721-d3d3f4e |
980fa0c
to
6b79d6d
Compare
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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
- you’ll pull the prompt you created in step 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"]) |
There was a problem hiding this comment.
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
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