-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add docs for LangSmith Polly #1813
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| --- | ||
| title: LangSmith Polly | ||
| sidebarTitle: Polly (Beta) | ||
| --- | ||
|
|
||
| <Callout color="#4F46E5"> | ||
| **Polly is in beta.** Your [feedback](https://forum.langchain.com) on Polly is invaluable as the team refines its capabilities. | ||
| </Callout> | ||
|
|
||
| **LangSmith Polly** is an AI assistant embedded directly in your LangSmith [workspace](/langsmith/administration-overview#workspaces) to help you analyze and understand your application data. | ||
|
|
||
| Polly helps you gain insight from your traces, conversation threads, and prompts without having to dig through data manually. By asking natural language questions, you can quickly understand agent performance, debug issues, and analyze user sentiment. | ||
|
|
||
| <img src="/langsmith/images/polly.png" alt="LangSmith Polly icon" style={{float: 'left', marginRight: '20px', marginTop: '-1px', marginBottom: '20px', maxWidth: '100px'}} /> Polly appears in the right-hand bottom corner of the following locations within [LangSmith UI](https://smith.langchain.com), optimized for different use cases: | ||
|
|
||
| - [Trace pages](#tracing-page) | ||
| - [Thread views](#thread-views) | ||
| - [Prompt Playground](#prompt-playground) | ||
|
|
||
| ### Tracing page | ||
|
|
||
| On an individual [trace](/langsmith/observability-concepts#traces), Polly pulls in the context of the page and analyzes the [run](/langsmith/observability-concepts#runs). Polly reads the run data and trajectory to help you understand what happened and identify areas for improvement. | ||
|
|
||
| To ask Polly about your tracing: | ||
|
|
||
| 1. In your **Tracing Projects**, click on a trace to view its details page. | ||
| 1. Select a run in the trace. | ||
| 1. Open Polly in the right-hand corner of the page to ask questions relating to this run. | ||
| 1. Ask Polly a question about your data. You can use the sample questions or you might ask questions like: | ||
|
|
||
| - "Is there anything that the agent could have done better here?" | ||
| - "Why did this run fail?" | ||
| - "What took the most time in this trace?" | ||
| - "What errors occurred during this run?" | ||
| - "Summarize what happened in this trace" | ||
|
|
||
| When analyzing runs, Polly will examine the full trace context, including [run metadata](/langsmith/observability-concepts#metadata), inputs, outputs, intermediate steps, and configuration to provide actionable insights. This helps you diagnose issues without manually expanding each step in the trace tree or cross-referencing multiple runs. | ||
|
|
||
| ### Thread view | ||
|
|
||
| Under the **Threads** tab, Polly analyzes conversation [threads](/langsmith/observability-concepts#threads) by pulling in relevant information about the user interaction. This helps you understand user sentiment and conversation outcomes. | ||
|
|
||
katmayb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| To ask Polly about your threads: | ||
|
|
||
| 1. Select a thread. | ||
| 1. Open Polly in the right-hand corner of the page to ask questions relating to this thread. | ||
| 1. Ask Polly a question about the conversation thread. You might ask questions like: | ||
|
|
||
| - "Did the user seem frustrated?" | ||
| - "What issues is the user experiencing?" | ||
| - "How did this conversation resolve?" | ||
| - "Was the user's problem solved?" | ||
| - "What was the main topic of this thread?" | ||
|
|
||
| Use Polly in thread view to gain insights into how users are interacting with your application. Understand conversation outcomes and whether issues were resolved, identify common user pain points, and track user sentiment through thread analysis. This helps you improve user experience by understanding what's working and what needs improvement in your application's responses. | ||
|
|
||
| ### Prompt Playground | ||
|
|
||
| When you open a [prompt](/langsmith/prompt-engineering-concepts#prompt-in-langsmith) in the [Playground](/langsmith/prompt-engineering-concepts#prompt-playground), Polly can help you edit and improve your prompts based on your instructions. Polly reads the prompt and makes suggested edits. | ||
|
|
||
katmayb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| To ask Polly about your prompt: | ||
|
|
||
| 1. Enter the **Playground** from the left-hand navigation or trace view. | ||
| 1. Select a prompt to experiment with. | ||
| 1. Open Polly in the right-hand corner of the page to work on this prompt. | ||
| 1. You can use one of the automated options that Polly suggests: | ||
| - <Icon icon="play" /> **Optimize prompt**: Polly will analyze the current prompt and make edits to the prompt with a summary of the changes. | ||
| - <Icon icon="wrench" /> **Generate a tool**: Give details to Polly on the tool you would like to add. It will generate a tool for your prompt template. It can also help you modify existing tooling or system messages about tooling. Then, have Polly test tool configurations with reviews of sample output from the model using the tool. | ||
| - <Icon icon="brackets-curly" /> **Generate an output schema**: Polly will create a JSON schema that defines the structure of the output you want the model to generate. This is useful when you need the model to return data in a specific format. Select this option, and then provide Polly with the type of data, fields/properties, and any other constraints you might need. | ||
|
|
||
| Or, you might ask your own questions, like: | ||
|
|
||
| - "Make it respond in Italian" | ||
| - "Add more context about the user's role" | ||
| - "Make the tone more professional" | ||
| - "Simplify the instructions" | ||
| - "Add examples to the prompt" | ||
|
|
||
| <img | ||
| className="block dark:hidden" | ||
| src="/langsmith/images/polly-prompt-tool.png" | ||
| alt="Prompt Playground showing Polly chat in the sidebar with information on a generated tool." | ||
| /> | ||
|
|
||
| <img | ||
| className="hidden dark:block" | ||
| src="/langsmith/images/polly-prompt-tool-dark.png" | ||
| alt="Prompt Playground showing Polly chat in the sidebar with information on a generated tool." | ||
| /> | ||
|
Comment on lines
+79
to
+89
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would reexport images to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, this may be part of the general issue with have with some images on the docs site right now. But, I'm going to be doing more testing for docs examples, so will replace these out |
||
|
|
||
| ## What's next | ||
|
|
||
| Learn more about the features that Polly helps you explore: | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card | ||
| title="Observability" | ||
| icon="magnifying-glass" | ||
| href="/langsmith/observability" | ||
| > | ||
| Learn more about tracing and monitoring your LLM applications | ||
| </Card> | ||
|
|
||
| <Card | ||
| title="Threads" | ||
| icon="comments" | ||
| href="/langsmith/threads" | ||
| > | ||
| Understand how threads work in LangSmith | ||
| </Card> | ||
|
|
||
| <Card | ||
| title="Prompt Engineering" | ||
| icon="wand-magic-sparkles" | ||
| href="/langsmith/prompt-engineering" | ||
| > | ||
| Create and iterate on prompts in the playground | ||
| </Card> | ||
|
|
||
| <Card | ||
| title="Evaluation" | ||
| icon="clipboard-check" | ||
| href="/langsmith/evaluation" | ||
| > | ||
| Evaluate and test your applications systematically | ||
| </Card> | ||
| </CardGroup> | ||
Uh oh!
There was an error while loading. Please reload this page.