PaperGPT is a Streamlit application that uses OpenAI GPT-3 to perform scientific paper question-answering. Users can search for PDF files in their Zotero accounts, select the desired files, and ask questions to get answers.
-
Install Dependencies
PaperGPT uses Streamlit and PyZotero. Dependencies can be installed using the following command:
pip install streamlit pyzotero openai PyPDF2
-
Get API Keys
Before using PaperGPT, you need to obtain the following API keys:
- Zotero API Key: Used to retrieve PDF metadata and content from your Zotero account.
- OpenAI API Key: Used to perform question-answering with OpenAI GPT-3.
-
Run PaperGPT
Enter the following command in your terminal to start PaperGPT:
streamlit run app.py
-
Configure PaperGPT
After running PaperGPT, the application will open in your browser. In the sidebar, fill in the following information:
- Zotero Path: The path to your local Zotero library, e.g.
/Users/XXX/Zotero
. - Zotero User ID: Your Zotero user ID.
- Zotero API Key: Your Zotero API key.
- OpenAI API Key: Your OpenAI API key.
- Zotero Path: The path to your local Zotero library, e.g.
-
Search for PDF files and ask questions
- On the main page, select the collection of PDF files you want to search.
- Enter your question in the input box.
- Click the "Search" button.
- Select the PDF files you want to search in.
- Select multiple files using checkboxes.
- Click the "Search" button to get a detailed summary with the answer to your question.
The following example demonstrates how to search for PDF files and ask questions using PaperGPT:
-
Create a collection in Zotero containing several PDF files.
-
Run PaperGPT and fill in the necessary API keys.
-
On the main page of PaperGPT, select the collection containing the PDF files.
-
Enter your question in the input box and click the "Search" button.
-
Select the PDF files you want to search for in the checkboxes below.
-
Click the "Search" button.
-
Get a detailed summary with the answer to your question.
- PaperGPT can only search for PDF files that you have added to Zotero.
- Using OpenAI GPT-3 for question-answering may take some time.
- If your Zotero PDF files are stored on Dropbox or another cloud service, they cannot be searched.
- Use database to cache query results to avoid multiple queries
- Optimize user interaction interface, consider front and back-end separation architecture