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, click 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 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 R2R RAG Agent
The RAG agent inside R2R 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 the additional features below to enhance your document management and user experience.
Graphs
R2R provides powerful entity and relationshipo extraction capabilities that enhance document understanding and retrieval. These can leveraged to construct knowledge graphs inside R2R. The system can automatically identify entities, build relationships between them, and create enriched knowledge graphs from your document collection.
Automatically extract entities and relationships from documents to form knowledge graphs.
Explore advanced techniques for utilizing graph-based retrieval in R2R.
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 into document ingestion customization options and the document reference.
- Learn about search and RAG customization and retrieval reference.
- Try advanced techniques like knowledge-graph construction and HyDE.
- Implement user authentication to secure your application permissions and serve users.
- Organize your documents using collections for granular access control.