Layered Practice for Foundation Models and Domain Models

    A practical guide to separating reusable foundation models from domain-specific models so enterprises do not treat general chat ability as production business capability. It covers when a domain layer is needed, what the foundation layer should provide, three adaptation paths, data and evaluation design, multimodal boundaries, release and rollback, and team ownership.

    When enterprises adopt large language models, a common mistake is to treat general conversational ability as business-system capability. General models are strong at language understanding, knowledge organization, and transfer across tasks. Industry scenarios also require consistent terminology, auditable processes, clear data boundaries, and stable integration with existing systems. A more reliable approach is to split model capability into two layers: a reusable foundation model at the bottom, and a domain model on top that is further trained or adapted under control for a specific business. The foundation layer handles general representation and reasoning. The domain layer handles domain distribution, task format, and risk constraints.

    Why Split the Layers

    If every requirement is forced into one full training run, data volume, compute, and iteration cycles grow quickly. A change in any business rule can also affect other scenarios. After the split, the foundation layer stays relatively stable, and the domain layer is updated in small steps by scenario. Cross-task general ability is preserved, while compliance, evaluation, and rollback can proceed independently by business line.

    Three questions help decide whether a separate domain layer is needed:

    • Does the task depend heavily on internal corpora and proprietary workflows?
    • Would incorrect output directly affect money, safety, or commitments to customers?
    • Does the task need tight coupling with retrieval, a rules engine, ticketing, or an approval system?

    If any one of these is clearly true, generic prompting alone is not enough.

    What the Foundation Layer Should Provide

    The foundation layer is not meant to cover every script used by one department. Its goal is stable, transferable general ability. That usually includes long-context understanding and summarization, instruction following, structured extraction, multi-turn clarification, basic code and table reasoning, and multimodal understanding within a controlled scope. Multimodal support does not mean the model must match a dedicated vision system on every pixel-level task. It means the model can align key information from images, document layouts, or speech transcripts with the same text-reasoning and tool-calling flow.

    Foundation-layer data should emphasize coverage, deduplication, copyright, and safety filtering, not a pile of samples from a single industry. Over-mixing one vertical domain shifts general ability and makes it harder to correct when the model later serves other businesses. Training and alignment should keep traceable data batches, filtering rules, and evaluation sets, so capability changes can be explained as coming from data, algorithms, or inference configuration.

    How to Continue Training the Domain Layer

    A domain model should be built on a foundation model, not restarted from random initialization. Continued training should move the output distribution closer to the business without discarding general ability. Three common paths can be chosen from lower to higher risk.

    1. Retrieval augmentation and tool constraints. Put policies, product documentation, ticket records, and live state into a searchable knowledge base or business interface. The model only understands the question, selects evidence, and generates the answer. This fits cases where knowledge changes quickly and the model must not memorize sensitive details.
    2. Instruction and preference fine-tuning. Use question-answer, classification, extraction, and refusal samples rewritten from real tickets to standardize output format, citation style, and clarification when the model is uncertain. The data volume is usually far smaller than pretraining, but it must cover normal, boundary, and malicious inputs.
    3. Domain continued pretraining. Consider this only when terminology, document structure, and reasoning chains differ greatly from general corpora, and retrieval still cannot fill the gap. Use de-identified, deduplicated, and properly licensed corpora, with a small learning rate and a short training schedule. Immediately compare general benchmarks and business benchmarks after training to prevent catastrophic forgetting.

    The flow below is illustrative pseudocode and is not tied to any platform:

    1. base = load_foundation_model()
    2. corpus = filter_and_dedup(domain_docs)
    3. train_set, eval_set = split(build_instructions(corpus))
    4. candidate = continue_train(base, train_set, lr_small=True)
    5. report = evaluate(candidate, general_suite, domain_suite, safety_suite)
    6. promote(candidate) if report.pass_gates() else reject(candidate)

    How to Design Data and Evaluation

    The value of domain data is not “more,” but “errors that can be defined.” Each sample should include the input, the expected behavior, the evidence source, and what is forbidden. Extraction tasks need field-level labels. Question-answering tasks should distinguish “refuse when evidence is insufficient” from “a step-by-step suggestion is allowed.” Personal information and trade secrets should be de-identified or isolated before they enter storage. Training, retrieval, and logs should use different access permissions.

    Evaluation should be split into at least four groups:

    • General-ability regression, to catch clear drops in common sense and instruction following after continued training.
    • Domain accuracy, covering high-frequency and long-tail cases.
    • Safety and compliance, including unauthorized requests, prompt injection, and echo of sensitive information.
    • System metrics, including latency, timeouts, citation completeness, and human takeover rate.

    Pass thresholds should be written as release gates in advance, not adjusted by feel after launch.

    Boundaries for Multimodal Input

    Documents, screenshots, scans, and speech are common in industry systems, but multimodal input amplifies two risks: layout-recognition errors treated as facts, and hidden instructions in images that interfere with the main task. In practice, perception and decision should be separated. The perception module outputs structured intermediate results, such as fields, coordinates, confidence, and source snippets. The decision module consumes only those intermediate results and requires human review when confidence is low. Do not let the model complete a payment, an approval, or a configuration change from a screenshot alone.

    If the business only needs to understand scanned contracts or tables, prioritize layout recovery, field alignment, and citation links back to the source, rather than open-ended visual chat. Multimodal ability should be a general interface on the foundation layer. The domain layer defines which fields must appear and which content must not be output.

    Release, Monitoring, and Rollback

    Releasing a domain model should be treated as a software release, not a demo. Use shadow traffic or a small traffic comparison to measure differences between old and new versions in refusal rate, human edit rate, and business conversion. Logs should record only the necessary request identifier, model version, retrieved-document IDs, and decision outcome. Do not keep full sensitive source text for long in a place that training can later recover.

    If hallucinations cluster, a class of documents fails to parse, or a safety policy is bypassed, the system should be able to roll back to the previous stable model version, and roll back the prompt template, retrieval index, and tool permissions at the same time. These three often change together. Rolling back weights alone does not restore the original behavior.

    Monitoring should watch for input-distribution drift. New terminology, new forms, and new channel phrasing can invalidate old evaluation sets. Regularly sample failure cases from de-identified production data, add them to the evaluation set, and then decide whether to update retrieval, add instruction data, or run another small continued-training pass.

    How Teams Should Work Together

    The platform team maintains data governance, training gates, and general evaluation for the foundation layer. Business teams own scenario definitions, labeling criteria, and acceptance standards. The interface between them is the task description, the data contract, and failure types—not a verbal request to “make the model smarter.” When several departments share the same foundation model, domain adaptation should be isolated so one department’s preference data does not contaminate another department’s output style.

    Summary

    Stabilize a small number of foundation models, then apply domain continued training or retrieval constraints by scenario. That is the main path for controlling cost and risk. The foundation layer is responsible for general understanding, multimodal alignment, and the safety baseline. The domain layer is responsible for domain distribution, format, evidence, and business process. With a clear data contract, grouped evaluation, and a rollback-capable release, teams can turn large models from demo ability into an operable system capability.