Phase 4 Investigation
Investigation · draft for the authors

Phase 4 Investigation

EXPERTA

Initial investigation of Phase 4 of EXPERTA: other design families through DoE.base and DoE.wrapper. Feasibility in WebR, the guarantees of each family, the literature and the flow of the app.

Subject
Phase 4 of the specification (Section 1.9): other design families through DoE.base and DoE.wrapper
Status
Initial investigation, 2026-10-19. This is not a plan. It changes no code of the app and no text of the specification.
Request
Fadel M. Megahed, 2026-10-19: study the feasibility, the ways to keep each guarantee correct, the literature and the flow of the app.
Specification
replication_materials/plans/2026-10-14-ff-design-translator-design.md, version 7
Measurements
replication_materials/plans/phase4-probes/ (scripts, outputs and a README)
Research notes
replication_materials/plans/phase4-research/ (package facts, the theory of the claims, the literature)
Maintained by
Alan R. Vazquez (Tecnológico de Monterrey) and Fadel M. Megahed (Miami University)

1Summary

Phase 4 is feasible in the browser. The main risk is not the computation. The main risk is the words of the claims: several claims that look natural are false for the designs that the packages return.

  1. All five families run in WebR. WebR 0.6.0 ran each family with the runtime of the app plus seven package files (4,468,703 bytes). For 17 of 18 test designs, WebR and native R 4.6.1 gave the same design with the same seed. The design that differs also differs between two native R sessions (item 4).
  2. The computation is fast. In WebR in Node, the seven packages unpacked in 1.3 s, DoE.wrapper loaded in 0.7 s, and 13 designs took 0.9 s in total. The start in Chromium is not measured yet (Section 7.9 of the specification).
  3. The seed rules must change. ccd.design needs two seeds. lhs.design and Dopt.design need a seed also without randomization, because the search itself is random. lhs designs repeat only with the same lhs version.
  4. Two space-filling types must stay out. Through lhs.design, the DiceDesign types dmax and strauss ignore the seed: they take the clock time as the seed. Their designs are also not Latin hypercubes.
  5. No family gets the word "optimal" from the name of its algorithm. Each claim is a computed property, a provenance statement, a proven bound or a match to a reviewed table (Section 4.1).
  6. Some natural claims are false, as measured:
    • The default central composite design is not rotatable: its axial distance is set for orthogonal blocks.
    • Box-Behnken designs are rotatable only for 4 and 7 factors.
    • A Box-Behnken design needs at least one center run.
    • The lhs type "maximin" gave a smaller minimum distance than the type "optimum".
    • With the default 5 random starts, the D-optimal search missed the best design found for 13 of 30 seeds.
    • The bound Dea of AlgDesign is loose, and it is relative to the candidate set only.
    • oa.design can return a full factorial, or a design with unoptimized columns, with only a warning.
  7. Independent checks are possible for each family, and four were measured:
    • The generalized word length pattern (GWLP) computed in two ways: 4 designs agree.
    • The axial distance of a central composite design against the closed-form formulas: 8 designs agree.
    • The Box-Behnken designs against the published construction: 5 designs agree.
    • The D criterion recomputed by the app: equal to the AlgDesign value.
  8. Routing has no published benchmark. No study tests whether an LLM can route a described problem to a design family. The literature on two-level designs shows plausible but silently wrong LLM output. Design-selection aids agree on the inputs. A draft decision table is in Section 6.
  9. Some text of the specification needs a correction (Section 9). Example: the families do not share most argument names.
  10. Two plans share one name. Section 18 calls the evaluation, documents and video "Milestone 4". Section 1.5 calls the design families "Phase 4". The two are different work (Section 2.3).

2Scope, method and names

2.1 Questions

  1. Can each family run in the browser with the same exactness as Phase 1?
  2. For each family, what can the app compute, check and claim, so that each claim is provably correct?
  3. What does the literature say about the choice of a design family, by people, by software and by LLMs?
  4. How does the flow of the app change?

2.2 Method

  • Package facts. A subagent read the CRAN reference manuals, NEWS files and check pages of the seven packages and of RcmdrPlugin.DoE (phase4-research/packages.md).
  • Theory of the claims. A second subagent, on the most capable model, read the help pages, papers and source code. It also derived the conditions that the app can check (phase4-research/guarantees.md). The derived statements need a review by Alan R. Vazquez (Section 10.2).
  • Literature. A third subagent searched for literature on LLMs and design of experiments, design-selection aids, sequential experimentation and computer experiments. It checked each DOI against Crossref (phase4-research/literature.md).
  • Measurements. The controlling session ran each family in native R 4.6.1 and in WebR 0.6.0 (R 4.6.0) in Node, with the runtime of the app (phase4-probes/). The seven new package files came from repo.r-wasm.org with the approval of the author. They are not in git.

Not done in this investigation:

  • The start in Chromium with the new packages.
  • Qualitative factors in Dopt.design.
  • The completeness flag of the column searches of oa.design.
  • A review of the derived statements.

2.3 A note on names

  • Section 18 (Phase 1 implementation sequence) names four milestones. Milestone 4 is "Evaluation, documentation and video". Section 17.1 uses "Milestone 4" in this sense.
  • Section 1.5 names Phase 4 "Other design families". This investigation is about Phase 4.
  • Proposal: keep "Phase 4" for the design families, and name its build steps 4A, 4B and so on, as Milestone 3 used 3A to 3C. Keep "Milestone 4" for the evaluation of Phase 1. The authors decide (Section 10.1).

