Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[Explore DDD 2026] LLM AIs as domain experts

[Explore DDD 2026] LLM AIs as domain experts

Collaborating with domain experts is essential to practicing DDD, but sometimes it can be challenging for various reasons. Maybe the communication is not in tune to make the domain knowledge possible to use yet, or their availability to answer your questions is not enough, you might even not have a proper domain expert on the team! These might be occasions where an LLM AI primed to act like a domain expert might be just what you need. So in this talk, we’ll discuss how to use LLMs as powerful tools when practicing DDD!

Avatar for Talysson de Oliveira Cassiano

Talysson de Oliveira Cassiano

September 24, 2026

More Decks by Talysson de Oliveira Cassiano

Other Decks in Programming

Transcript

  1. ⚠ This is not a "how to drive a project

    with AI" talk Also not an "AI is bad/good" talk talysson.com
  2. Automating Domain-Driven Design: Experience with a Prompting Framework Eisenreich, T.,

    Jusic, H., & Wagner, S. (2026, March 27) https://arxiv.org/abs/2603.26244v1
  3. Requirements Input Ubiquitous Language Establishment + Event Storming Simulation System

    Prompt: DDD Specialist and Architecture Sparring Partner Bounded Contexts Identification Aggregate Design Technical Architecture Mapping Eisenreich, T., Jusic, H., & Wagner, S. (2026, March 27) https://arxiv.org/abs/2603.26244v1 Domain Model
  4. Ubiquitous Language Establishment Event Storming Simulation Errors accumulate without guidance

    Bounded Contexts Identification Aggregate Design Technical Architecture Mapping Eisenreich, T., Jusic, H., & Wagner, S. (2026, March 27) https://arxiv.org/abs/2603.26244v1
  5. Ubiquitous Language Establishment Event Storming Simulation Errors accumulate without guidance

    Bounded Contexts Identification Aggregate Design Technical Architecture Mapping Eisenreich, T., Jusic, H., & Wagner, S. (2026, March 27) https://arxiv.org/abs/2603.26244v1
  6. Ubiquitous Language Establishment Builds a shared understanding of the model

    Event Storming Simulation Errors accumulate without guidance Bounded Contexts Identification Aggregate Design Technical Architecture Mapping talysson.com Requires understanding of the model
  7. Ubiquitous Language Establishment If you fully automate these Event Storming

    Simulation Errors accumulate without guidance Bounded Contexts Identification Aggregate Design Technical Architecture Mapping talysson.com You won't be able to guide these
  8. Does it mean we should not use AI with DDD?

    No, but humans should be active, especially in the groundwork talysson.com
  9. "The code is a lossy projection from the specification" AI

    Engineer. (2025, July 12). The New Code - Sean Grove, OpenAI. https://www.youtube.com/watch?v=8rABwKRsec4
  10. A set of properties a useful specification needs - Communicates

    meaning and intent - Uses a consistent and unambiguous vocabulary - Define a scope to which it applies talysson.com
  11. DDD spent 20 years solving a problem SDD just discovered

    it has: Effective and meaningful communication talysson.com
  12. "[...] would be an utterly simple person […] if he

    thinks written words are of any use except to remind him who knows the matter about which they are written, […] if you question them [the words], wishing to know about their sayings, they always say only one and the same thing [...]" - Phaedrus, Plato, 370 BC talysson.com
  13. "[...] the programmer's knowledge transcends that [knowledge] given in documentation

    [...]" - Programming as Theory Building, Peter Naur, 1985 talysson.com
  14. "The code is a lossy projection from the specification" The

    specification is a lossy projection from the model talysson.com
  15. The model isn't a document or the code It is

    shared understanding and intuition talysson.com
  16. To represent a problem + solution, we need a domain

    model To explore a domain model, we need domain knowledge To have domain knowledge, we need domain experts And sometimes, domain experts may not be available talysson.com
  17. Why would domain experts not be available - Their available

    time is scarce - The access to them is not easy or practical - The communication is not in tune yet - The team doesn't have domain experts (yet) talysson.com
  18. To make the best out of this Domain experts Development

    experts We do this first talysson.com
  19. Special in-flight meals system - Allow airlines to offer special

    in-flights meals paid in advance - Customers order special meals up to 5 hours before the boarding - A list of meals is sent to a specialized company, which will cook and deliver them directly to the airports - Customers can rate their experience and be part of a loyalty program and get discounts and gifts talysson.com
  20. In-flight trolleys (meal carts) Turnaround schedules Extra in-flight meals Cold

    chain Long-haul flights talysson.com HACCP (Hazard Analysis Critical Control Point) In-flight meal shortage Standardization
  21. 1 An LLM will give you the industry-average knowledge This

    knowledge/vocabulary might not work for your case talysson.com
  22. 2 LLMs are sycophants "You're absolutely right!" The "tone" you

    use with LLMs might push them towards the wrong direction talysson.com
  23. Roles played outside of the EventStorming room 1. Make the

    industry-average knowledge useful - 2. 3. Generate candidate domain events before the session, read and compare with the wall only afterwards Role-play the absent stakeholder - Generate questions the absent stakeholder would make, never answers - Direct the questions to this person after the session Check the graph structure - talysson.com Events with no trigger or consumer, orderings that can't happen, …
  24. Using LLMs to make the access to the model easier

    for the whole team talysson.com
  25. But you can document the model as much as possible

    and feed it to a LLM talysson.com
  26. The documentation does not contain the totality of the model

    But it can be good enough! talysson.com
  27. Documenting the domain model - Sub-domains and bounded contexts -

    Scope and responsibilities - Ubiquitous language glossary - Context map - Specifications, use cases and user stories of your system - Tactical patterns talysson.com - Aggregates, entities, value objects, domain services, … - Architecture Decision Record (ADR)
  28. Written (or at least guided) by a human - Your

    documents should use the ubiquitous language - Actively guide it not to let LLMism sneak into it - Otherwise your docs will eventually look like this: - - "This check is load-bearing in the process" - "And it answers the question plus expose one more wrinkle" - "And the trap is zero-dollar invoices" Said no human domain expert ever talysson.com
  29. Fill the gaps where an LLM could hallucinate - Don't

    leave important concepts implicit - When images are needed, add a description as well - Explicitly state possible misunderstandings - E.g.: "<concept> is not the same as <another concept>" - Zero documentation is better than misleading/outdated documentation - But zero documentation means the LLM gets more… creative - Treat hallucinations as a sign of a gap in your docs talysson.com
  30. Checking the ubiquitous language with LLMs 1. Synonyms - 2.

    Homonyms - 3. "Find one word that is used for more than one concept" Glossary drift - 4. "Find two or more words used for the same concept" "Find terms in code that aren't in the glossary, and vice-versa" Name vs behavior - talysson.com "The glossary says XYZ, does the code agree?"
  31. Use tools to make it even more LLM-friendly - Use

    team workspaces in LLM chat tools - Connect the LLM to MCP servers of your platforms - - Version control system (GitHub, Gitlab, …) - Wiki (Confluence, Notion, …) - Project management (Jira, Linear, …) Use well-known LLM-friendly formats talysson.com - AGENTS.md / CLAUDE.md - Mermaid diagrams - Skills for well-defined patterns
  32. LLMs as domain experts - LLMs can't be fully trusted,

    they can hallucinate - Arguably, humans can make mistakes too - The difference being that humans: - Can actually think - Have long-term memory - Can be held accountable - Domain experts provide expertise and collaboratively explore the model - LLMs can be used to the former, but should not make decisions on the latter talysson.com
  33. It's ok to let LLMs write the code But the

    model belongs to humans talysson.com