Skip to content

Implement claude citation api for RAG #53

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

Open
ncoop57 opened this issue Jan 25, 2025 · 7 comments
Open

Implement claude citation api for RAG #53

ncoop57 opened this issue Jan 25, 2025 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ncoop57
Copy link
Contributor

ncoop57 commented Jan 25, 2025

Anthropic released a new Citation API for claude. You can find a discussion of it here: https://simonwillison.net/2025/Jan/24/anthropics-new-citations-api/

And the official docs here: https://docs.anthropic.com/en/docs/build-with-claude/citations

Adding this to claudette would allow for improved RAG with citation grounding and open many interesting usecases for users. It is also officially supported by anthropic and would allow for us to say we continue to keep up with the official anthropic api

@ncoop57 ncoop57 added the enhancement New feature or request label Jan 25, 2025
@ncoop57 ncoop57 assigned ncoop57 and ohmeow and unassigned ohmeow Jan 25, 2025
@ncoop57 ncoop57 added the good first issue Good for newcomers label Jan 30, 2025
@galopyz
Copy link

galopyz commented Feb 1, 2025

Hi, do you need help with this?
It says ohmeow was assigned and unassigned.
If nobody's working on this, I would be happy to work on this one.

@ncoop57
Copy link
Contributor Author

ncoop57 commented Feb 1, 2025

Yes, we would love help on this! @galopyz!

@galopyz
Copy link

galopyz commented Feb 2, 2025

Hi Nathan,

I have to create a message with "citations": {"enabled": True}. I think I should modify msglm, rather than creating a function to return a dictionary here. Because Image inputs and caching also needs special messages, and they are done through mk_msg.

What do you think?

@galopyz
Copy link

galopyz commented Feb 2, 2025

@ncoop57 Can you give me your opinion on this? Thanks!

@ncoop57
Copy link
Contributor Author

ncoop57 commented Feb 2, 2025

@galopyz that makes total sense!! Good idea 🤓🤓

@ncoop57
Copy link
Contributor Author

ncoop57 commented Feb 3, 2025

@galopyz you wanna add an example to claudette docs that uses the new msglm citation msg type?

@galopyz
Copy link

galopyz commented Feb 3, 2025

@ncoop57 Sounds good! 👍

@galopyz galopyz mentioned this issue Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants
@ohmeow @ncoop57 @galopyz and others