3Feasibility (measured)

3.1 Packages and size

The WebR index for R 4.6 lists the seven packages that Section 1.9 names, with the same versions. The dependencies of DoE.base (vcd, partitions, numbers, combinat, MASS, lattice, conf.design) are already in the runtime of the app.

Package Version Bytes Compiled code
DoE.wrapper 0.13 150,672 no
rsm 2.10.6 840,268 no
estimability 2.0.0 324,245 no
lhs 1.3.0 291,211 C++ (Rcpp)
DiceDesign 1.10 260,294 C
AlgDesign 1.2.1.2 514,185 yes
Rcpp 1.1.2 2,087,828 yes
Total 4,468,703

No function of a planned family needs Tcl/Tk, a system call or parallel code. Only RcmdrPlugin.DoE needs Tcl/Tk.

3.2 The same design in WebR and in native R

Each design was made with the same call and the same seed in native R 4.6.1 and in WebR 0.6.0. "Identical" compares the full numeric design matrix (desnum), rounded to 12 significant digits.

Family Designs tested Identical in WebR and native R Same design in a new native session
General full factorial (fac.design) 3 levels × 2 × 4; 3 × 3 without randomization 2 of 2 yes
Orthogonal array (oa.design) levels (3, 3, 3, 2, 2); six 3-level factors in 18 runs; (2, 2, 3, 3, 3, 3, 6) 3 of 3 yes
Central composite (ccd.design) 3 factors orthogonal; 5 factors rotatable; 4 factors face-centered 3 of 3 yes
Box-Behnken (bbd.design) 4 and 7 factors 2 of 2 yes
Latin hypercube (lhs.design, lhs types) optimum, maximin, genetic, random 4 of 4 yes
Space-filling (lhs.design, DiceDesign type) dmax 0 of 1 no
D-optimal (Dopt.design) quadratic in 4 factors, 5 and 50 starts; with a constraint 3 of 3 yes

The type dmax gave a different design in each new native session too (phase4-probes/dice-types.txt), and so did strauss. The cause is in the code: lhs.design calls set.seed(seed) but does not pass seed to DiceDesign::dmaxDesign or straussDesign. Without a seed, these functions take as.numeric(Sys.time()) as the seed (phase4-probes/dice-seed.R). The differential tests of Section 11 would fail for these types, as they must.

3.3 Time

Step Native R 4.6.1 WebR 0.6.0 in Node
Start of WebR and install of the Phase 1 runtime — 5.3 s
Unpack of the seven new packages — 1.3 s
loadNamespace("DoE.wrapper") — 0.7 s
One design 0.00 to 0.36 s 0.005 to 0.18 s
All 13 new-family designs — 0.9 s

These are Node times on one fast desktop computer. Section 7.9 requires a measurement of the start in Chromium, with the slow profile, before a release. The app should load the packages of a family only when the user confirms that family (Section 1.9), so the start of a two-level design does not change.

3.4 Facts that change the R templates

Argument names differ. Section 1.9 says that the functions share most argument names. The usage lines show this:

Argument fac.design oa.design ccd.design bbd.design lhs.design Dopt.design
factor.names yes yes yes yes yes yes
default.levels no no yes yes yes no
ncenter no no yes (1 or 2 values) yes no no
blocks yes no yes no (block.name turns blocks on, 4 or 5 factors only) no yes
seed 1 value 1 value 2 values 1 value 1 value 1 value
randomize default TRUE TRUE TRUE TRUE FALSE TRUE

Seeds. Section 7.3 says that without randomization the design uses the standard order and the R code has no seed. This rule holds for fac.design, oa.design, ccd.design and bbd.design. It does not hold for lhs.design and Dopt.design: their algorithm draws random numbers, so the R code always needs the seed. ccd.design refuses one seed: "ccd.design needs a seed of length 2" (measured). The rule for the second seed is open (Section 10.1).

Versions. The lhs.design help says that a design repeats "within a package version" only. The project must record the lhs version. The import rule of Section 8.5 already keeps the stored run sheet when a new run differs.

desnum is not one thing.

  • For ccd.design and bbd.design, desnum is the coded design.
  • For lhs.design, desnum is the design in the unit cube.
  • For Dopt.design, desnum is the model matrix, with columns (Intercept), A, ..., A:B.

The report helper must read the design columns of each family in its own way. Also, ffd_cube_matrix of Phase 1 cannot isolate the cube of a central composite design: the app needs a new extractor.

design.info stores few properties.

  • ccd.design stores no axial distance.
  • No family stores the GWLP.
  • Dopt.design stores D, Dea, A and G in optimality.criteria.

The app must compute each property that it shows.

oa.design can return something else.

  • If no array fits, it returns a full factorial (type = "full factorial").
  • A column search such as columns = "min3" can stop with the warning "resources were not sufficient for optimizing column selection". It then returns the unoptimized allocation (measured: same GWLP as the default).

Random starts. With the default nRepeats = 5, 13 of 30 seeds gave a D-optimal design below the best D found (at most 1.44% lower). With 50 starts, all 30 seeds gave the best D. Time per design in native R: 0.003 s with 5 starts, 0.011 s with 50 starts (20 runs, quadratic model in 4 factors, 81 candidates). This is one example, not a rule. The number of starts must come from a measurement in the browser.


