Quickstart
Getting started with R2R
This basic quickstart shows how to:
- Ingest files into your R2R system
- Search over ingested files
- Request or stream a RAG (Retrieval-Augmented Generation) response
- Use the RAG Agent for more complex, interactive queries
Be sure to complete the installation instructions before continuing with this guide. If you prefer to dive straight into the API details, select a choice from below:
Getting started
Start by checking that you have correctly deployed your R2R instance locally:
SciPhi offers managed enterprise solutions for R2R. If you’re interested in a fully managed, scalable deployment of R2R for your organization, please contact their team at [email protected] for more information on enterprise offerings.
Ingesting file(s) and directories
The remainder of this quickstart will proceed with CLI commands, but all of these commands are easily reproduced inside of the Javascript or Python SDK.
Ingest your selected files or directories:
For testing: Use the sample file(s) included inside the R2R project:
Example output:
After successful ingestion, the documents overview endpoint will return output like so:
Example output:
Ingestion is complete when all documents are in a success
or failed
state.
Executing a search
Perform a search query:
The search query will use basic similarity search to find the most relevant documents. You can use advanced search methods like hybrid search or knowledge graph search depending on your use case.
Example output:
RAG Response
Generate a RAG response:
Example output:
Stream a RAG Response
Stream a RAG response:
Example output (streamed):
Using the RAG Agent
The RAG Agent provides a more interactive and intelligent way to query your knowledge base. It can formulate its own questions, search for information, and provide informed responses based on the retrieved context.
Basic RAG Agent Usage
Here’s how to use the RAG Agent for a simple query:
Additional Features
R2R offers additional features to enhance your document management and user experience:
User Authentication
R2R provides a complete set of user authentication and management features, allowing you to implement secure and feature-rich authentication systems or integrate with your preferred authentication provider.
Learn how to implement user registration, login, email verification, and more using R2R’s built-in authentication capabilities.
Explore the available authentication provider options in R2R and how to integrate with your preferred provider.
Collections
Collections in R2R enable efficient access control and organization of users and documents. With collections, you can manage permissions and access at a group level.
Discover how to create, manage, and utilize collections in R2R for granular access control and document organization.
Learn about best practices for implementing collection permissions and customizing access control in your R2R application.
Next Steps
Now that you have a basic understanding of R2R’s core features, you can explore more advanced topics:
- Dive deeper into document ingestion and customization options.
- Learn about search and RAG inside R2R.
- Implement user authentication to secure your application.
- Organize your documents using collections for granular access control.
If you have any questions or need further assistance, please refer to the R2R documentation or reach out to our support team.