Kick off your book project in 2 hours, get started with GhostAI in 2 hours, or do both! Free live workshops, on Zoom. You’ll leave with a real book project and a clear plan to keep going. Saturday, June 27, 2026.

Leanpub Header

Skip to main content

From Flood to Cause

This book is 100% completeLast updated on 2026-06-21

When something trips and two hundred alarms fire at once, which one is the cause? From Flood to Cause shows you how to build deterministic, grounded, auditable root-cause analysis where a causal engine decides and a language model only explains — never diagnoses, never guesses, and abstains the moment grounding is absent. Every concept is wired to a live, zero-install NEXUS-1 console in your browser, so you don't just read the architecture — you drive it.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
About

About

About the Book

Something trips. In the next four seconds, two hundred alarms fire. The board is a wall of red, every annunciator is screaming, and the one alarm that actually matters — the cause — is buried somewhere in the flood, indistinguishable from the two hundred consequences stacked on top of it. "Loudest alarm wins" is how that ends badly.

And now there's a new temptation: point a large language model at the flood and ask it what happened. It will give you a fluent, confident, beautifully-worded answer — and you will have no way to know whether any of it is true.

From Flood to Cause is written to resolve both problems at once, around a single governing principle:

The engine decides, the model explains.

A deterministic causal engine — not a neural network — identifies the root cause from an engineered fault-propagation graph and corroborating telemetry. The language model never diagnoses, never ranks, never votes. It runs strictly downstream, in an advisory-only role, to put the engine's conclusion into cited language a person can audit — and it abstains the moment grounding is absent. This book shows you, end to end, how to build a system like that and why every piece is where it is.

Try the Live Console Now!

This is a hands-on companion to NEXUS-1, a fully interactive, browser-based root-cause console. No server, no installation, zero setup. Every incident, graph node, edge weight, and delay window in the book is drawn from this live system — nothing is invented. Load it, trigger a cascade, and watch the engine collapse the flood to a single origin:

👉 Play with the live console: https://gregory82gr.github.io/Nexus-1-phase-0/

What's Under the Hood? (The Engineering Blueprint)

This is not a prompt-engineering listicle. It's the literal architecture and the discipline that makes an LLM safe to put near an operating decision:

  • The Engineered Causal Graph — backbone, learned-weight, artefact, and rejected edges; delay windows; how the engine separates the one origin from the cascade it caused.
  • The Grounding Triangle — database, telemetry, and documentation as three independent witnesses, assembled into a single Unified Context.
  • The Anti-Hallucination Engine (H1–H10) — ten concrete controls, each with a worked example: the closed-world contract, the grounding gate, entity and citation validation, structured output, forced abstention, and a hash-chained audit trail.
  • What the Model May Read — building a RAG corpus you can trust: hybrid retrieval, retrieval evaluation, and corpus governance.
  • The Reference Stack — OpenTelemetry, Prometheus, Grafana, and Microsoft Semantic Kernel used as a constrained orchestration layer (explicitly not an agent that picks its own tools), implemented in C# and SQL Server 2025 with vector retrieval.
  • Three Case Studies from the Console — a cascade, an EMI artefact, and a QA escape, each diagnosed and explained from real console data.
  • Five Developer Appendices (F–J) — copy-pasteable quickstart: project layout, the Ollama Modelfile, the closed-world prompt and validation schema, observability wiring, and a CI evaluation harness — everything needed to stand the explain side up on your own machine.

How Every Chapter Is Structured

Every chapter follows the same engineering blueprint:

  1. What You Already Know — the bridge from your existing software, data, or control-systems background to the concept at hand.
  2. The Concept — a clear, prose explanation of the mechanism and why it exists.
  3. One Figure — a single precise diagram, drawn from real console data, never decoration.
  4. See It in NEXUS-1 — exactly where that concept lives on the live console screen.
  5. Honest Boundary — a transparent statement of what the Phase-0 system genuinely does versus where it simplifies, including the limits of the controls themselves. No claim that something works better than it does.

👤 Who This Is For

If you are a software, data, control-systems, or SRE engineer — comfortable with C#/.NET, SQL, and systems design — and you are being asked to put a language model somewhere its answers actually matter, this book is built for you. It assumes no background in alarm management or nuclear engineering; it builds the reasoning up from the screens and the code. It is the diagnostic-and-AI companion to From Grid to Core, and it stands entirely on its own.

Share this book

Author

About the Author

Grigorios Agathangelidis

