- Crawls arXiv papers daily — PDFs go to MinIO, metadata to PostgreSQL, and vectors to Qdrant.
- The RAG pipeline combines query rewriting, hybrid search, and document re-ranking, with answers generated by local Ollama inference.
- The whole stack is orchestrated with Docker Compose; Firebase handles login, while Grafana and Langfuse provide observability.
Table of Contents
There are too many arXiv papers for researchers to keep up with every day. Manual retrieval is inefficient, and it’s hard to quickly ask questions and compare across papers. That’s exactly what arXiv Knowledge Assistant aims to solve: building a complete pipeline that spans data ingestion, vector retrieval, LLM Q&A, and visualization dashboards, so users can query paper abstracts, PDFs, and Q&A history directly in natural language, while developers can configure the ingestion flow, manage the vector index, and monitor model performance.
The whole system orchestrates multiple microservices with Docker Compose, aiming for “one-command reproducibility” — once you’ve prepared your .env and Firebase key, make build && make up brings up the complete environment.
The Problems the Platform Solves
The core feature scope listed in the project’s README includes:
- Automatically fetching arXiv paper metadata, PDFs, and abstracts daily
- Support for Chinese/English translation and Q&A
- RAG Q&A that pairs vector-database retrieval with an LLM
- Customizable prompt templates
- A dashboard of query history
- Email push subscriptions
CI/CD, unit tests, and integration tests are on the roadmap — items that are still WIP / planned.
System Architecture
The platform is split into several single-responsibility microservices (arxivservice, noteservice, emailservice, apiGateway, and so on, with imageservice and speechservice reserved for future expansion), all deployed together via Docker Compose. Overall, it breaks down into three data flows:
- Daily ingestion: scheduled arXiv crawling → PDFs/metadata stored in MinIO and PostgreSQL → text embeddings written to Qdrant.
- RAG Q&A: after retrieval + re-ranking, the context is handed to the LLM to generate an answer, returned to the front-end dashboard.
- Email subscriptions: each day it pulls papers from Qdrant → generates summaries → sends subscription emails.
flowchart LR
Client --> FastAPI[API Gateway / Auth]
FastAPI --> NoteServer[RAG Service]
Arxiv[arXiv] --> Scheduler[Daily Schedule]
Scheduler --> IngestFlow[Fetch + Parse + Chunk + Embed + Index]
IngestFlow --> Storage
NoteServer --> Retrieve
Storage --> Retrieve
subgraph Retrieve[Retrieve Pipeline]
Search[Hybrid Search] --> Rerank[Re-ranking]
Rerank --> Prompt
end
Prompt --> Ollama[Ollama LLM]
Ollama --> FastAPI
subgraph Storage[Storage]
MinIO[(MinIO : PDFs)]
PostgreSQL[(PostgreSQL : Metadata)]
Qdrant[(Qdrant : Vectors)]
end
Storage --> Subscription[Email Subscription Pipeline]
Subscription --> SubFlow[Filter → Fetch → Summarize → Send]
The Ingestion Pipeline
A daily schedule triggers the arXiv ingestion flow via Prefect 3, running the fetched papers through a chain of Fetch → Parse → Chunk → Embed → Index:
- PDFs are stored in MinIO (object storage, e.g. a bucket named
note-md) - Paper metadata is stored in PostgreSQL
- Text embeddings are written to the Qdrant vector database
Because the source, storage, and index are each independent, ingestion and querying can operate in a decoupled way, making later swaps or extensions easy.
Retrieval and Q&A
The Q&A path is the core RAG flow of this platform, and the README’s checklist maps clearly onto its implementation:
- Query rewriting: the user’s question is rewritten first (including Chinese/English translation), corresponding to the
rewrite_querymethod (LangChain client). - Hybrid Search: retrieval on Qdrant that leverages both dense and sparse signals simultaneously.
- Document re-ranking: recalled documents are re-ranked to improve relevance (the
rerankservice). - LLM generation: a local LLM driven by Ollama produces the answer, with support for evaluating multiple prompt templates.
- The Q&A strategy pairs RAG with agent reflection.
Prompt traces throughout the process are recorded by Langfuse, making it easy to trace and evaluate Q&A quality.
Login, Subscriptions, and Observability
- Authentication: uses Firebase Authentication (Google Login); you need to place
serviceAccountKey.jsonintoapiGateway/andemail/. Without the key, login and Firebase-related features won’t work. - Caching: Redis serves as the caching layer.
- Email subscriptions: daily summary emails are sent via SMTP (a Gmail App Password).
- Monitoring: Prometheus + Grafana (Grafana defaults to
http://localhost:3002) handles metrics and dashboards, and can be paired with Alertmanager to configure alerts.
The front-end offers two interfaces: React + Vite (http://localhost:5173), and Gradio (http://localhost:7861), which works without depending on Firebase — the latter suits cases where you don’t want to wire up a Firebase project.
Tech Stack at a Glance
| Category | Tools |
|---|---|
| Cloud / Infra | Docker Compose, MinIO, PostgreSQL, Qdrant |
| Backend / API | FastAPI, Prefect 3 |
| Frontend | React + Vite, Gradio |
| Monitoring | Prometheus + Grafana, Logging |
| CI/CD | GitHub Actions (planned) |
| Testing | pytest (unit + integration, WIP) |
| IaC | Docker Compose (Terraform optional) |
Current Status and What’s Next
The platform can already run the end-to-end flow of “daily ingestion → vector retrieval → bilingual RAG Q&A → dashboard + email subscriptions,” with observability from Grafana and Langfuse. Items still to be filled in on the roadmap include: GitHub Actions CI/CD, unit and integration tests, multiple LLM backends (OpenAI, Anthropic, etc.), and personalized recommendations / subscriptions. The project is licensed under the MIT License.
References
Answers come from this article only. Click any prompt below or open the chat at the bottom right.
🇺🇸 English
Every day, arXiv publishes more papers than any single researcher could ever hope to read. You go looking for something specific, you're scrolling through endless abstracts, and even once you've found a few relevant papers, actually asking questions across them — comparing what one says against another — is painfully slow. That's the exact bottleneck the arXiv Knowledge Assistant is built to break.
The idea is to build one complete pipeline that runs the whole journey: from pulling in data, to vector retrieval, to a large language model answering your questions, all the way to visualization dashboards. So on one side, you — the user — can just ask questions in plain natural language about paper abstracts, PDFs, or your past Q&A history. And on the other side, if you're a developer, you can configure how papers get ingested, manage the vector index, and keep an eye on how the models are performing.
Now here's a design choice I really appreciate. The whole thing is stitched together with Docker Compose, and the goal is what they call "one-command reproducibility." You prepare your environment file and your Firebase key, you run `make build` and `make up`, and the entire environment just comes to life. No manual wiring of a dozen services by hand.
So what does this platform actually do? A handful of things. It automatically fetches arXiv paper metadata, the PDFs, and abstracts every single day. It handles Chinese and English — both translation and question answering. It runs RAG-style Q&A, meaning it pairs retrieval from a vector database with a language model. You get customizable prompt templates, a dashboard showing your query history, and email subscriptions that push papers to your inbox. And to be honest about it — things like CI/CD, unit tests, and integration tests are still on the roadmap. Planned, not done. I respect a project that's upfront about that.
Let's talk architecture, because this is where it gets interesting. The system is broken into several small, single-responsibility microservices — an arxiv service, a note service, an email service, an API gateway, and a couple reserved for the future like image and speech services. Every one of them gets deployed together through Docker Compose.
If you zoom out, the whole thing really comes down to three flows of data.
The first is daily ingestion. On a schedule, it crawls arXiv, drops the PDFs and metadata into storage, and writes text embeddings into the vector database.
The second is the RAG question-answering flow. When you ask something, it retrieves relevant material, re-ranks it, hands that context to the language model, and the model's answer comes back to your dashboard.
And the third is email subscriptions. Every day it pulls papers, generates summaries, and sends them out to subscribers.
Picture the flow like this: a request from you hits the API gateway, which handles authentication, then passes it to the RAG service. Meanwhile, completely in parallel, a scheduler is constantly fetching from arXiv, parsing, chunking, embedding, and indexing everything into storage. When you ask a question, the RAG service and storage feed into a retrieval pipeline — hybrid search first, then re-ranking, then prompt assembly — and that prompt goes to the local language model, which generates the answer and sends it back through the gateway to you. That's the heartbeat of the system.
Let me break down the ingestion pipeline a little more. The daily schedule is triggered by Prefect 3 — that's the workflow orchestrator. Each paper runs through a chain: fetch, parse, chunk, embed, index. And where things land is deliberate. The PDFs go into MinIO, which is object storage. The paper metadata goes into PostgreSQL. And the text embeddings go into Qdrant, the vector database.
Here's why that separation matters. Because the source, the storage, and the index are each independent, ingestion and querying stay decoupled. You can swap out or extend any one piece later without tearing the others apart. That's clean engineering.
Now the retrieval and Q&A path — this is the real core. When you ask a question, the first thing that happens is query rewriting. Your question gets rewritten and, if needed, translated between Chinese and English, so the retrieval works better regardless of what language you asked in. Then comes hybrid search on Qdrant — and "hybrid" is the key word here, because it leverages both dense signals, which capture meaning, and sparse signals, which capture exact keywords, at the same time. After that, the recalled documents get re-ranked to push the most relevant ones to the top. Only then does the local language model — running on Ollama — actually generate the answer, and it can even evaluate multiple prompt templates. On top of all this, the Q&A strategy pairs RAG with agent reflection, so the system can think about its own output. And throughout the whole process, the prompt traces get recorded by Langfuse, which means you can trace back and evaluate the quality of any answer later. That observability is gold when you're debugging why a model said something weird.
A few more pieces round it out. For login, it uses Firebase Authentication with Google sign-in — you do need to drop your service account key into the right folders, and without it, the Firebase features won't work. Redis handles caching. Email subscriptions go out over SMTP using a Gmail app password. And for monitoring, it's Prometheus and Grafana — Grafana lives on localhost port 3002 by default — which you can pair with Alertmanager to set up alerts.
One nice touch on the front-end: there are actually two interfaces. There's a React and Vite app, and there's also a Gradio interface that works without Firebase at all. So if you just want to kick the tires and you don't feel like setting up a whole Firebase project, Gradio is your low-friction door in.
Quick tour of the tech stack so it all sticks. For infrastructure: Docker Compose, MinIO, PostgreSQL, and Qdrant. On the backend: FastAPI and Prefect 3. Front-end: React with Vite, plus Gradio. Monitoring: Prometheus and Grafana. And the CI/CD and testing layers — GitHub Actions and pytest — those are still planned or in progress.
So where does this leave us? The platform can already run the full end-to-end loop today: daily ingestion, into vector retrieval, into bilingual RAG question answering, out to dashboards and email subscriptions — with real observability from Grafana and Langfuse watching over it. What's still to come: the CI/CD automation, the test coverage, support for multiple language-model backends like OpenAI and Anthropic, and personalized recommendations. It's MIT licensed and open source, so you can go dig into it yourself.
Let me leave you with the three things worth remembering. First, this is fundamentally about decoupling — separating the source, the storage, and the index means every part of the system can evolve on its own. Second, retrieval quality is engineered, not accidental: query rewriting, hybrid dense-plus-sparse search, and re-ranking all stack up before the model ever writes a word. And third, reproducibility and observability aren't afterthoughts here — one command spins the whole thing up, and Langfuse plus Grafana mean you can actually see what your system is doing. Build systems you can trace, and you'll build systems you can trust.
🇹🇼 中文
研究人員每天要追的 arXiv 論文實在太多了,手動一篇一篇檢索效率很低,想快速問答比較更是麻煩。arXiv Knowledge Assistant 想解決的就是這件事——它打造了一條完整的管線,從資料攝取、向量檢索、大語言模型問答,一路到視覺化儀表板,讓你可以直接用自然語言查論文摘要、看 PDF、翻問答歷史,而開發者這邊也能設定攝取流程、管理向量索引、監控模型表現。
整套系統用 Docker Compose 來編排多個微服務,核心目標是「一鍵可重現」。你只要準備好環境變數檔跟 Firebase 金鑰,跑 make build 再 make up,整個環境就拉起來了。
先講它想解決的問題。它列出來的核心功能大概是這幾塊:每天自動抓 arXiv 論文的 metadata、PDF 跟摘要;支援中英雙語的翻譯跟問答;用向量資料庫檢索搭配大語言模型完成 RAG 問答;prompt 模板可以自訂;有查詢歷史的儀表板;還有 Email 推播訂閱。至於 CI/CD、單元測試跟整合測試,這些還在 roadmap 上,算是尚未完成的規劃項目。
再來看系統架構。平台被拆成好幾個職責很單一的微服務,像是 arxivservice、noteservice、emailservice、apiGateway 這些,另外還有 imageservice、speechservice 是留給未來擴充用的。整體可以看成三條資料流。
第一條是每日攝取:定時爬 arXiv,PDF 跟 metadata 存進 MinIO 跟 PostgreSQL,文字的 embedding 就寫進 Qdrant。第二條是 RAG 問答:檢索加上重排之後,交給大語言模型生成答案,再回傳到前端儀表板。第三條是 Email 訂閱:每天從 Qdrant 撈論文、產生摘要、寄出訂閱信。
用一句話描述資料怎麼跑:使用者的請求先進到 API Gateway 做驗證,轉給 RAG 服務;另一邊 arXiv 的內容透過排程器每天觸發,經過抓取、解析、切塊、embedding、建索引之後進到儲存層;問答的時候,RAG 服務跟儲存層一起做混合檢索、重排、組 prompt,丟給本地的 Ollama 模型生成,再把答案送回前端。
說到攝取管線,這裡的排程用的是 Prefect 3。每天定時觸發 arXiv 攝取,把抓回來的論文跑一連串處理:Fetch、Parse、Chunk、Embed、Index。PDF 存進 MinIO,也就是物件儲存,論文的 metadata 存進 PostgreSQL,文字 embedding 寫進 Qdrant 向量資料庫。因為來源、儲存跟索引各自獨立,攝取跟查詢就可以解耦運作,之後要替換或擴充都比較方便。
檢索跟問答這塊,是整個平台的核心。它的 RAG 流程大概是這樣:一開始先做 query rewriting,把使用者的問題改寫一遍,也包含中英轉換,這對應到程式裡用 LangChain 實作的 rewrite_query 方法。接著是 Hybrid Search,在 Qdrant 上同時用 dense 稠密向量跟 sparse 稀疏訊號來檢索,兩種訊號一起用,召回品質更好。然後是 document re-ranking,把召回的文件重新排序,提升相關度。最後由 Ollama 驅動的本地大語言模型生成答案,而且它支援評估多組 prompt 模板。問答策略是 RAG 搭配 agent reflection。整個過程的 prompt trace 會用 Langfuse 記錄下來,方便你追蹤跟評估問答品質。
登入、訂閱跟可觀測性的部分。身分驗證用的是 Firebase Authentication 的 Google 登入,你得把 serviceAccountKey.json 放進 apiGateway 跟 email 這兩個資料夾,少了這把金鑰,登入跟 Firebase 相關的功能就沒辦法運作。快取這層用 Redis。Email 訂閱是透過 SMTP,用 Gmail 的 App Password 來寄每日摘要信。監控則是 Prometheus 加 Grafana 這組經典搭配,負責指標跟看板,還能配 Alertmanager 設定告警。
前端提供兩種介面:一個是 React 加 Vite 的完整版;另一個是 Gradio,這個好處是不依賴 Firebase 也能用,很適合那種不想串接 Firebase 專案的情境。
技術棧快速掃一遍:雲端跟基礎設施是 Docker Compose、MinIO、PostgreSQL、Qdrant;後端跟 API 用 FastAPI 加 Prefect 3;前端是 React、Vite 跟 Gradio;監控是 Prometheus 加 Grafana;CI/CD 用 GitHub Actions,還在規劃中;測試用 pytest,單元跟整合都還在進行;IaC 主要靠 Docker Compose,Terraform 是選用的。
現況是,這個平台已經能跑通完整的端到端流程了——從每日攝取、向量檢索、雙語 RAG 問答,到儀表板跟 Email 訂閱,都串起來了,而且有 Grafana 跟 Langfuse 幫忙做可觀測性。Roadmap 上還沒補完的,包括 GitHub Actions 的 CI/CD、單元跟整合測試、多種 LLM 後端像 OpenAI、Anthropic,還有個人化推薦跟訂閱。授權是 MIT。
最後幫你收斂三個重點。第一,這套系統的核心價值是「解耦」——來源、儲存、索引、問答各自獨立成微服務,用 Docker Compose 一鍵編排,換元件、擴功能都容易。第二,它的 RAG 不是陽春版,而是走 query rewriting、hybrid search、re-ranking 再到 LLM 生成這一整條完整鏈路,還配上 Langfuse 做評估追蹤。第三,它把可觀測性當一等公民,Prometheus 加 Grafana 從一開始就在架構裡,這在很多個人專案其實是很容易被省略掉的一環。
Tags
Related Articles
Live English Tutor: Building a Real-Time Voice AI English Tutor with LiveKit + Gemini Native Audio
A real-time-voice-first AI English tutoring system: students converse with the AI teacher Emma via microphone (optionally with video/screen sharing), the system corrects mistakes in real time, and generates a post-class report in Chinese. The technical core is LiveKit (Self-hosted WebRTC) + Google Gemini 2.5 Flash Native Audio, with a FastAPI backend handling auth, courses, and data persistence.
Stock MLOps: Building an End-to-End ML System for Stock Price Prediction
Using stock price prediction as the subject, I built a complete MLOps lifecycle covering ETL, experiment tracking, model deployment, drift monitoring, and CI/CD — all orchestrated on a single machine with Docker Compose.
STT-TTS Unified: A Pure-CPU, Zero-API-Key Platform Integrating Speech Synthesis and Recognition
A self-hosted platform that integrates TTS and STT into a single interface: TTS uses Microsoft Edge TTS's 322 voices, STT uses local Whisper for offline inference on pure CPU, and results are stored in SQLite. Completely free, with no GPU or API key required.