cd /news/artificial-intelligence/greg-reda-prototypes-pdf-chatbot-fro… · home topics artificial-intelligence article
[ARTICLE · art-42197] src=letsdatascience.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Greg Reda Prototypes PDF Chatbot From Scratch

Greg Reda prototyped a PDF chatbot from scratch in October 2023, deliberately avoiding frameworks like LangChain to understand pipeline mechanics. The two-phase architecture separates ingestion from interaction, using BM25 ranking for retrieval without embeddings for small corpora. Reda chose LanceDB as an embedded vector store to keep the prototype self-contained, highlighting trade-offs between minimal custom pipelines and higher-level frameworks.

read2 min views1 publishedJun 28, 2026
Greg Reda Prototypes PDF Chatbot From Scratch
Image: Letsdatascience (auto-discovered)

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

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @greg reda 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/greg-reda-prototypes…] indexed:0 read:2min 2026-06-28 ·