My name is Grigorios Agathangelidis, and my professional background is in Electrical Engineering and Software Engineering. I am not a nuclear physicist, nuclear engineer, control-room operator, or specialist in industrial diagnostics. The ideas presented in From Flood to Cause are not derived from direct operational experience in nuclear facilities or other safety-critical plants. Rather, they are the result of extensive independent study and a long-standing interest in how complex systems fail, recover, and explain themselves.

This book emerged as a natural extension of the NEXUS-1 project. While From Grid to Core explored the architecture of a deterministic, explainable, and auditable digital-twin platform, From Flood to Cause focuses on a more specific question: how can we identify the true origin of a failure when hundreds of alarms, symptoms, and signals compete for attention?

My interest in this problem extends beyond the nuclear domain. Alarm floods, cascading failures, misleading symptoms, and hidden root causes appear in every sufficiently complex system: industrial plants, power grids, telecommunications networks, data centres, transportation systems, and modern software platforms. Although the examples in this book are drawn from a nuclear-inspired environment, the underlying principles are intentionally broader.

Throughout this work I have tried to combine disciplines that are rarely discussed together: root-cause analysis, fault propagation, systems engineering, digital twins, observability, retrieval-augmented generation (RAG), explainable AI, verification and validation (V&V), and software architecture. My goal has been to explore how deterministic reasoning and modern language models can coexist without compromising traceability, auditability, or engineering rigor.

A central theme of this book is that language models should explain decisions, not make them. The architecture presented here places deterministic inference, telemetry corroboration, and grounded evidence ahead of AI-generated explanations. Whether or not the specific implementation proves useful, I believe the broader principle—that trustworthy systems require clear boundaries between reasoning and narration—will remain relevant far beyond the domains discussed here.

The cases, architectures, and mechanisms presented throughout this book are educational and conceptual in nature. They are intended to illustrate engineering principles, design patterns, and analytical approaches rather than provide certified operational solutions. Any resemblance to real facilities, events, or systems serves the purpose of explanation and learning, not operational guidance.

What interests me most is not any single technology but the intersection of technologies: how telemetry becomes evidence, how evidence becomes explanation, how explanations remain accountable, and how humans retain authority in systems increasingly assisted by automation and artificial intelligence. These questions sit at the crossroads of engineering, software, safety, and decision-making, and they continue to shape my work.

From Flood to Cause is therefore not only a book about alarm management, root-cause analysis, or AI-assisted diagnostics. It is also an exploration of a broader engineering philosophy: that understanding should precede automation, that evidence should precede conclusions, and that every claim made by a machine should be traceable to the facts that support it.

The ideas collected here represent a snapshot of an ongoing journey of learning and experimentation. Some concepts will undoubtedly evolve; some assumptions may prove incomplete. That is the nature of engineering. Progress comes not from claiming certainty, but from continually refining our understanding in the face of new evidence.

If there is a single message I hope readers take away from this work, it is that complex systems do not become understandable through more data alone. They become understandable when data is organized into evidence, evidence into causality, and causality into explanations that humans can verify, challenge, and trust.

Above all, this book reflects a belief that curiosity, disciplined reasoning, and intellectual humility remain among the most powerful tools available to engineers. Technology changes rapidly; the principles of careful observation, evidence-based analysis, and honest acknowledgment of uncertainty do not.

Contents

Table of Contents

  • Front Matter
    • Foreword (forthcoming)
    • Preface – Why "Loudest Alarm Wins" Fails
  • Chapters
    • Chapter 1 – Anatomy of an Alarm Flood
    • Chapter 2 – The Engineered Causal Graph
    • Chapter 3 – The Grounding Triangle
    • Chapter 4 – The One-Truth Pipeline
    • Chapter 5 – Telemetry as the Witness
    • Chapter 6 – The Anti-Hallucination Engine (H1–H10)
    • Chapter 7 – What the Model May Read
    • Chapter 8 – Architecture: OpenTelemetry, Prometheus, Grafana & Semantic Kernel
    • Chapter 9 – Implementation in C# and MS SQL
    • Chapter 10 – Three Case Studies from the Console
    • Chapter 11 – Operational Lessons and Future Directions
  • Appendices
    • Appendix A – Glossary of RCA Terms
    • Appendix B – The H1–H10 Controls Checklist
    • Appendix C – SQL Schema Definitions
    • Appendix D – Using the NEXUS-1 Console for RCA
    • Appendix E – References & Further Reading
    • Appendix F – Developer Quickstart
    • Appendix G – The DSLM in Ollama
    • Appendix H – Prompt, Schema & Validation
    • Appendix I – Observability Bootstrap
    • Appendix J – Evaluation Harness
  • Back Matter
    • Index

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub