LangChain.js + DeepCitation

RAG retrieval gets you close. DeepCitation proves the answer.

This example keeps the retrieval stack small: a bundled PDF corpus, OpenAI embeddings, LangChain's in-memory vector store, and DeepCitation for citation-aware generation plus verification.

4 PDFsRemote corpus, fetched and cached on first use
0 infraNo DB, no vector service, no Docker
1 routeRetrieve, answer, cite, verify, return

Ask about the four corpus documents.

The server retrieves only the most relevant sources, then fetches those exact PDFs and sends them through DeepCitation so the answer can be verified against page-level evidence.

Each question is a fresh retrieval + verification pass so the LangChain and DeepCitation flow stays easy to inspect.