Recommended with reservations/not recommended
Two stars… although I’m tempted to say one and three quarters. As is often the case with this kind of book, you need to know what it is and what it isn’t. You do get a basic introduction to what vector search is (i.e. measuring similarity between query and document by transforming both into high-dimensional vectors whose directions can be compared), but beyond that I’d argue the subtitle should be “use Node.JS with the Express.JS backend framework and CouchBase’s vector search with OpenAI’s API” because that’s what it’s a walkthrough of. There’s no discussion of how the vectors can be created other than via OpenAI’s Embeddings API, which is a closed-source service with a time-limited gratis trial that’s not meant to last out your project. Yes the subtitle does mention using AI so perhaps they can be forgiven for not including a little coverage of non-neural network ‘traditional’ vector methods like Bag-of-Words and maybe singular-value decomposition They could at least have mentioned that there exist alternatives to OpenAI, some of which are free and downloadable from platforms like HuggingFace if you want to run them locally for more privacy: it would have been better to have had at least some discussion of these, their resource requirements and perhaps an example.
Similarly, once the vectors are generated I suppose it’s understandable we won’t see much discussion of how algorithms like HNSW or IVF-PQ work, but I felt a bit rushed into the decision to use CouchBase (no comparison with Weaviate etc); at least it seems all features mentioned now work on the self-hosted version not just paid Capella clusters.
I also disagree with the author’s idea to introduce stop-word removal when the chosen OpenAI model is already dealing with stop words better than any code you’re going to write, and it doesn’t work very well with the exact keyword option either (stop words still removed from middle of quoted phrase?) and finally I’m not sure about the repeated claim that we’ve built a vector search system “from scratch” when both the vectorisation and the searching is done by third-party tools.
I wouldn’t pay the $23 (£17) for this book but you might if you want to follow its very specific approach.
I reviewed the EPUB copy of the book which like all Pragmatic books is DRM-free. To make this EPUB work on older devices like the Nook Simple Touch, you’ll have to edit css/bookshelf.css and remove the max-width lines, as older software processes those “ch” units badly and ends up linebreaking after nearly every letter. Once that CSS was fixed the only other problems were diagrams being tiny and adverts at the end being overprinted; a more modern reading device should help.
Website: https://pragprog.com/titles/bgvector/vector-search-with-javascript/
Code: https://media.pragprog.com/titles/bgvector/code/bgvector-code.zip










