04/RAG / Tooling/2026/Open Source
AskPDF
Upload a PDF, ask anything — semantic answers grounded in the document.

// Overview
Lightweight RAG app: PDF ingest → OpenAI embeddings → Pinecone vector store → contextual chat. Built as a standalone reference for the same pattern that powers Multiagent rag, but tiny enough to fork in an afternoon.
// Problem
Most 'chat with Docs' demos either hallucinate or hit token limits. The trick is chunking + filtering, not the model.
// Approach
01Recursive character splitter with overlap to preserve concept boundaries.
02Per-document namespace in Pinecone so multiple uploads don't poison each other.
03Streaming responses with citation chunks surfaced inline.
// Outcome
›Reference implementation reused across client work
›Sub-second retrieval on common doc sizes
// Stack
TypeScriptNext.jsOpenAIPinecone
Next case →