# Greg Reda Prototypes PDF Chatbot From Scratch

> Source: <https://letsdatascience.com/news/greg-reda-prototypes-pdf-chatbot-from-scratch-3d6440b5>
> Published: 2026-06-28 00:30:58+00:00

### Pipeline Fundamentals Before Framework Abstraction

Most production teams adopt LangChain or LlamaIndex without fully internalizing what those abstractions manage. Greg Reda's October 2023 post on gregreda.com documents a deliberately minimal PDF chatbot built for refstudio - the goal was to understand pipeline mechanics before relying on framework conveniences.

### The Two-Phase Architecture

The prototype separates PDF ingestion from chatbot interaction. Ingestion: convert PDFs to text, chunk the text, optionally generate embeddings, persist chunks. Interaction: take a user question, retrieve the most similar chunks - via BM25 ranking (no embeddings needed) or nearest-neighbor search over embeddings - assemble a context-augmented prompt, and return the LLM response. The explicit BM25 path is the most practically useful detail: for small corpora, keyword ranking often matches semantic retrieval accuracy at far lower infrastructure cost.

### LanceDB as the Embedded Vector Store

Reda chose LanceDB (open-source, embedded, Apache Arrow-based) to evaluate vector DB ergonomics without running a separate service. The embedded architecture keeps the prototype self-contained - relevant to practitioners building local-first or desktop AI tools where remote vector DB round-trips add latency and operational cost.

### Practitioner Implications

The two-phase separation maps cleanly to the engineering boundaries teams encounter in production: PDF parsing is brittle OCR/layout logic that changes independently of retrieval and prompting logic. Keeping these stages separate reduces coupling and simplifies debugging. Code and demo video are available at github.com/gjreda/scratch-pdf-bot.

### What to Watch

- •Whether embedded vector stores like LanceDB continue displacing remote services for local-first AI applications
- •How chunking strategy choices - size, overlap, semantic vs. fixed-length - affect answer faithfulness as document QA expands beyond simple keyword matching
- •Integration patterns between minimal custom pipelines and higher-level frameworks when production scale demands it

## Key Points

- 1Minimal RAG pipelines clarify engineering scope by separating extraction, chunking, retrieval, and prompting into testable steps.
- 2Embedding-based retrieval improves semantic matching, but embedding-free BM25 ranking is still practical for small PDF collections.
- 3Embedded vector stores like LanceDB lower friction for local prototypes; chunking and retrieval depth remain primary fidelity levers.

## Scoring Rationale

Oct 2023 practitioner walkthrough on minimal RAG pipeline design; technically accurate with code verified on GitHub. Foundational two-phase decomposition and BM25-vs-embedding trade-off remain relevant for document QA practitioners. Dated content limits immediacy - solid minor range.

Practice interview problems based on real data

1,625 SQL & Python problems across 15 industry datasets — the exact type of data you work with.

[Try 250 free problems](/problems)
