Post-Training Domain LLMs: Implementation Paths for Finance and 3D Modeling

    Domain-specific post-training turns a general-purpose LLM into a reliable professional tool. This article walks through how post-training applies to finance (cross-document verification, financial modeling, traceable research) and 3D modeling (spatial reasoning, programmatic generation), covering verifiable rewards, hallucination metrics and mitigation, data and training loops, evaluation frameworks, and practical rollout advice with code examples.

    1. Why Post-Training Matters for Professional Scenarios

    General-purpose LLMs already perform well on everyday Q&A, writing, and common-sense reasoning, but professional scenarios demand much stricter outputs. Financial analysis requires precise terminology, verifiable numbers, and conclusions traceable to source materials. 3D modeling requires accurate spatial relationships, consistent units, and generated structures that professional software can correctly import. Prompt engineering alone is rarely enough to meet these requirements.

    Pre-training gives a model its foundation of language and knowledge; post-training adapts that foundation to specific tasks. Common post-training methods include supervised fine-tuning, preference optimization, and reinforcement learning with verifiable rewards. The shared principle: the base architecture stays unchanged, while domain task data and feedback signals reshape the model’s behavior.

    For engineering teams, the key question is not “whether to do post-training” but three others: which tasks are worth optimizing specifically, how to define verifiable success criteria, and how to improve domain capability without degrading general capability.

    2. Three Core Task Types in Finance

    2.1 Cross-Document Verification

    In financial work, the same metric is often scattered across annual reports, quarterly announcements, prospectuses, and internal ledgers. The most common problems in manual reconciliation are inconsistent definitions, mixed units, and mismatched periods. The model must read multiple documents simultaneously, identify different expressions of the same concept, and judge whether they are consistent.

    A practical implementation splits the task into three steps: first, extract candidate fields from each document, including metric names, values, units, periods, and source locations; second, normalize to a unified standard—for example, converting “ten thousand yuan” to a base unit and distinguishing year-over-year from month-over-month figures; third, output a discrepancy list where each entry cites the exact locations in both source documents.

    2.2 Financial Modeling

    The core of a financial model is its internal consistency. A balance sheet must satisfy assets = liabilities + equity, and net income on the income statement must reconcile with the related items on the cash flow statement. During post-training, these identities and reconciliation rules can serve as verifiable checks, so the model automatically validates results after generating a model or changing assumptions.

    Here is a sample function that validates the balance sheet identity:

    1. def check_balance_sheet(assets: float, liabilities: float,
    2. equity: float, tol: float = 1e-6):
    3. """Validate the balance sheet identity: assets = liabilities + equity.
    4. Returns whether the sheet balances, plus the difference for debugging.
    5. """
    6. diff = assets - (liabilities + equity)
    7. return abs(diff) <= tol, diff
    8. balanced, diff = check_balance_sheet(
    9. assets=1_000_000.0,
    10. liabilities=600_000.0,
    11. equity=400_000.0,
    12. )
    13. print(balanced, diff) # True 0.0

    The check itself is trivial, but it can form part of a reward signal. Every financial model the model generates goes through the same validation: passing samples receive positive feedback, failing samples enter an error analysis queue.

    2.3 Traceable Research

    The value of research output depends on credibility. Every key conclusion should trace back to its source: which document, which page, which paragraph. This requires the model to generate citations alongside conclusions, and those citations must be programmatically verifiable.

    The following example shows how to check whether a model’s citations actually exist in the source text:

    1. def verify_claims(claims: list[dict], sources: dict[str, str]) -> list[dict]:
    2. """Check whether each claim's quote can be found in its source text.
    3. Each item in claims contains text (the claim), source_id, and quote
    4. (the cited passage). sources maps source IDs to full document text.
    5. """
    6. report = []
    7. for claim in claims:
    8. source_text = sources.get(claim["source_id"], "")
    9. supported = claim["quote"] in source_text
    10. report.append({
    11. "claim": claim["text"],
    12. "source_id": claim["source_id"],
    13. "supported": supported,
    14. })
    15. return report

    Exact string matching is too strict; production systems typically add whitespace normalization, full-width/half-width character conversion, and fuzzy matching. The core logic stays the same: conclusions must be traceable to the original text.

    3. Engineering Approaches to Hallucination Control

    Hallucination refers to model statements that contradict source materials or objective facts. In finance and engineering, hallucinations are costly because they translate directly into bad investment decisions, incorrect reports, or wrong design parameters.

    3.1 Defining Metrics

    Hallucination rates must be clearly defined before they can be compared. Common metrics include:

    • Factual consistency rate: the proportion of sampled statements that agree with the source.
    • Citation coverage rate: the proportion of key conclusions backed by valid citations.
    • Unsupported assertion rate: the proportion of confident statements with no supporting source.

    Each metric should be computed on a fixed internal evaluation set, with the dataset version, sampling method, and judging criteria documented. Results from different evaluation sets are not directly comparable.

    3.2 Common Techniques

    Retrieval-augmented generation (RAG) constrains answers to specified materials, reducing reliance on the model’s memory. Requiring citations makes errors easier to detect. Refusal mechanisms let the model admit it doesn’t know when evidence is insufficient, rather than fabricating an answer. Structured output combined with programmatic validation can intercept format errors and out-of-range values. Self-consistency checks have the model answer the same question multiple times, routing high-divergence cases to human review.

    These techniques are typically combined—no single method covers all error types.

    4. 3D Modeling: Spatial Understanding and Programmatic Generation

    4.1 Inferring Spatial Relationships from Descriptions and Reference Images

    3D modeling inputs usually consist of text requirements plus reference images. The model must infer relative proportions, positional relationships, and orientations, then translate them into executable modeling steps. For example, given “the tabletop is twice as long as it is wide, and the legs sit at the four corners a fixed distance from the edges,” the model must convert both the proportional and positional relationships into concrete dimensions.

    Training data for this capability can come from model libraries with annotated dimensions, engineering drawings, and manually annotated scene descriptions. The data must cover common units and coordinate conventions, or the model will easily make unit-conversion errors.

    4.2 Engineering Essentials for Programmatic Modeling

    Model-generated scripts typically call the scripting interfaces of 3D modeling software. Key engineering considerations:

    1. Unit consistency: declare units at the top of the script and convert all inputs to a unified standard.
    2. Coordinate system conventions: specify the origin, axis directions, and the up direction.
    3. Geometry validity checks: detect negative dimensions, self-intersections, or empty volumes.
    4. Sandboxed execution: run scripts in an isolated environment with restricted file system and network access.

    The following example validates dimension specifications, intercepting obvious errors before execution:

    1. def validate_dimensions(spec: dict, min_mm: float = 0.1,
    2. max_mm: float = 100_000.0) -> list[str]:
    3. """Validate whether dimensions in a modeling spec are reasonable;
    4. returns a list of error messages."""
    5. errors = []
    6. for part in spec.get("parts", []):
    7. name = part.get("name", "unnamed part")
    8. for axis, value in zip("xyz", part.get("size_mm", [])):
    9. if not (min_mm <= value <= max_mm):
    10. errors.append(f"{name} {axis}-axis dimension {value} mm is out of range")
    11. return errors
    12. spec = {"parts": [{"name": "tabletop", "size_mm": [1200, 600, 30]},
    13. {"name": "table leg", "size_mm": [40, 40, -700]}]}
    14. print(validate_dimensions(spec))
    15. # ['table leg z-axis dimension -700 mm is out of range']

    This kind of validation makes physical constraints explicit. Even if the model’s output is syntactically correct, it must pass semantic checks before moving to the next step.

    5. Data and the Training Loop

    5.1 Task Coverage

    Improving domain capability depends on task coverage. A finance-focused model needs to cover earnings report interpretation, valuation assumption checks, compliance text review, data cleaning, and more. With insufficient coverage, a model may perform well on trained tasks but fail when the phrasing changes.

    Task design should be layered by domain and difficulty, with every task type having a clear input format, output format, and judging method.

    5.2 Reward Design

    Reward signals fall into two categories. The first is verifiable rewards—comparing computed results against ground truth, passing reconciliation checks, or finding citations in the source text. These rewards are objective and stable, making them suitable for large-scale training. The second is human preference scoring, which evaluates clarity of expression and soundness of recommendations. These scores are expensive to collect, so they’re best used to calibrate dimensions that verifiable rewards can’t cover.

    The two need to be balanced. Optimizing only verifiable rewards can make the model rigid; optimizing only human preferences can teach it to please rather than to be accurate.

    5.3 Preventing Capability Regression

    A common problem with specialization training is declining general capability. Common mitigations include mixing a certain proportion of general-purpose samples into the training data, using a smaller learning rate, and maintaining a separate general-capability evaluation set with regression testing after each training round.

    5.4 The Training Loop

    Post-training should be a continuous cycle: collect online failure samples, annotate and categorize errors, supplement training data, retrain, then run regression tests. Each round of improvement should be backed by evaluation numbers, with data versions recorded for traceability.

    6. Evaluation Framework

    Evaluation should be layered:

    • General capability regression: confirm that baseline Q&A, writing, and reasoning abilities haven’t noticeably declined.
    • Domain task accuracy: compute correctness on internal evaluation sets for each professional task type.
    • Hallucination-related metrics: factual consistency rate, citation coverage rate, and unsupported assertion rate.
    • Cost and latency: compute cost per call, response time, and human review effort.

    Evaluation sets should cover edge cases such as missing data, mixed units, conflicting clauses, and ambiguous requirements. Averages alone can hide sharp failure modes. Also watch for evaluation set contamination: if training data includes evaluation questions, scores will be inflated. Evaluation sets should be strictly isolated from training data and refreshed regularly.

    7. Rollout Recommendations

    First, prioritize high-value, verifiable tasks. Verification, reconciliation checks, and computation tasks are easiest to define rewards for, making them ideal starting points. Open-ended strategic analysis requires more human evaluation and can come later.

    Second, keep human review at critical checkpoints. Review should focus on what the model flags as low-confidence and what fails validation—not line-by-line review of every output. This concentrates human effort where judgment matters most.

    Third, control data permissions. Financial data and design drawings often involve sensitive information. Apply the principle of least privilege, separate training and inference environments, and avoid logging sensitive fields in plaintext.

    Fourth, estimate investment against actual returns. Costs should include training compute, data annotation, evaluation maintenance, and human review hours; returns should include reduced losses from fewer errors and improved processing efficiency. Both sides should be measured with real data, not guesswork.

    A launch readiness checklist:

    • Does the task have verifiable success criteria?
    • Is there an independent internal evaluation set?
    • Are there regression tests for general capability?
    • Do key outputs have citations and programmatic validation?
    • Is sensitive data anonymized and access-restricted?
    • Are human review trigger conditions clearly defined?