4Guarantees: how each claim stays correct

4.1 Four kinds of claim

Kind Example What makes it provable Phase 1 counterpart
Computed property "Strength 2", "minimum distance 0.31" The app computes it from the design matrix. Two or three independent sources must agree, or the app refuses the design. WLP and resolution (Section 7.6)
Provenance "Made by lhs::optimumLHS 1.3.0 with the seed 20261019" The same call gives the same design in native R and in WebR (Section 11). Seed and versions (Sections 7.3 and 7.9)
Bound "D-efficiency at least 60%, relative to the best design on these candidate runs" A theorem. The app checks its premises. none
Reviewed reference "Box-Behnken design for 4 factors, as published by Box and Behnken (1960)" A match of the set of runs against a stored table that a person reviewed. Catalogue entry and the MA class (Section 7.7)

Rules for all families:

  1. The claim follows the returned design, not the request. The app reads design.info(d)$type and the design matrix.
  2. A warning is part of the result. A warning that changes the meaning of the design removes each claim that depends on it.
  3. Each family has its own post-checks. Phase 1 checks 3 and 4 (balance; coded values in {−1,0,+1}\{-1, 0, +1\}) are false for axial runs, Latin hypercubes and most D-optimal designs. Check 7 (each AjA_j is an integer) is false for non-regular arrays.
  4. A property that depends on a model names the model. Rank, D-efficiency and rotatability refer to a model, for example the full quadratic model.
  5. The words "optimal", "best" and "minimum aberration" need a bound or a reviewed reference. The name of an algorithm or of an option is not enough.

4.2 General full factorials and orthogonal arrays

Computed properties. NN runs, nn factors, factor ff with sfs_f levels.

  • Strength tt: for every set of tt factors, each combination of levels occurs equally often. This is exact counting.
  • GWLP (Xu and Wu, 2001). Code each factor with orthogonal contrasts of mean square 1. For a set SS of factors, XSX_S holds the products of one contrast column per factor in SS. Then
aj(S)=1N2∥𝟏N⊤XS∥2,Aj=∑|S|=jaj(S).a_j(S) = \frac{1}{N^2}\,\bigl\lVert \mathbf{1}_N^{\top} X_S \bigr\rVert^2, \qquad A_j = \sum_{|S| = j} a_j(S).
  • A form without contrasts (derived; for review):
