Case study · an online book-recommendation brand
A chatbot that recommends real books
A customer-facing chatbot for a book-recommendation brand. It suggests two or three books at a time in the brand's voice, checks every title against a live library catalog so it never invents a book, and shows covers and links to the brand's own store.
The job
The brand wanted a chatbot on its website that talks about books the way its reviewer does, sends readers to its own store and never to the big retailers, and stays on the subject of books. The hard part is that a chat model will happily recommend a book that does not exist.
What I built
- It recommends in character. A persona with written rules: two or three books per reply, on topic, no retailer it is not allowed to name.
- It checks every book. A second pass pulls each title and author out of the reply and looks it up in the Open Library catalog. The newest English edition with an ISBN and a cover is the one shown, with a link to the brand's store. A title the catalog cannot find is not shown.
- Moderation adds no wait. Every message is checked by a moderation service at the same time as the reply is written, not before.
- Sessions have a budget. After nine recommendations, or a set amount of conversation, the bot wraps up with a link to the store.
- Lookups are cached. A book seen once is stored, so the catalog is not asked again.
- It lives in the brand's site. One container on Google Cloud Run, built to be embedded in the brand's existing website.
Choosing the model by measurement
On two test titles, the cheaper model extracted the title and author correctly 17 times out of 20. The expensive one scored 20 out of 20 at several times the cost. The catalog check catches what the cheap model misses, so production runs on the cheaper model. When a newer low-cost model came out, I moved production to it.
Who built what
The first prototype was built with a partner. The production system, from the API to the front end to the deployment, is mine end to end.
Where it stands
Live and customer-facing. The brand asked for and received changes over about six months after launch.
Where the same approach applies
Any chatbot that must only say true things about your products: a parts finder, a menu assistant, a course adviser. The pattern is the same. Let the model talk, then check every claim against your own catalog before the customer sees it.