Skip to content
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

add docs for evaluating with attachments #540

Merged
merged 33 commits into from
Dec 12, 2024
Merged

Conversation

isahers1
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Nov 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langsmith-docs ✅ Ready (Inspect) Visit Preview 4 resolved Dec 12, 2024 5:35am

outputs={"answer": "$123456"},
attachments={
# Each attachments is just a name with a mime type and the bytes content of the file
"pdf": ("application/pdf", Path("./foo_earnings.pdf").read_bytes()),
Copy link
Contributor

Choose a reason for hiding this comment

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

not related to this pr, but is it too late to change tuple -> dict? imo naming the values improves usability a lot, eg

attachments = [
  {
    "name": "my_pdf",
    "mime_type": "applications/pdf",
    "bytes": Path(...).read_bytes()
  }, 
  ...
]

is easier to read for me

Copy link
Contributor

Choose a reason for hiding this comment

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

related to this pr, would be nice to download some real public pdf here to use. could just be https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf


# Evaluate an LLM application with attachments

Attachments allow you to associate large files with your examples. This allows you to evaluate RAG applications
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe worth adding a sentence about why attachments are better than storing file in example inputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried my best, but someone more well versed with the benefits should probably chime in

@agola11 agola11 marked this pull request as ready for review December 12, 2024 04:21
@agola11 agola11 merged commit de646a7 into main Dec 12, 2024
6 checks passed
@agola11 agola11 deleted the isaac/examplewithattachmentdocs branch December 12, 2024 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants