ChatGPT with a reference librarian
A self-hosted bridge between your document library and OpenAI, so answers cite your files instead of training data.

What it does
OP Vault is a Go backend and React frontend that ingests documents—PDFs, EPUBs, Word files, plain text—chunks them, generates OpenAI embeddings, and stores the vectors in Pinecone. When you ask a question, it retrieves the most relevant chunks, stuffs them into a prompt that respects token limits using tiktoken, and has ChatGPT answer while citing the exact source file and passage. It is essentially a roll-your-own retrieval-augmented generation stack focused on human-readable archives like books and letters.
The interesting bit
The whole thing is a carefully orchestrated glue job: the Go server handles multipart uploads up to 300 MB, extracts text (leaning on Poppler for PDFs), slices it into chunks, and upserts everything into Pinecone with metadata tracking exact character positions. The clever part is the prompt assembly—QuestionHandler queries Pinecone with the question’s embedding, then packs the retrieved context plus the original question into a prompt sized precisely to stay within OpenAI’s limits. It is boring infrastructure done visibly well.
Key highlights
- Supports PDF, EPUB, DOCX, TXT, RTF, and plain text uploads.
- Answers include the filename and specific text snippet that sourced the response.
- Backend handles up to 300 MB total per upload batch (default 3 MB per file, hardcoded in
fileupload.go). - Uses
go tiktokento estimate token counts and avoid blowing the context window. - Frontend is React with Less; backend is plain Go with two POST endpoints (
/uploadand/api/question).
Caveats
- Requires manual dependency wrangling: Node v19, Go 1.18.9, and Poppler must be installed separately.
- Pinecone’s free tier recently restricted namespaces, which may affect new free-tier setups.
- The 3 MB per-file cap is a compile-time constant, not a runtime config.
Verdict
Worth a spin if you want a concrete, hackable reference implementation of document Q&A with OpenAI and Pinecone. Skip it if you are looking for a managed SaaS or a vector database-agnostic solution; this is tightly coupled to the “OP Stack.”
Frequently asked
- What is pashpashpash/vault-ai?
- A self-hosted bridge between your document library and OpenAI, so answers cite your files instead of training data.
- Is vault-ai open source?
- Yes — pashpashpash/vault-ai is open source, released under the MIT license.
- What language is vault-ai written in?
- pashpashpash/vault-ai is primarily written in JavaScript.
- How popular is vault-ai?
- pashpashpash/vault-ai has 3.4k stars on GitHub.
- Where can I find vault-ai?
- pashpashpash/vault-ai is on GitHub at https://github.com/pashpashpash/vault-ai.