Bookshelf Séance
说明与用途
Bookshelf Séance 允许用户向已故作者提问,回答仅使用作者自身作品中的片段并提供引用,所有操作均在本地完成,确保数据隐私。
问题
How to converse with deceased authors using only passages from their own books, without uploading private EPUBs to external servers.
结果
The demo ran on a GitHub Actions runner with 2 CPU cores, no GPU, and completed a three‑question session in 44 seconds, demonstrating that the system can answer questions using only cited passages and silence when no relevant text exists.
工作流
- 1. Run
seance ingestto read each EPUB, extract metadata, split chapters into ~120‑word passages, and build a JSON index in~/.seance. - 2. Run
seance summon <author>to rank passages with BM25 against the user’s question. - 3. If no passage scores above a silence threshold, the program outputs “The spirits are silent on this.” and stops.
- 4. If passages qualify, send the top passages to a local Gemma model via Ollama with a prompt to answer in first person using only those passages and citing them as [n].
- 5. After the model returns, the program verifies that every cited [n] corresponds to a passage that was actually provided; if not, the answer is discarded and silence is returned.
证据
Bookshelf Séance lets you talk with the dead authors on your own bookshelf.
The ghost may speak only through passages from its own books, and it must cite them.
If no passage scores high enough, the program stops there. No model call, no guessing.
The demo uses gemma4:e2b, the smallest Gemma 4, so it runs without a GPU: the run above took 44 seconds on 2 CPU cores.
The only network request the program makes is to Ollama on localhost.
- 记录日期: 2026-11-01T18:28:54.419Z