A search-and-answer backend that lets clinicians and medical students ask questions of major surgical textbooks and get cited, structured answers back, combining semantic vector search, a knowledge graph of how the books are organized, and a streaming service that uses Claude to plan and write each one.
sushrutalgs.ai answers surgical exam questions with citations that trace back to a specific place in a specific textbook, so retrieval has to return more than a plausible paragraph. Three full surgical textbooks are structured documents: the same sentence carries a different meaning under operative technique than under complications, and the answer to a real clinical question is usually spread across a chapter rather than sitting in one chunk. Ordinary chunk-and-embed search finds text that reads correctly but hands it back stripped of where it came from, which is the part a clinician needs in order to check it. HybridFlow exists to keep the structure of the book attached to whatever retrieval returns.
Vector search can find the right paragraph from a question phrased in a clinician's words, but it cannot say which chapter that paragraph belongs to or which cross-reference qualifies it. A graph of the book's hierarchy knows all of that and cannot be searched by meaning, so on its own it never finds the entry point. The naive fix, querying both and concatenating, produces two rankings on no shared scale and leaves the writing model to reconcile them, while every extra passage it drags in widens the context. That is the condition under which the answer stays fluent and starts attributing a figure to the wrong chapter, which is the one failure a cited product cannot absorb.
Splitting the pipeline into a planning call and a writing call adds a round trip to every query, and prompt caching is what makes that affordable: the planning prompt hits cache about 80 percent of the time, holding an answered query near five to six cents. The other standing cost is verification. Answers run against an eight-gate regression suite covering classification, citation integrity, hallucination density, format and fallbacks, because a system that cites its sources is only worth the extra machinery if the citations are checked automatically rather than by reading.
It runs live behind sushrutalgs.ai, reached through a Cloudflare Worker gateway with two-factor service auth. Under load it sustained 30 concurrent queries with zero errors at about 14.7 times the throughput of a sequential baseline, and it passes the answer-quality suite 20 of 20. Measured on its own, vector retrieval scores success@5 of 0.90 and MRR 0.79 against a frozen gold set, at a p50 search latency around 178 ms. The honest reading of that 0.90 is that roughly one question in ten does not have its best passage in the top five, and the chapter-selection pass and graph expansion are what keep those cases turning into thin answers rather than confident wrong ones.
In numbers
success@5 of 0.90 means one question in ten still needs the graph expansion to save it, and that is the actual argument for a hybrid design over a single vector index: the failures it catches are the ones a cited product cannot afford to have answered confidently and wrong.