Research instrument · built 11 Sep 2026
A local, citation-disciplined brain over the literature on fungi in religion. The hard part isn't the vector store — it's that this corpus is epistemically booby-trapped, and a normal RAG pipeline will confidently tell you the eucharist was a mushroom.
Why this isn't a normal RAG project
Search this literature for "mushrooms and Christianity" and you will pull, with near-identical semantic similarity: a 16th-century friar's eyewitness account of Aztec ritual; a 2015 peer-reviewed archaeobotany survey; Wasson's 1968 Soma thesis, which Indology does not accept; and Allegro's 1970 book, which Semitic philology rejects outright.
A plain vector store hands all four to the model as "relevant context" — equally weighted, stripped of the one thing that matters most: who said it, and whether anyone competent believes them. The model then does what models do and synthesises a confident paragraph.
Retrieves Allegro, who argues exactly this at length and in detail, plus a penumbra of blogs and videos repeating him. Nothing in the payload records that the argument was rejected.
Answer: a fluent synthesis of a thesis that no Semitic philologist accepts, delivered in the corpus's own confident voice.
Retrieves the same Allegro passages, tagged rejected, carrying a reception note — and automatically pulls the critical apparatus alongside, flagged as counter-source.
Answer: "Allegro argued this in 1970. Fourteen scholars publicly disavowed the book; his etymological method is not accepted. Here are the passages."
The editorial layer · mycotheca/sources.py
Every passage carries a tier and a free-text reception note, and both travel with the quote into the model's context. Tier also re-weights retrieval ranking, so a rejected source has to be substantially more relevant to outrank a peer-reviewed one.
| Tier | Weight | Meaning, and how the model must handle it |
|---|---|---|
| primary | 1.00 | Eyewitness or contemporary record. Evidence — but name the observer and their interest. A Franciscan describing "demonic" rites is a witness, and a hostile one. |
| scholarly | 1.00 | Peer-reviewed by a discipline competent to referee the specific claim. |
| context | 0.85 | Background, not direct evidence about fungi. Frazer is here. |
| contested | 0.60 | Seriously argued by a credentialed author, not accepted. Attribute by name, state that it is disputed, never assert. Wasson's Soma, The Road to Eleusis, the Stoned Ape hypothesis. |
| rejected | 0.30 | Repudiated by the relevant specialists. Report only as "X claimed…", always with the rejection. Never used to support a factual claim, however well it answers the question. |
| popular | 0.45 | Trade press and journalism. Good for reception history, weak as evidence. |
| discourse | 0.15 | Forums and video. Evidence of what people believe, never of what happened. |
The tiers are editorial judgement about scholarly consensus, not facts. They live in one readable Python file and are meant to be argued with.
The mechanism that does the actual work
Tagging alone isn't enough, because the contested sources are often genuinely the most relevant text in the corpus. Ask about Soma and Wasson wins on every similarity metric — he wrote a whole book on precisely that question.
So each contested or rejected work names its critics in the bibliography, and retrieval follows those edges automatically. Pull Wasson's Soma and you also get Brough's 1971 philological rebuttal in the same payload, flagged why: counter-source. The model cannot quietly omit the objection, because the objection is sitting in its context window.
Harvest → gate → tier → index → retrieve
The topic gate turned out to matter as much as the tiers. Without it the harvest fills with the modern psychedelic-therapy literature — an enormous field that shares this one's vocabulary while being about something entirely different. 619 records were rejected on the way in.
The source map
The good news is that the primary record is overwhelmingly public domain — the colonial Mesoamerican sources, the Siberian ethnography, the Victorian mycology. The bad news is that almost the entire 20th-century canon is in copyright, including the books the field argues about most.
| Channel | What's there | How |
|---|---|---|
| Public domain | Sahagún's Historia general; Hernández's Nova plantarum (1651); Strahlenberg on the Koryak (1738); Cooke's Seven Sisters of Sleep (1860); Griffith's Rig Veda; Frazer. | Internet Archive, with real page numbers from the leaf map |
| Open access | Most modern ethnomycology and archaeobotany. The OA fraction in this niche is unusually high. | OpenAlex → publisher PDF |
| In copyright | Wasson (Soma, Mushrooms Russia and History, the Sabina velada), Allegro, The Road to Eleusis, Furst, Estrada, Letcher's Shroom. | Buy them; drop files in corpus/raw/ |
The in-copyright works are still in the bibliography with their tiers and reception notes, marked unread. corpus_stats() lists them explicitly as "the model must not pretend to have read these" — so the brain knows the shape of its own ignorance, which is more than most RAG systems manage.
Measured, not assumed
Ollama has no GPU path for AMD on macOS, so everything ran on the i9 CPU (library=cpu, layers.offload=0). Measured on this machine:
bge-m3 is the right model for a corpus containing Spanish, Latin, Greek and Nahuatl — and at 73 seconds a passage it would take roughly five weeks to index this corpus. So vectors are opt-in, and lexical retrieval runs alone by default.
That is less of a compromise than it sounds here, because this corpus has an unusually distinctive vocabulary — teonanácatl, kykeon, mukhomor, Psilocybe. What lexical search can't do is cross languages, so there's a hand-built bridge that expands an English query into the Spanish, Latin and Nahuatl the sources actually use. Ask in English, hit Sahagún in Spanish.
For good multilingual vectors, spend about a dollar: MYCO_EMBED=openai ./.venv/bin/python backfill.py. The index is incremental and resumable.
No chat app — your existing Claude is the interface
cd ~/mycotheca
./.venv/bin/python build.py # harvest + index
claude mcp add mycotheca -- ~/mycotheca/.venv/bin/python ~/mycotheca/brain.py
Four tools: search (tier-aware, counter-sourced), read_work (surrounding argument, because this literature reverses itself two paragraphs later), list_works (the shape of the evidence), corpus_stats (the shape of the gaps). One prompt, investigate, runs an adversarial workup of any claim: best case for, best case against, then separates what is attested from what is identified from what is merely interpreted.
That last distinction is the one the field collapses constantly, and most of its famous claims live in the third category while being quoted as the first.