Semantic Search Tool for Zotero - Open-source RAG with built-in source attribution

Hi, fellow Zotero users!

I am here to talk to you about an open-source knowledge management tool I’ve been working on over the past few months.

A lot of you will be already familiar with RAG—retrieval augmented generation—an information retrieval architecture that allows for semantic search of a knowledge base using vector embeddings, assisted by Transformer models at the presentation layer.

This RAG tool is like that, but it improves on several common shortcomings of such tools that often lead to justified reservations regarding their reliability, accuracy, and—commonly omitted—privacy.

This tool is a desktop app. On the first launch, it will connect to the Zotero library stored on your computer to index it. The app creates vector embeddings of your library’s PDFs, which are then stored in a vector database alongside relevant metadata from Zotero, like tags, collections, authors, dates, etc.

Once the indexing is completed, you will be able to run semantic queries over the entirety of your Zotero PDF collection. You also get to refine your queries by pre-filtering the search space by using each item’s metadata that gets imported from Zotero. A retrieval algorithm returns relevant chunks of your library and passes those on to a language model that formats the chunks into a single output and presents it to the user.

But! Before you think this is just another 'LLM wrapper', read a bit further, because I’ve actually thought this through.

From the outset, the app was designed to address three common pain points of vanilla RAG tools. (1) Reliability, aka hallucinations, (2) relevance, and (3) privacy.

(1) Reliability is addressed via these safeguards: (a) “Sources” panel that lists all sources used for any given answer you see; (b) “Evidence” panel that lists the exact PDF chunks, with page numbers, used in the answer; (c) strict prompting that ensures the language model only works with the retrieved information it receives from your library and that instructs it on how to handle cases of insufficient context.

(2) The quality of the information retrieval is ensured (a) algorithmically via hybrid search (dense vector search with sparse BM25 keyword search), cross-encoder reranking, and diversity controls; and (b) at the data level where users can optionally set metadata filters. All of this happens before an LLM is called to parse the final output.

(3) Privacy. This tool was originally designed to give users the option to work completely offline if they choose to. It supports local LLMs that are often small enough to run on your laptop, via interfaces like LM Studio and Ollama. This way, no information about either your query or the contents of your library ever leaves your computer. Cloud-based providers like Anthropic or OpenRouter are also supported if that is your preference.

-Best practices and limitations-

This tool is designed for discovery and navigation, not for making claims on your behalf. You can think of it as a library clerk.

A few things to keep in mind:

- The quality of the answers depends on the quality of your library. The tool can only retrieve what's there.

- Always verify against the original source. The Evidence and Sources panels exist for exactly this reason.

- Model choice matters. Local models are more private but sometimes less capable, with smaller context windows. Larger cloud-based models produce better outputs but require sending some of your data to a third-party provider, which also requires a paid API key.

- The tool does not replace reading and is not meant to be a document summariser. It helps you find where to look, not what to think.

***

The app is open source and available on GitHub via https://github.com/aahepburn/RAG-Assistant-for-Zotero

I am still actively involved in developing the app and am very open to ideas and feature suggestions. I am usually quick to respond on GitHub where you can start an Issue if you run into bugs or otherwise have some feedback.

The app currently has the following OS support:

macOS (Apple Silicon) — yes
Linux (Debian) — yes
Microsoft Windows — available, but looking for more testers, please reach out if interested.

Thanks everyone!
  • Hi. Love the look of this software. I installed it on windows and when I try to run it for the first time, I run into some errors (although it eventually loads).

    "The backend service failed to start within the time out period."

    https://s3.amazonaws.com/zotero.org/images/forums/u2582096/45khai0y5m9vlutxfj3q.jpg
  • Hi! I have installed it on Win11 but for some reason it just does not see my zotero library.
    - Your tool is installed in non-default folder (D:\RAG Assistant)
    - My zotero.sqlite is located in the default folder (i.e. C:\Users\{username}\Zotero\zotero.sqlite)
    - Zotero attachments, in turn, are in another folder (C:\Zotero).

    The thing is supposed to operate on Qwen3.5-9B through LM-Studio. There is also minor bug here: it does not see LM-Studio models when choosing LM-Studio interface, though I found a workaround: use OpenAI interface pointing to LM-Studio OpenAI-compatible endpoints (http://{your-LAN-ip}:1234/v1, it's important to use non-localhost address on Windows, it's known LM-Studio ,,feature,,).
    Anyway, nothing I did brought me success:
    - Launched the app with Admin privileges
    - Added "Everyone" to .sqlite ACL ("Security" tab)
    - Re-entered full path to .sqlite and Zotero data folders
    - Created new profile
    - Clicked thru all the buttons related to indexing :) many times.
  • Hi, thanks both for your comments. Both issues are related to Windows as I can see -- that OS remains pretty stubborn. I hope to arrive at something stable on Windows eventually. I will have a look at both issues in the next release in the coming weeks. Thanks very much for the feedback.

    In case there is anything else -- I am usually much quicker to reply on GitHub than here. You can start an Issue or a Discussion there. Thanks.
  • Can we use this using Ubuntu via WSL on windows if the bug is from the Windows setup?
  • You can try. I am not sure how the Electron app will respond to this setup. WSL2 + WSLg on Windows 11 should support the GUI afaik. You'll need to set your Zotero library path to /mnt/c/Users//Zotero (or wherever your Zotero library is on Windows). If you're on Windows 10, I think you'll also need an X server like VcXsrv for the GUI.

    I am not sure which version you tried last, but v0.4.5 seems to be working for some Windows users, maybe try that natively first, and then via WSL if still no luck.
Sign In or Register to comment.