Rientro a scuola
Assistente AI — leggi i tuoi articoli 10x più veloce.Da 7$/mese · A vita 39$
Vedi prezzi →

How to Use Ollama and Gemma in Zotero: A Step-by-Step Guide for Offline Academic AI

For academic researchers, data privacy isn't optional. Whether you are analyzing unpublished preprints, sensitive clinical datasets, or proprietary patent documents, uploading your PDFs to third-party cloud servers can violate institutional policies and confidentiality agreements.

The solution? Running open-source Large Language Models (LLMs) locally on your own computer.

By combining Ollama, Google's lightweight open weights model Gemma, and PapersGPT for Zotero, you can chat with your academic PDF library with 100% privacy, zero API costs, and full offline capability.


Why Use Ollama and Gemma for Research in Zotero?

  1. Complete Data Privacy & Zero Cloud Leakage: All embeddings, vector indexing, and model inferences stay in your local RAM/VRAM. No text leaves your machine.
  2. Offline Research Anywhere: Continue analyzing papers, generating summaries, and extracting methodology tables on flights, trains, or in locations with spotty Wi-Fi.
  3. Google Gemma's Academic Strength: Google's Gemma models (such as Gemma 2 2B/9B/27B and Gemma 4) offer exceptional text comprehension, mathematical reasoning, and structured citation abilities while running efficiently on modern Mac (Apple Silicon) and Windows laptops.
  4. Zero Token Costs: No subscription fees, no credit card required, and no OpenAI/Anthropic API bills.

Method 1: The Built-in 1-Click Way (Recommended)

If you use PapersGPT, you don't even need to configure CLI tools manually. PapersGPT includes a built-in local inference engine.

  1. Install PapersGPT: Download the latest .xpi plugin from the PapersGPT GitHub Repository and install it in Zotero via Tools > Plugins.
  2. Select Local Model: Open any PDF in Zotero, activate PapersGPT (Cmd + Enter on Mac or Ctrl + Enter on Windows), and choose Local LLM.
  3. Select Gemma: Pick Gemma 4 or Qwen 3.5. The plugin will automatically download and start the local model.
  4. Start Chatting: Ask questions or batch-summarize multiple papers directly.

Method 2: Connecting Your Existing Ollama Instance to Zotero

If you already have Ollama installed on your system and prefer managing your own model library, follow these simple steps to bridge Ollama and Zotero:

Step 1: Install Ollama & Pull the Gemma Model

Download and install Ollama from ollama.com. Open your terminal and pull your preferred Gemma model:

# For lightweight/faster speed (runs well on 8GB RAM):
ollama run gemma2:2b

# For balanced research performance (recommended for 16GB+ RAM):
ollama run gemma2:9b

# For deep reasoning (requires 32GB+ RAM):
ollama run gemma2:27b

Verify that Ollama's local server is running by opening http://localhost:11434 in your browser. You should see "Ollama is running".

Step 2: Configure PapersGPT in Zotero

  1. Open Zotero and click on the PapersGPT icon in the toolbar or sidebar.
  2. Open Settings / Model Configuration.
  3. Select Customized API / Local Endpoint:
    • API URL: http://localhost:11434/api/chat
    • Model Name: gemma2:9b (or whichever tag you pulled)
    • API Key: Leave blank (Ollama does not require an API key)
  4. Click Save / Test Connection.

Best Prompts for Research with Local Gemma Models

Once connected, try these prompts on your academic PDFs:

  • Extract Research Questions & Hypotheses:

    "Analyze this paper and extract the primary research question, core hypothesis, and theoretical foundation in 3 concise bullet points."

  • Synthesize Experimental Methodology:

    "What dataset, sample size, and statistical evaluation metrics were used in Section 3? Detail any limitations acknowledged by the authors."

  • Cross-Paper Matrix (Multi-PDF):

    "Compare the conflicting findings between the selected papers regarding [topic]. Format as a markdown table."


Performance & Hardware Recommendations

  • Apple Silicon (M1/M2/M3/M4): 16GB unified memory can comfortably run Gemma 9B with real-time token generation speeds (30-50 tokens/sec).
  • Windows / Linux (NVIDIA GPU): An RTX 3060 (12GB VRAM) or higher will run quantized Gemma models smoothly.
  • CPU Only: Gemma 2B will run acceptably on modern multi-core Intel/AMD CPUs without a dedicated GPU.

Conclusion

Combining Zotero + Ollama + Gemma via PapersGPT bridges the gap between academic depth and digital sovereignty. You get the intelligence of modern AI without surrendering your research data.

Explore PapersGPT | Download Zotero Plugin