Menu
Martin Fowler·November 12, 2026

Leveraging LLMs for Domain-Specific Glossary Generation in System Design

This article explores how Large Language Models (LLMs) can be used to generate and maintain domain-specific glossaries for large organizations. It highlights the importance of such glossaries in improving LLM effectiveness within specialized contexts and discusses architectural considerations like bounded contexts, version control, and efficient retrieval for system integration.

Read original on Martin Fowler

The article proposes a practical application of LLMs in large organizational contexts: generating and managing domain-specific glossaries. In complex systems, specialized vocabulary often leads to misinterpretations by general-purpose LLMs. A well-curated glossary can significantly enhance an LLM's ability to understand and operate effectively within a given domain.

Architectural Workflow for Glossary Generation

The process involves using an LLM to scan organizational material (documents, emails, chat logs, transcripts) to identify specialized terms and their definitions. This generated glossary then needs human expert review for accuracy and refinement. The finalized glossary must be stored and made accessible to other LLMs, minimizing token consumption for efficient lookups.

  1. Source Material Collection: Gather diverse textual data from the organization.
  2. LLM-based Term Identification: An LLM identifies single words and multi-word phrases, noting new terms and familiar terms used in unfamiliar ways.
  3. Definition Generation: The LLM creates concise definitions, handling multiple meanings within different contexts.
  4. Human Expert Review: Domain experts validate and refine the LLM-generated definitions.
  5. Storage & Retrieval: Store the glossary in an accessible format for other LLMs, potentially with optimized indexing for large glossaries.
  6. Version Control & Refresh: Implement version control for tracking changes and schedule regular reviews and refreshes.

Bounded Contexts and Glossary Management

A crucial architectural consideration, highlighted by Domain-Driven Design, is the concept of Bounded Contexts. Large organizations often have subtly different definitions for terms across various departments or subsystems. Attempting to create a single, monolithic glossary is often counterproductive. Instead, designing separate glossaries for distinct bounded contexts (e.g., source code, customer-facing UI, internal operations) allows LLMs to consult the most relevant terminology set. This reflects a distributed approach to knowledge management.

💡

Optimizing Large Glossaries for LLMs

For very large glossaries, consider only providing terms and links to definitions in the initial LLM context. The LLM can then dynamically retrieve full definitions only for the terms it specifically needs, saving token usage and improving efficiency.

The generated glossaries can inform Agentic Engineering practices, ensuring consistency in generated code and documentation by aligning naming conventions with enterprise vocabulary. They also help identify deprecated terms or terms that should not be used in specific contexts (e.g., internal jargon vs. customer-facing language), further reinforcing architectural boundaries.

LLMGlossaryDomain-Driven DesignBounded ContextAgentic EngineeringKnowledge ManagementData Governance

Comments

Loading comments...