You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an interesting implementation challenge with two parts: first we need a way to attach documents (text, PDF or custom content JSON) to a prompt - the attachments mechanism should mostly handle this, but we need a way to flag "enable citations against this attachment".
Secondly, we need to store the citation information that comes back from the model - spans of text that have citation information attached to them. I started a separate issue in LLM core about that here:
This is a tiny bit ugly - I always have trouble remembering if the filename or the content type comes first when using --at - but it would solve the problem neatly within our existing CLI design.
Another option would be to use a model option:
llm -m claude-3.5-haiku \
-a doc.pdf -a doc.txt \
-o citations 1 \
"prompt goes here"
Here' the citations 1 option means "treat any PDF or TXT attachments as citation sources".
Might even be worth supporting both of these options - so really all -o citations 1 does is treat any PDFs as citations/pdf and any text documents as citations/text.
New API from Claude. Announcement. API docs. My blog post.
This is an interesting implementation challenge with two parts: first we need a way to attach documents (text, PDF or custom content JSON) to a prompt - the attachments mechanism should mostly handle this, but we need a way to flag "enable citations against this attachment".
Secondly, we need to store the citation information that comes back from the model - spans of text that have citation information attached to them. I started a separate issue in LLM core about that here:
The text was updated successfully, but these errors were encountered: