← All of Xingyan

Research

Long-form write-ups: papers, case studies, and notes from the workbench.

  1. Noteontologyversioningaudit

    The ontology now has a rollback-able history: events, snapshots and an integrity self-check

    The ontology (entity and relationship declarations) on the Wire platform previously had only a single 'current state': mistakes left no trace, the ontology could not be exported, and nothing could be rolled back. This release adds a semantic versioning layer — every change appends one immutable event carrying the full before/after state; version snapshots can be taken on a schedule or on demand, each with a content digest; any two versions can be compared field by field; the ontology exports to JSON/YAML in one click; rollback to any version keeps history append-only; and an integrity self-check ('folded events vs current state') catches direct database writes that bypass the service layer. A live eight-step drill passed end to end: publish, modify, count, compare, export, roll back, re-publish with an identical digest, self-check consistent.

  2. Paperresearchevaluationcontract-drafting

    law-bench: Making Contract-Drafting Quality Measurable, Iterable and Regression-Testable

    An evaluation loop for Chinese contract drafting: all-pass binary aggregation instead of weighted scoring, with multi-judge per-criterion verdicts driving clause-level self-healing. 39 of 43 contract types reach all-criteria pass (18/19 typical, 21/24 atypical). We also report a negative result honestly — a human blind-labelling pilot measured only 36.5% human-judge agreement (κ=0.075), with judges systematically stricter than humans, so that pass rate is an internal scale, not a human-validated accuracy.

  3. Case studyfine-tuningevaluationdeployment

    LoRA Fine-Tuning for Legal Work: From "Plausible" to "Aligned" — Method and Deployment Engineering

    A legal-domain fine-tuning case study on a 27B-class open-source base with two LoRA adapters (drafting and judge): drafting chrF moved from a mean of 19.5 to 51.0, median 42.9 (55-item validation set); the judge adapter is reported qualitatively only, with its full evaluation and training-data audit to follow in a separate publication; 4-bit quantization cut measured VRAM from about 54 GB to 18.5 GB with no observed quality drop, lowering the compute threshold for private deployment.

  4. Noteretrievalevaluation

    Building Our Own Retrieval Evaluation: A Comparable Baseline, and the Two Real Defects It Caught

    Rather than adopting a public legal benchmark — which measures contract-generation quality, a task not isomorphic to retrieval — we built our own retrieval evaluation layer: a dataset contract, a pure-function scorer with zero LLM involvement in scoring, and dual fingerprints, all reported as MRR@10. On the government domain (12 strongly annotated queries) it caught and fixed two real defects — fusion ranking contamination (MRR@10 0.70 → 1.00) and an exact-match priority issue in lookups by identifier (2/4 → 4/4). The perfect scores on the papers domain (14/14) and scripts domain (15/15) are pipeline health indicators under a small corpus, not evidence of superior quality, and cannot be compared across domains.