∑j≥0Ajzj=1N2∑a=1N∑b=1N∏f=1n{1+(sf−1)z,xaf=xbf,1−z,xaf≠xbf.\sum_{j \ge 0} A_j\, z^j = \frac{1}{N^2} \sum_{a=1}^{N}\sum_{b=1}^{N} \prod_{f=1}^{n} \begin{cases} 1 + (s_f - 1)\,z, & x_{af} = x_{bf},\\ 1 - z, & x_{af} \ne x_{bf}. \end{cases}

For sf=2s_f = 2, this is the formula of Section 7.6. A consequence: N2AjN^2 A_j is an integer for every design, regular or not. Example (measured): the 36-run array for the levels (3, 3, 3, 2, 2) has A3=2.592593A_3 = 2.592593, and N2A3=3360N^2 A_3 = 3360. This integer check replaces Phase 1 check 7 for the new families.

  • Resolution R=min⁡{j≥1:Aj>0}R = \min\{j \ge 1 : A_j > 0\}, and generalized resolution GRGR and GRindGR_{\text{ind}} (Grömping and Xu, 2014). DoE.base::GR reports 5 for "at least 5".

Independent sources.

Property Source 1 (the app) Source 2 (R) Source 3
GWLP The form above, in exact integers DoE.base::GWLP A contrast form (DoE.base::lengths, or the app's own code)
Strength Counting A1=⋯=At=0A_1 = \cdots = A_t = 0 —
GRGR From the exact aR(S)a_R(S) DoE.base::GR J-characteristics, for two-level factors only

Measured: DoE.base::GWLP and an independent contrast implementation agree on 4 designs (phase4-probes/props.R).

Unsafe claims.

  • "Optimal", "best array", "minimum aberration", "generalized minimum aberration". DoE.base claims none of them. A GMA claim needs a complete enumeration of the arrays of that size.
  • "The columns minimize A3A_3" after the optimization warning, or with the default allocation.
  • "Regular" from the flag in the catalogue oacat. The help says that the flag partly relies on a conjecture.
  • "Orthogonal array" when the type is "full factorial".
  • Alias chains in the style of Phase 1 ("A = BC") for a non-regular array. Aliasing in these arrays is partial.

Proposed claim.

Orthogonal array {ID} from the DoE.base catalogue, {N} runs. Computed from the design table: strength {t}; generalized word length pattern {A3, A4, ...}; generalized resolution {GR, or "at least 5"}. The main effects are orthogonal to each other. If interactions are active, the main-effect estimates can be biased. No optimality claim is made.

4.3 Central composite designs

Computed properties. Coded factors x1,…,xkx_1, \ldots, x_k; a cube of FF runs; 2k2k axial runs at ±α\pm\alpha; nc0n_{c0} and ns0n_{s0} center runs in the cube and axial blocks; NN runs.

  • Axial distance α\alpha, read from the design matrix.
  • Rank of the full quadratic model, with p=(k+1)(k+2)/2p = (k+1)(k+2)/2 terms (plus block columns).
  • Rotatability. For a cube of resolution V or more, [iiii]=(F+2α4)/N[iiii] = (F + 2\alpha^4)/N and [iijj]=F/N[iijj] = F/N. The design is rotatable if and only if [iiii]=3[iijj][iiii] = 3\,[iijj], that is α=F1/4\alpha = F^{1/4}. Center runs do not change this.
  • Orthogonal blocks. For one cube block and one axial block:
α2=k(1+ns0/2k)1+nc0/F.\alpha^2 = \frac{k\,(1 + n_{s0}/2k)}{1 + n_{c0}/F}.

Measured.

  • The axial distance of ccd.design equals F1/4F^{1/4} for alpha = "rotatable", and the formula above for alpha = "orthogonal". This holds for 3 to 6 factors (8 designs; props3.R).
  • The default design for 3 factors has the moment ratio [iiii]/[iijj]=3.78[iiii]/[iijj] = 3.78, so it is not rotatable. The rotatable designs have the ratio 3.

Unsafe claims.

  • "Rotatable" for the default design.
  • "Orthogonally blocked" after a change of center runs: α\alpha was set for the original numbers.
  • "The design estimates the full quadratic model" from the resolution of the cube. The rank decides.
  • A singular case (derived): with no center runs and F=k2F = k^2 (2 factors; 4 factors with a full cube; 8 factors with a 64-run cube), the rotatable α\alpha equals k\sqrt{k}. All runs then lie on one sphere, and the quadratic model cannot be estimated. The rank check finds this.

The card must show the axial settings. For α>1\alpha > 1, the axial runs lie outside the ranges in the request. If the user said that a range is a hard limit, the design breaks it. Face-centered designs (α=1\alpha = 1) keep the ranges but are not rotatable.

Proposed claim.

Central composite design for {k} factors: {the Phase 1 statement for the cube}, {nc0} center runs in the cube block, {2k} axial runs at distance {alpha} (coded units), {ns0} center runs in the axial block, {N} runs. Computed from the design table: the full quadratic model can be estimated (rank {p} of {p}); rotatable: {yes or no}; blocks orthogonal to the model: {yes, no, or not blocked}. These axial settings lie outside the ranges you gave: {list}.

4.4 Box-Behnken designs

Computed properties.

  • Match to the published design. Each Box-Behnken design combines a block design on the factors with full 2m2^m factorials on the factors of each block. The other factors stay at 0. Measured: rsm gives the published support sets for 3 to 7 factors, including the partially balanced design for 6 factors ({1,2,4}, {2,3,5}, {3,4,6}, {1,4,5}, {2,5,6}, {1,3,6}) and the seven triples for 7 factors. Each support block is a full 2m2^m factorial in ±1\pm 1 (props3.R, props4.R).
  • Rank of the full quadratic model. Without a center run, the sum of the squared columns equals mm times the intercept in every run, so the model matrix is singular (derived; Box and Behnken, 1960, Section 5). The app must refuse ncenter = 0.
  • Rotatability. Measured ratios [iiii]/[iijj][iiii]/[iijj]: 2 (3 factors), 3 (4 factors), 4 (5 factors), 1.5 to 3 (6 factors), 3 (7 factors). Only the 4- and 7-factor designs are rotatable, as Box and Behnken (1960) report.

A documentation error in the package. The bbd.design help gives 14 non-center runs for 3 factors. The published design and the measured design have 12.

Proposed claim.

Box-Behnken design for {k} factors, as published by Box and Behnken (1960), with {n0} center run(s), {N} runs. Computed from the design table: it equals the published design; the full quadratic model can be estimated (rank {p} of {p}); rotatable: {yes for 4 and 7 factors, otherwise no}. No run has all factors at their extreme settings.

4.5 Latin hypercube designs

Computed properties on the unit-cube design xuj∈(0,1]x_{uj} \in (0, 1], u=1,…,nu = 1, \ldots, n:

  • Latin hypercube property: for each factor jj, {⌈nxuj⌉:u=1,…,n}={1,…,n}\{\lceil n\,x_{uj} \rceil : u = 1, \ldots, n\} = \{1, \ldots, n\}. Each of the nn equal intervals holds exactly one run. This is a property of each margin only.
  • Minimum distance dmin=min⁡u<v‖xu−xv‖2d_{\min} = \min_{u < v} \lVert x_u - x_v \rVert_2, and the centered L2L_2 discrepancy (Hickernell, 1998), with DiceDesign::mindist and discrepancyCriteria as second sources.

Measured (30 seeds, 20 runs, 4 factors; props2.R):

lhs type Latin hypercube property Median dmind_{\min} Range of dmind_{\min}
random 30 of 30 0.226 0.094 to 0.334
optimum 30 of 30 0.382 0.305 to 0.439
maximin 30 of 30 0.260 0.145 to 0.362
genetic 30 of 30 0.308 0.148 to 0.379
improved 30 of 30 0.244 0.157 to 0.370

The type "maximin" did not give the largest minimum distance. The name of a type is a search goal, not a property of the result. By default, maximinLHS optimizes on the integer grid and then draws random positions inside the strata.

Unsafe claims.

  • "Optimal", "maximin design", "S-optimal".
  • "Latin hypercube" for the DiceDesign types dmax, strauss, fact and faure, or after rounding, unless the check runs on the rounded values.
  • "Uniform in two or more dimensions" or "orthogonal".

Two technical rules.

  • DiceDesign rescales each column by its observed minimum and maximum if a value lies outside [0,1][0, 1]. The app must pass the unit-cube design.
  • lhs.design does not randomize the run order of the lhs types. For physical runs, the help advises randomization.

Proposed claim.

Latin hypercube design of {n} runs for {k} factors, made by lhs::{function} (version {v}) with the seed {seed}. The function is a random search; it does not guarantee the best value of any criterion. Computed from the design table: each factor has exactly one run in each of its {n} equal intervals; minimum distance between runs {dmin} (unit cube); centered L2 discrepancy {CD2}.

4.6 D-optimal designs

Computed properties. Model matrix XX (n×pn \times p) for the stated formula; candidate set 𝒳\mathcal{X}; M=X⊤X/nM = X^\top X / n; d(x)=f(x)⊤M−1f(x)d(x) = f(x)^\top M^{-1} f(x).

  • Rank of XX; it must be pp.
  • D criterion D=det⁡(M)1/pD = \det(M)^{1/p}. Measured: the app's own value, 0.465609, equals the AlgDesign value 0.466 (props.R).
  • G-efficiency Ge=p/max⁡x∈𝒳d(x)G_e = p / \max_{x \in \mathcal{X}} d(x), and AlgDesign's Dea=exp⁡(1−1/Ge)D_{ea} = \exp(1 - 1/G_e).

What the bounds mean (derived; for review). Let ξ*\xi^* be the best approximate design on the candidate set for the stated model. Then

EffD=(det⁡M(ξ)det⁡M(ξ*))1/p≥Ge≥exp⁡(1−1/Ge)=Dea.\text{Eff}_D = \left(\frac{\det M(\xi)}{\det M(\xi^*)}\right)^{1/p} \;\ge\; G_e \;\ge\; \exp(1 - 1/G_e) = D_{ea}.

Both bounds are relative to the candidate set and to the stated model. GeG_e is the sharper one. A bound from a near-optimal approximate design (Silvey, Titterington and Torsney, 1978) can be sharper still. In the example, Ge=0.604G_e = 0.604 and Dea=0.519D_{ea} = 0.519. Wheeler's vignette for AlgDesign shows a design with Dea=0.749D_{ea} = 0.749 that is about 97% efficient, so the bounds are loose.

How vendors word this. The JMP help calls a found design "only locally optimal". Design-Expert says that it builds an "approximately optimal design". Both give efficiency relative to an ideal orthogonal design. That reference holds only for two-level models in ±1\pm 1 coding (Hadamard's inequality). It does not hold for quadratic models or constrained regions.

Unsafe claims.

  • "D-optimal design", "optimal", "the best design".
  • "D-efficiency {Dea}". DeaD_{ea} is a lower bound, not the efficiency.
  • An efficiency without the model and the candidate set.

Proposed claim.

Design of {n} runs chosen from {Nc} candidate runs by the Federov exchange algorithm (AlgDesign {v}, {r} random starts, seed {seed}) for the model {formula}. The algorithm can stop at a local optimum; it does not guarantee the best design. Computed from the design table: all {p} model terms can be estimated; the D-efficiency, relative to the best possible design on these candidate runs for this model, is at least {100 Ge}%.

4.7 Derived statements for review

These statements come from derivations, not from a source that a person reviewed. Each needs a review by Alan R. Vazquez before the app uses it in a claim:

  1. The GWLP form without contrasts, and the integer property of N2AjN^2 A_j (Section 4.2).
  2. The rotatability and orthogonal-blocking conditions for central composite designs, and the singular case F=k2F = k^2 without center runs (Section 4.3).
  3. The singularity of a Box-Behnken design without center runs (Section 4.4).
  4. The bounds GeG_e and DeaD_{ea} on the D-efficiency, and the bound from an approximate design (Section 4.6).

5Literature

5.1 LLMs and the design of experiments

  • Vazquez, Rother and Charles-Gonzalez (2026) tested two LLMs on the construction of two-level fractional factorials: 36 tasks, 10 repeats each.
    • The models found optimal designs reliably for 8 runs, and up to about 8 factors for 16 and 32 runs.
    • Beyond that, the designs looked correct but had worse aberration, and the results varied over repeats of the same prompt.
    • This is the main evidence for Phase 1's rule that the LLM translates and does not design.
  • Ying, Vazquez and Xu (2026) found that the order of the parts of a prompt changes the quality of the designs. This supports the prompt-order arm of Section 12.3.
  • Other work uses LLMs to plan chemistry experiments or to guide Bayesian optimization (Boiko et al., 2023; Bran et al., 2024; Ranković, Griffiths and Schwaller, 2025). It measures task success, not the choice of a design family.
  • Gap. The search found no study that tests whether an LLM can route a described problem to a design family. The search used few queries, so this is not proven. The routing slice of Section 8 can fill this gap.

5.2 Design-selection aids

  • The NIST/SEMATECH e-Handbook (Section 5.3.3) chooses a design from the objective and the number of factors:
    • 2 to 4 factors with a response surface objective: a central composite or a Box-Behnken design.
    • 5 or more factors with a response surface objective: "screen first to reduce the number of factors".
    • Screening objective: full or fractional factorial designs, or Plackett-Burman designs.
  • The Minitab Assistant first asks for screening or modeling.
  • JMP offers central composite and Box-Behnken designs for up to 8 factors, and space-filling designs for deterministic systems.
  • Stat-Ease prefers Box-Behnken designs when the corners of the region cannot be run.
  • Early expert systems (Dexter, DXPERT) chose among tabulated designs with rules from consulting statisticians. These are known only from search summaries.

All aids use the same inputs: the objective, the number of factors, the type of each factor, the levels and the run budget. These are the inputs of the decision table in Section 1.9.

5.3 Sequential experimentation

Response surface work is sequential (Box and Wilson, 1951): a factorial design first, then axial runs and center runs for a quadratic model. A central composite design can be built by adding axial runs to a saved two-level design (DoE.wrapper::ccd.augment). The cube should have resolution V. With a cube of resolution III or IV, two-factor interactions stay aliased, and the rank check fails.

5.4 Computer experiments

A deterministic computer code gives the same output for the same inputs. Replication, randomization and blocking then lose their usual role, and space-filling designs replace them (Sacks et al., 1989; Santner, Williams and Notz, 2003). Latin hypercube sampling puts one point in each stratum of each input (McKay, Beckman and Conover, 1979). The routing boundary is the question "Does a run with the same settings give the same result?", not the word "simulation".

5.5 RcmdrPlugin.DoE as prior art for the flow

The menus of RcmdrPlugin.DoE ask, for every family, for a name, the number of factors and their levels or ranges, the number of runs, a seed and randomization. Each family then adds its own inputs:

  • Central composite: the cube, the center runs, the axial distance.
  • Box-Behnken: 3 to 7 factors, the center runs, blocks for 4 or 5 factors.
  • Latin hypercube: the type.
  • D-optimal: the candidate design, the model, the constraints and the number of starts.

This is a good model for the family fields of the step 2 card.


6Routing: a draft decision table

This table is a draft for review. It is not a decision. The LLM voters extract the inputs; the table decides; the user confirms. The table never asks the LLM for its own judgment of the best family (Section 1.9).

6.1 Inputs

Input Values Comment
I1 Family named in the request a supported family, an unsupported family, none "central composite", "Latin hypercube", "Taguchi L18"
I2 Levels of each factor 2; 3 or more; a range only A range only is a quantitative factor without stated levels
I3 Type of each factor quantitative, qualitative
I4 Goal find the active factors; check for curvature; fit a quadratic model; study a computer model; not stated
I5 Run budget a number, or none Compared with the full factorial and with the number of model terms
I6 Repeatable output yes, no, not stated yes = a deterministic computer model
I7 Excluded combinations or an irregular region yes, no
I8 A saved two-level design for the same factors yes, no For "Augment this design"

6.2 Rules (the first rule that applies decides)

Rule When Family or result Status
T1 I1 names a supported family That family; its pre-checks apply Consensus
T2 I1 names a family that this version does not have "This version does not support {feature}." Section 1.6
T3 I8 = yes and I4 = quadratic model Add axial runs to the saved design (ccd.augment) Consensus; needs Phase 3
T4 I6 = yes, all factors quantitative Latin hypercube (lhs types only) Consensus
T5 I7 = yes D-optimal on the candidate runs that remain Table choice
T6 I4 = quadratic model, all factors quantitative, 2 factors Central composite Consensus (Box-Behnken needs 3 or more)
T7 I4 = quadratic model, all factors quantitative, 3 to 7 factors, extreme combinations not possible Box-Behnken Table choice
T8 I4 = quadratic model, all factors quantitative, other cases Central composite Table choice, not consensus
T9 I4 = quadratic model with a qualitative factor D-optimal, or a clarification Table choice; needs a measurement (Section 3.4)
T10 Every factor at 2 levels; I4 = active factors, curvature or not stated Regular two-level design (Phase 1); center runs for a curvature check if all factors are quantitative Consensus
T11 A factor with 3 or more levels; I4 is not a quadratic model; the budget allows the full factorial General full factorial Table choice
T12 As T11, but the budget is smaller Orthogonal array; if no array fits, a fixed message (not a silent full factorial) Table choice
T13 No rule applies A clarification question (Section 6.3) —

For each family, the pre-checks then test the budget. Examples:

  • A quadratic model needs at least (k+1)(k+2)/2(k+1)(k+2)/2 runs.
  • A Box-Behnken design needs 3 to 7 factors and at least one center run.
  • DoE.base::oa_feasible must not refuse the array.

6.3 Clarification questions (fixed choices)

Question Choices
Q1 What is the main aim of the experiment? Find the few factors that matter. Check whether the response curves. Fit a quadratic model to find good settings. Study a computer model.
Q2 Does a run with the same settings give the same result each time? Yes. No. I do not know.
Q3 Are some combinations of settings not possible? No. Yes (name them).
Q4 Do you already have a two-level design for these factors in EXPERTA? A list of saved projects. No.

6.4 Boundary pairs for tests and for the evaluation

  • "Check for curvature" with two-level factors → a two-level design with center runs; "fit a quadratic model" → a response surface design.
  • "We cannot run all factors at their extremes at the same time" → Box-Behnken; "I already have a factorial" → add axial runs.
  • Three-level qualitative factors → general factorial or orthogonal array, not a response surface design.
  • "Simulation" with a repeatable output → Latin hypercube; "we simulate the process on a pilot line" → a physical experiment.
  • Excluded combinations → D-optimal.

6.5 A tension with the scope rule

Section 1.6 says that the tool does not recommend a different approach. Two aids say "screen first" for a response surface goal with many factors. If the table gives this message, the tool recommends an approach. If it does not, the tool makes a large central composite design without comment. The authors decide (Section 10.1).


7The flow of the app with design families

Step Phase 1 today With Phase 4
1 Describe A request in plain language No change
Translation The voters fill the typed spec The model-facing schema gets family (a named family) and the inputs I2 to I8. The evidence check (Section 5.5) applies to each input.
Routing — Deterministic code applies the decision table. Results: a family with the number of its rule, or a clarification question, or a fixed message.
2 Confirm The card with sources, agreement flags and pre-checks A "Design family" field at the top, with its source: "named in the request", "rule T7 from inputs I2, I3 and I4", or "your choice". A "Why this family" panel shows the rule and its inputs. The user can choose another family from a fixed list. The other fields of the card then change to the fields of that family, and the pre-checks run again.
3 Design FrF2 in WebR; the report; post-checks On the first use of a family, the app loads its packages with a progress line. The family's R template runs, then the family's report helper, post-checks and claim sentence.
4 Responses, 5 Analyze Phase 2, for two-level designs The analysis differs by family: a quadratic fit with canonical analysis for response surface designs, an emulator for computer experiments. Proposal: Phase 4 makes designs only, and its analysis comes later (Section 10.1).
6 Report The report of a two-level design Sections for each family: the claim, the computed properties, the axial settings outside the ranges, and the versions and seeds.
Projects Spec, report and run sheet on the device The project records the family, the versions of all packages used (the lhs version too) and both seeds of a central composite design. Older projects become the family "regular two-level".
Augment Foldover in Phase 3 "Add axial runs" on a saved two-level project with center runs; the resolution check runs first.

Things that do not change:

  • The LLM never makes a design and never chooses a family by its own judgment.
  • The user confirms the spec, now with its family, before R runs.
  • R computes the design, and the checks fail closed.

8Effect on the evaluation (Section 12)

  • The Phase 1 benchmark stays frozen, so its results stay comparable.
  • A routing slice: requests of each family, the boundary pairs of Section 6.4, and requests that need a clarification. The gold label is the result of the reviewed decision table. A row marked "table choice" must not count a different answer of the literature as a model error.
  • One slice for each family: the spec fields, design equivalence by the rules of the family, and the claim sentence.
  • Metrics:
    • The family confusion matrix.
    • The silent error rate for each family.
    • The rate of a wrong family without a flag.
    • The accuracy of each extracted input, because routing errors start in the extraction.
    • The rate of clarification questions.
  • Arms:
    • A rule and keyword baseline, because no published routing accuracy exists.
    • The same request with its clauses in another order (Ying, Vazquez and Xu, 2026).
    • Ten repeats for consistency (Vazquez, Rother and Charles-Gonzalez, 2026).

9Text of the specification that this investigation would change

These changes are not made now: main stays unchanged during the review by Alan R. Vazquez.

  1. Section 1.9, first paragraph. The functions do not share most argument names; give the table of Section 3.4.
  2. Section 1.9, family table:
    • Orthogonal arrays: the claim follows the returned type and the warnings.
    • Central composite designs: rotatability and orthogonal blocks are computed, and the default design is not rotatable.
    • Box-Behnken designs: a match to the published table, and rotatable only for 4 and 7 factors.
    • Latin hypercube designs: the lhs types only; dmax and strauss stay out.
    • D-optimal designs: "a lower bound on the D-efficiency relative to the best design on the candidate set, for the stated model", not "the D-efficiency lower bound that AlgDesign reports".
  3. Section 1.9, gate. The rank of the full quadratic model decides whether a response surface design is accepted, not the resolution of the cube.
  4. Section 7.3, seeds. Two seeds for central composite designs. A seed in the R code for Latin hypercube and D-optimal designs also without randomization. Record the lhs version.
  5. Section 7.8, post-checks. Post-checks for each family. For non-regular arrays, the integer check is on N2AjN^2 A_j.
  6. Section 1.9, comparison with RcmdrPlugin.DoE.
    • The author's page lists split-plot designs and more blocking options as planned, so "split-plot designs and all wrapper functions" is too strong.
    • The D-optimal menu has no augmentation and no blocking, and Dopt.augment has no menu.
    • The quotations "still in beta shape", "particularly cautious" and "partly on your own" are correct (read on 2026-10-19).
  7. Section 1.9, package table. The date 2025-04-26 of DoE.wrapper 0.13 is the Date field of the package. CRAN published the package on 2025-04-16. Say which date the table gives.
  8. Section 17.1, findings for the maintainers. Add two findings to the FrF2 findings:
    • The bbd.design help gives 14 runs for 3 factors; the design has 12.
    • lhs.design does not pass the seed to the DiceDesign types.

10Questions

10.1 For the authors

  1. Names. Should the build steps of Phase 4 be named 4A, 4B and so on, and should "Milestone 4" stay for the evaluation of Phase 1?
  2. Scope of the paper (already in Section 17.1). Is it Phase 1 alone, with Phase 4 as future work, or a second paper?
  3. The second seed of a central composite design. Options: the date seed plus 1, or a second date-based value. The rule must stay under the integer limit of R.
  4. "Screen first". Does the decision table give this message for a response surface goal with many factors (Section 6.5)?
  5. Analysis. Does Phase 4 make designs only, with the analysis of each family later?
  6. Order. Section 1.9 orders the families by risk. The measurements support this order. They also show that DoE.base designs need no new package. Should general factorials and orthogonal arrays come first, possibly before Phase 2?

10.2 For Alan R. Vazquez (to send in one batch with the follow-up of his review)

  1. The draft decision table (Section 6.2), especially the rows marked "table choice".
  2. The derived statements of Section 4.7.
  3. The claim sentences of Sections 4.2 to 4.6.
  4. Whether a "near rotatable" statement for Box-Behnken designs with 3, 5 and 6 factors is useful, and on which measure it should rest.
  5. The gold families of the routing slice.

11Possible next steps (not a plan)

  1. After the review by Alan R. Vazquez: put the corrections of Section 9 into the specification (version 8) on a branch.
  2. Measure in Chromium:
    • The start with the new packages, with the slow profile (Section 7.9).
    • The time of Dopt.design with 50 starts.
    • oa.min3 and its completeness flag.
  3. Measure qualitative factors in Dopt.design and quad().
  4. Write the plan of the first Phase 4 build step (general factorials and orthogonal arrays) with the writing-plans skill, and publish it as a page.

12References

  • Boiko, D. A., MacKnight, R., Kline, B., and Gomes, G. (2023). Autonomous chemical research with large language models. Nature, 624, 570-578. https://doi.org/10.1038/s41586-023-06792-0
  • Box, G. E. P., and Behnken, D. W. (1960). Some new three level designs for the study of quantitative variables. Technometrics, 2(4), 455-475. https://doi.org/10.1080/00401706.1960.10489912
  • Box, G. E. P., and Hunter, J. S. (1957). Multi-factor experimental designs for exploring response surfaces. The Annals of Mathematical Statistics, 28(1), 195-241. https://doi.org/10.1214/aoms/1177707047
  • Box, G. E. P., and Wilson, K. B. (1951). On the experimental attainment of optimum conditions. Journal of the Royal Statistical Society, Series B, 13(1), 1-38. https://doi.org/10.1111/j.2517-6161.1951.tb00067.x
  • Bran, A. M., Cox, S., Schilter, O., Baldassari, C., White, A. D., and Schwaller, P. (2024). Augmenting large language models with chemistry tools. Nature Machine Intelligence, 6, 525-535. https://doi.org/10.1038/s42256-024-00832-8
  • Grömping, U., and Xu, H. (2014). Generalized resolution for orthogonal arrays. The Annals of Statistics, 42(3), 918-939. https://doi.org/10.1214/14-AOS1205
  • Hickernell, F. J. (1998). A generalized discrepancy and quadrature error bound. Mathematics of Computation, 67(221), 299-322. https://doi.org/10.1090/S0025-5718-98-00894-1
  • McKay, M. D., Beckman, R. J., and Conover, W. J. (1979). A comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics, 21(2), 239-245. https://doi.org/10.1080/00401706.1979.10489755
  • NIST/SEMATECH (n.d.). Choosing an experimental design. NIST/SEMATECH e-Handbook of Statistical Methods, Section 5.3.3. Read on 2026-10-19. https://www.itl.nist.gov/div898/handbook/pri/section3/pri33.htm
  • Ranković, B., Griffiths, R.-R., and Schwaller, P. (2025). Large language models as uncertainty-calibrated optimizers for experimental discovery. arXiv:2504.06265.
  • Sacks, J., Welch, W. J., Mitchell, T. J., and Wynn, H. P. (1989). Design and analysis of computer experiments. Statistical Science, 4(4), 409-423. https://doi.org/10.1214/ss/1177012413
  • Santner, T. J., Williams, B. J., and Notz, W. I. (2003). The Design and Analysis of Computer Experiments. Springer. https://doi.org/10.1007/978-1-4757-3799-8
  • Silvey, S. D., Titterington, D. M., and Torsney, B. (1978). An algorithm for optimal designs on a design space. Communications in Statistics - Theory and Methods, 7(14), 1379-1389. https://doi.org/10.1080/03610927808827719
  • Vazquez, A. R., Rother, K. M., and Charles-Gonzalez, M. V. (2026). A systematic assessment of large language models for constructing two-level fractional factorial designs. Quality Engineering, 38(3), 496-508. https://doi.org/10.1080/08982112.2026.2625951
  • Xu, H., and Wu, C. F. J. (2001). Generalized minimum aberration for asymmetrical fractional factorial designs. The Annals of Statistics, 29(4), 1066-1077. https://doi.org/10.1214/aos/1013699993
  • Ying, D. D., Vazquez, A. R., and Xu, H. (2026). Prompt engineering using order-of-addition experiments: An application to generating two-level fractional factorial designs. arXiv:2607.05537.
  • Software documentation read on 2026-10-19: the CRAN manuals of DoE.wrapper 0.13, DoE.base 1.2-5, rsm 2.10.6, lhs 1.3.0, DiceDesign 1.10, AlgDesign 1.2.1.2 and RcmdrPlugin.DoE 0.12-6; the JMP help "Coordinate-Exchange Algorithm"; the Design-Expert help "Optimal Exchange Methods". The research notes list the pages and the check status of each reference.