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 on RAG citation modes #314

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Add docs on RAG citation modes #314

merged 2 commits into from
Dec 19, 2024

Conversation

mrmer1
Copy link
Contributor

@mrmer1 mrmer1 commented Dec 19, 2024

This pull request introduces a new section titled "Citation modes" to the documentation for Retrieval Augmented Generation (RAG) in streaming mode. It explains the two citation modes available: fast citations and accurate citations.

  • Accurate citations: The model generates its answer first, then provides citations after the entire response is generated. This ensures precise alignment of citation indices with the final text segments but may increase latency. The example code demonstrates how to use accurate citations with the citation_quality="accurate" argument in the API call.
  • Fast citations: The model generates citations inline as the response is produced, providing immediate traceability but with slightly less precision. The example code shows how to use fast citations with the citation_quality="fast" argument in the API call.

The section also emphasizes the importance of inline citations for user verification, as RAG does not guarantee accuracy or eliminate the risk of hallucination.

@mrmer1 mrmer1 requested a review from a team as a code owner December 19, 2024 06:58
Copy link

Copy link

@trentfowlercohere trentfowlercohere merged commit b0533d8 into main Dec 19, 2024
3 checks passed
@trentfowlercohere trentfowlercohere deleted the citation-mode branch December 19, 2024 15:11
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.

2 participants