ALWow, great catch! Also, thanks for reading the blog and trying the code. You’re right: with overlap = 0, current.slice(-overlap) becomes slice(0), so the old snippet copied the whole previous chunk into the next one.Reply·Article·Oct 17·Embeddings, Vector Search & RAG from Scratch with Node.js and PostgreSQL (pgvector)