← Back to Portfolio
Publisher knowledge engine console
Python RAG Vector Search LLM REST API
Client: ๐Ÿ‡ญ๐Ÿ‡ฐ Hong Kong ยท education publisher

Publisher Knowledge Engine โ€” Bilingual Q&A Over a Book Catalogue

A retrieval engine that answers questions about a publisher's own titles in English or Chinese โ€” and returns the passages behind every answer, so nothing it says is unattributable.

Overview

A Hong Kong education publisher wanted readers, teachers and its own staff to be able to ask questions of the material it owns โ€” storybook text plus the assessment framework that goes with it โ€” and get an answer in the language they asked in. The hard part was never generating prose. It was making sure the answer came from the catalogue rather than from the model's general knowledge, and proving it.

The engagement covered Phase 1: the ingestion and retrieval backend, an answer contract that carries its own evidence, and a working endpoint any front end can call. A thin test surface was delivered alongside it so the client could interrogate the engine directly rather than take a written report on faith.

What Was Built

Engineering Notes

The interesting constraints were about trust and cost rather than model quality. Retrieval is capped and reranked so an answer is composed from a handful of high-signal passages instead of everything that loosely matches โ€” cheaper per question and far easier for a reader to verify. Model selection was measured against real questions rather than chosen by reputation, since answer latency is what a reader actually feels; a heavyweight model that took tens of seconds was rejected in favour of one that answers in a couple.

The citation format was designed before the prompt. If the engine cannot name where an answer came from, the answer does not ship โ€” that rule drove the chunking strategy, the metadata carried through the pipeline, and the shape of the API response.

Tech Stack

Python Vector Search Embeddings RAG LLM API REST API PHP proxy

Outcome

Phase 1 runs live. The client can ask the engine a question in either language and see the passages it used, which turned a conversation about what the product might do into something they could put in front of their own stakeholders. Later phases โ€” the reader-facing interface and wider catalogue ingestion โ€” build on the same contract.

Client name and branding are withheld. The screens shown here use a placeholder brand and representative sample data; the source passages quoted are from a public-domain text.