Fetch and Load Rayyan Review Articles
Rayyan Loader fetches review articles from Rayyan.ai into LlamaIndex using the Rayyan SDK, with optional filtering by search terms or criteria.
Why it matters
Integrate your Rayyan systematic review data into LlamaIndex for further analysis and knowledge base creation. This asset automates the retrieval of articles, allowing you to focus on research.
Outcomes
What it gets done
Connect to the Rayyan API using provided credentials.
Fetch all articles for a specified review or filter by search terms.
Load retrieved articles into the LlamaIndex data structure.
Prepare review data for downstream NLP tasks.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-reader-readers-rayyan | bash Overview
Rayyan Loader
Rayyan Loader is a LlamaIndex integration that retrieves review articles from Rayyan.ai using the official Rayyan Python SDK. It fetches all articles for a specified review by default, with support for filtering results by search terms or other criteria to narrow the dataset. Use Rayyan Loader when you need to import review data from Rayyan.ai into LlamaIndex. It's useful when working with reviews where you want to filter specific subsets of articles based on keywords or other search criteria.
What it does
Rayyan Loader is a LlamaIndex integration that fetches review articles from Rayyan.ai using the official Rayyan SDK. It retrieves all articles for a given review by default, with optional filtering capabilities to narrow results by search terms or other criteria.
When to use - and when NOT to
Use Rayyan Loader when you need to import review articles from Rayyan into LlamaIndex. It's useful when you're working with reviews and want to filter specific subsets, such as articles containing particular keywords like "outcome" or other search criteria. Do not use this loader if you're not working with Rayyan reviews or if you need to access data from other platforms - it is specifically designed for Rayyan.ai and requires Rayyan credentials.
Inputs and outputs
You provide a path to your Rayyan credentials JSON file and a review ID. Optionally, you can specify filters as a dictionary to narrow the articles retrieved. The loader returns document objects containing the article data from your specified Rayyan review.
Integrations
Rayyan Loader integrates with Rayyan.ai through the official Rayyan Python SDK for authentication and data retrieval. It is designed to be used as a way to load data into LlamaIndex.
Who it's for
This loader serves users who need to fetch review articles from Rayyan and load them into LlamaIndex.
Installation and usage
pip install llama-index-readers-rayyan
from llama_index.readers.rayyan import RayyanReader
loader = RayyanReader(credentials_path="path/to/rayyan-creds.json")
# Load all documents for a review with ID 123456
documents = loader.load_data(review_id=123456)
# Load only those that contain the word "outcome"
documents = loader.load_data(
review_id=123456, filters={"search[value]": "outcome"}
)
The Rayyan SDK documentation provides additional details about available filter parameters for more sophisticated queries.
Source README
Rayyan Loader
pip install llama-index-readers-rayyan
This loader fetches review articles from Rayyan
using the Rayyan SDK. All articles
for a given review are fetched by default unless a filter is specified.
Usage
To use this loader, you need to specify the path to the Rayyan credentials file
and optionally the API server URL if different from the default. More details
about these parameters can be found in the official Rayyan SDK repository.
from llama_index.readers.rayyan import RayyanReader
loader = RayyanReader(credentials_path="path/to/rayyan-creds.json")
Once the loader is initialized, you can load data from Rayyan, either all or filtered:
### Load all documents for a review with ID 123456
documents = loader.load_data(review_id=123456)
### Load only those that contain the word "outcome"
documents = loader.load_data(
review_id=123456, filters={"search[value]": "outcome"}
)
The Rayyan SDK has more information about the available filters.
This loader is designed to be used as a way to load data into LlamaIndex.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.