LangChain Reference Architecture (Python) Overview Eight months into a LangChain service, a code review surfaces the mess. Twelve chain definitions live inlined inside FastAPI route handlers. Three retrievers are constructed at module-global scope, one bound to because that was the first tenant in the pilot — that retriever now returns Acme's documents to every other tenant, a P33 leak that has been live in production for six weeks. is hardcoded at four separate call sites. A backed by the default loses every conversation on pod restart (P22) — which is most days, because Cloud Run scales to…