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 explicit example for RAG chat templating #33503

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

A-Duss
Copy link
Contributor

@A-Duss A-Duss commented Sep 16, 2024

What does this PR do?

As discussed with @Rocketknight1 in #33421, this commit updates the chat_templating documentation to:

  • Clarify that the documents input is not yet supported by most models.
  • Provide an example with a model that do support it.
  • Offer guidance on how to check if a model supports the documents feature.

Hoping to improve readers understanding of the feature.

Might be beneficial to update the Spanish #28936, Japanese #28301 , Korean #20179 , and Chinese #26803 corresponding docs, I did not risk myself as I do not speak those languages fluently enough. es, ja, ko, zh

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.

Who can review?

Anyone in the community is free to review the PR once the tests have passed.
@stevhliu @Rocketknight1

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

This looks good! I ran the example successfully, and Command-R reported that "interestingly enough", man has always dreamed of destroying the moon. Definitely feel like it was wryly aware that the sources we'd given it might not have been entirely accurate, lol.

I made a suggestion to replace the section you added at the end with a Tip box, but other than that this should be ready to merge soon.

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
@A-Duss
Copy link
Contributor Author

A-Duss commented Sep 17, 2024

Thanks @Rocketknight1 for the tweaking, seemed simpler and clearer to me, I committed your suggestion. 😄
Should be ready to merge now. @stevhliu ? (not sure if I am supposed to @ you now, sorry if I am not)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Rocketknight1
Copy link
Member

Yes, it's ready to merge, and don't worry, I can approve it, since it's just a doc change.

Thank you, and congratulations on your first PR!

@Rocketknight1 Rocketknight1 merged commit 7635484 into huggingface:main Sep 17, 2024
8 checks passed
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
* Add explicit example for RAG chat templating

* Add Tip box and reformulate

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
@A-Duss A-Duss deleted the rag-chat-templating-doc branch January 6, 2025 13:56
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.

4 participants