Skip to main content

AI-powered literature discovery and review engine for medical/scientific papers

Project description

paperai: AI-powered literature discovery and review engine for medical/scientific papers

paperai builds an AI-powered index over sets of medical and scientific papers.


The easiest way to install is via pip and PyPI

pip install paperai

You can also install paperai directly from GitHub. Using a Python Virtual Environment is recommended.

pip install git+

Python 3.6+ is supported

If running on Windows, check out this link for possible install issues.

Building a model

paperai indexes models previously built with paperetl. paperai currently supports querying SQLite databases.

To build an index for a SQLite articles database:

# Can optionally use pre-trained vectors
# Default location: ~/.cord19/vectors/cord19-300d.magnitude
python -m paperai.vectors

# Build embeddings index
python -m paperai.index

The model will be stored in ~/.cord19

Building a report file

A report file is simply a markdown file created from a list of queries. An example report call:

python -m tasks/risk-factors.yml

Once complete a file named tasks/ will be created.

Running queries

The fastest way to run queries is to start a paperai shell


A prompt will come up. Queries can be typed directly into the console.

Tech Overview

The tech stack is built on Python and creates a sentence embeddings index with FastText + BM25. Background on this method can be found in this Medium article and an existing repository using this method codequestion.

The model is a combination of the sentence embeddings index and a SQLite database with the articles. Each article is parsed into sentences and stored in SQLite along with the article metadata. FastText vectors are built over the full corpus. The sentence embeddings index only uses tagged articles, which helps produce most relevant results.

Multiple entry points exist to interact with the model.

  • - Builds a markdown report for a series of queries. For each query, the best articles are shown, top matches from those articles and a highlights section which shows the most relevant sections from the embeddings search for the query.
  • paperai.query - Runs a single query from the terminal
  • - Allows running multiple queries from the terminal

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for paperai, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size paperai-1.2.1-py3-none-any.whl (23.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size paperai-1.2.1.tar.gz (15.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page