-
Notifications
You must be signed in to change notification settings - Fork 64
docs: multimodal #777
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
Merged
Merged
docs: multimodal #777
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
de253ea
feat: multimodal evaluations
madams0013 622a761
adding multimodal variables
madams0013 eb63f49
how to create promt with multimodal content
madams0013 6439e08
hide table of contents
madams0013 f3d4328
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 c0c74c3
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 7dd5b96
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 dd67d25
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 89ca5ae
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 e0d0215
fixes
madams0013 533670a
Merge branch 'maddy/multimodal' of github.com:langchain-ai/langsmith-…
madams0013 a1eeeb2
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 6c0bc75
Update docs/evaluation/how_to_guides/evaluate_with_attachments.mdx
madams0013 55c10ef
rm toc
madams0013 91d0c45
Merge branch 'maddy/multimodal' of github.com:langchain-ai/langsmith-…
madams0013 7a84ceb
fix
madams0013 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
docs/prompt_engineering/how_to_guides/multimodal_content.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
sidebar_position: 7 | ||
table_of_contents: false | ||
hide_table_of_contents: true | ||
--- | ||
|
||
# Include multimodal content | ||
|
||
Some applications are based around multimodal content, like a chatbot that can answer questions about a PDF or image. | ||
In these cases, you'll want to include multimodal content in your prompt and test the model's ability to answer questions about the content. | ||
|
||
The LangSmith Playground supports two methods for incorporating multimodal content in your prompts: | ||
|
||
1. Inline content: Embed static files (images, PDFs, audio) directly in your prompt. This is ideal when you want to consistently include the same multimodal content across all uses of the prompt. For example, you might include a reference image that helps ground the model's responses. | ||
2. Template variables: Create dynamic placeholders for attachments that can be populated with different content each time. This approach offers more flexibility, allowing you to: | ||
- Test how the model handles different inputs | ||
- Create reusable prompts that work with varying content | ||
|
||
## Inline content | ||
|
||
Click the file icon in the message where you want to add multimodal content. | ||
Under the `Upload content` tab, you can upload a file and include it inline in the prompt. | ||
|
||
 | ||
|
||
## Template variables | ||
|
||
Click the file icon in the message where you want to add multimodal content. | ||
Under the `Template variables` tab, you can create a template variable for a specific attachment type. | ||
Currently, only images, PDFs, and audio files (.wav, .mp3) are supported. | ||
|
||
 | ||
|
||
## Populate the template variable | ||
|
||
Once you've added a template variable, you can provide content for it using the panel on the right side of the screen. Simply click the `+` button to upload or select content that will be used to populate the template variable. | ||
|
||
 | ||
|
||
## Run an evaluation | ||
|
||
After testing out your prompt manually, you can [run an evaluation](../../evaluation/how_to_guides/evaluate_with_attachments?mode=ui) to see how the prompt performs over a golden dataset of examples. |
Binary file added
BIN
+67.5 KB
docs/prompt_engineering/how_to_guides/static/manual_prompt_multimodal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.6 KB
...rompt_engineering/how_to_guides/static/template_variable_multimodal_content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.8 KB
docs/prompt_engineering/how_to_guides/static/upload_inline_multimodal_content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.