Account: ERP-AI-Chatbot
Enter 6-digit code from Google Authenticator

IRIS Admin

Eloquent LLM (v3)

version-3 catalog only

Ask Eloquent / relation questions against iris-v3 (vLLM served weights) using version-3 as the only catalog. A deterministic orchestrator runs lookup → open_model → optional fetch_erp; the model only copies JSON (found, method, type, fk, table, warnings[]). After a class + relation resolve, an optional identifier (WO / invoice / part / staff id) loads that ERP row read-only and runs only the catalog-approved relation method. No identifier → metadata only.

Catalog
313 models
Generated
2026-11-30T03:35:42+00:00
LLM
iris-v3 (Qwen/Qwen2.5-14B-Instruct-AWQ via vLLM)
vLLM URL
http://127.0.0.1:8002

Ask the catalog

Enter submits. Class is resolved from nav table_name (including snake/plural of the class), short_name, legacy slug, or acronyms (GRN, WOPPR, WO, SO, PO, PR, JO). Exact table-name hits answer from the catalog without the leftover LLM. Ambiguous asks analyze with thinking — that can take several seconds. Add a WO / invoice / part / staff id to fetch ERP rows.

Result

—

Class
Table
Method
Nav hit
Attached
Hop-2
Tools
Model
Parse source
Latency

v3 test reports

Read-only render of the version-3 harness reports. Tabs: n=1 / N=20 control / 0.3 power.

Historical: 2026-08 local-LLM reference test (Ollama host, since retired)

Production leftover LLM is vLLM iris-v3 on :8002. This file is a dated run record.

Ollama vs version-3 catalog — local-LLM reference test

Setup

Field Value
Model qwen3:30b (Ollama tags: family qwen3moe, 30.5B, Q4_K_M). Already loaded (/api/ps).
Host http://127.0.0.1:11434 (intec-erp-chatbot/.env OLLAMA_URL / OLLAMA_DEFAULT_MODEL)
API POST /api/generate, stream: false, options.temperature: 0.3 (chatbot default), timeout 120s
Started 2026-08-20T02:13:40+08:00
Finished 2026-08-20T02:15:43+08:00 (last created_at on case 7)
Catalog eloquent-model-relation/version-3/ (llm/index.json generated_at 2026-08-19T18:07:17+00:00; 283 models, 845 relations, mean file 1990 B, max 8042 B workorder.json)
Retrieval README contract: grep one llm/nav.json object, open one llm/models/{node_key}.json. WO file ~8 KB → prompt used class_name, table_name, relations[], map_notes only.
Ground truth Attached v3 JSON. PHP sampled only to confirm JSON (no contradiction).

Scoring: pass = reply names the JSON fields (method / type / fk / table) and does not add a method absent from relations[]. partial = did not invent, but did not emit the expected tokens. fail = invents a method/table the JSON does not have.

Pass plan (before scoring)

Pass Question Leader after pass Contradiction?
1 Artifacts: README, nav hits, model files exist and node_key == filename contract usable no
2 Schema: relations[] is method/type/fk; inbound leaks live in map_notes v3 encodes the GRNI/User traps no
3 Completeness vs PHP on the asked edges JSON matches PHP no
4 Relation accuracy (type + fk) JSON matches PHP no
5 Query reconstructability (WO lines → inventory) hop is in the two files no
6 Token / navigability (one nav + one/two JSON) prompts 0.9–4.8 KB no
7 Failure modes on live generate lookup holds; negative answer is weak yes — format vs “none”
8 Adversarial: invent WO→GRNI hasMany? model did not invent no (overturn attempt failed)

Results

Case Expected (from JSON) Model response (scored text; thinking discarded) Latency Score
1 WO line items work_order_items, hasMany, wo_id — llm/models/workorder.json relations[1] work_order_items,hasMany,wo_id 13.361s pass
2 WO sales order salesOrderItem, belongsTo, so_item_id — same file relations salesOrderItem,belongsTo,so_item_id 10.635s pass
3 User employee employee, hasOne, staff_id; must not invent hasMany PurchaseOrder — llm/models/user.json country,belongsTo;userrole,belongsTo,id;employee,hasOne,staff_id 29.278s pass
4 GRN table goodsreceiptsnotes not goods_receipts_notes — llm/models/goodsreceiptsnote.json table_name goodsreceiptsnotes 2.942s pass
5 Adversarial GRNI none — no GoodsReceiptsNoteItem / GoodRecieptsNoteItem in WorkOrder relations[]; map_notes says inbound/collapsed , , , 44.843s partial
6 Two-hop materials hop2 inventory, belongsTo, inventory_id — llm/models/workorderitem.json inventory,belongsTo,inventory_id 3.251s pass
7 Inventory uom + count uom, belongsTo, uom_id; relations[] length 21 — llm/models/inventory.json uom,belongsTo,uom_id,21 18.437s pass

Count: 6 pass / 1 partial / 0 fail.

Thinking lived in the Ollama thinking field (not <think> tags in response). Case 5 thinking was 19135 chars / 4480 eval tokens.

Evidence (named files)

Pass 1–2 — contract and schema

  • version-3/README.md: grep "short_name": "WorkOrder" in llm/nav.json → node_key workorder → llm/models/workorder.json. relations[] = methods on this class only.
  • Nav hits used: llm/nav.json WorkOrder L1933–1938 (node_key workorder, table work_orders); User L1835–1839; GoodsReceiptsNote L632–637 (node_key goodsreceiptsnote, table goodsreceiptsnotes, legacy_diagram_slug grn); WorkOrderItem L1960–1965; Inventory L676–680.
  • workorder.json is 8042 B (under the 8 KB hub cap; llm/index.json over_8kb: []). Prompt stripped to 30 relations + map_notes.

Pass 3–4 — JSON vs PHP (sampled because replies matched JSON)

JSON claim PHP
WorkOrder::work_order_items() hasMany wo_id intec-erp-v2/app/Models/WorkOrder.php L125–127
WorkOrder::salesOrderItem() belongsTo so_item_id same file L177–179
App\User::employee() hasOne staff_id,staff_id intec-erp-v2/app/User.php L54–56; country / userrole L46–52. No purchaseOrder function.
GRN $table intec-erp-v2/app/Models/GoodsReceiptsNote.php L13 public $table = 'goodsreceiptsnotes';
WO has no GRNI method rg on WorkOrder.php for GoodReciepts|GoodsReceipts → 0 hits
WorkOrderItem::inventory() belongsTo inventory_id WorkOrderItem.php L60–62
Inventory::uom() Inventory.php L90; 21 relations[] objects in inventory.json

Pass 5–6 — reconstructability and tokens

  • README worked example (WO materials): work_order_items() then WorkOrderItem::inventory(). Cases 1 and 6 returned those method names and keys.
  • Prompt sizes: case 3 = 951 B (full user.json fields); case 4 = 1061 B; case 7 = 2438 B; WO cases ≈ 3.6 KB; hop case 6 = 4834 B. No full nav.json dump.

Pass 7 — failure modes (observed, not guessed)

  1. Hallucinated methods: not observed. Case 3 did not emit PurchaseOrder despite v1 map_notes warning in user.json. Case 5 did not emit a WO→GRNI hasMany.
  2. Wrong table: not observed. Case 4 returned goodsreceiptsnotes, not v2 goods_receipts_notes (README.md do-not-trust #5).
  3. Ignored JSON: not observed on lookup cases. Replies 1, 2, 4, 6, 7 are copies of JSON fields.
  4. Negative-answer format: case 5 thinking cites map_notes (“not a method on this class”) and scans related for GoodsReceiptsNoteItem / GoodRecieptsNoteItem, finds none, then loops because the system line demanded method, type, fk. Final response is empty CSV slots , , , — not the word none, and not an invented method. 44.8s / 4480 eval tokens.
  5. Over-list: case 3 listed all three relations[] (country has no fk in JSON; userrole fk id matches JSON). Extra names are in the file, not invented.
  6. Count self-check: case 7 thinking first said 20, then listed 21 methods (currency … taxes) and answered 21.

Pass 8 — adversarial re-check

Tried to overturn “model follows relations[] only” by asking for a WO hasMany to GRNI — the exact inbound leak in workorder.json map_notes and README hallucination table ($wo->goodRecieptsNoteItems). The model refused to invent. That does not overturn the leader. It does show the compact “one line: method, type, fk” prompt is a bad fit for “none”.

Review

qwen3:30b can follow the v3 retrieval contract when given one nav object plus one (or two) model JSON files: it copies method / type / fk / table_name from relations[] and does not fall back to v1 invented edges (User→PurchaseOrder, WorkOrder→GoodRecieptsNoteItem) or the v2 GRN snake_case table.

It does not reliably emit a clear negative (none) when the asked edge is absent. The failure mode is format collision + long thinking, not a hallucinated WO method. IRIS should add one line to the system prompt: If it is not in relations[], answer none — do not fill method/type/fk.

Thinking cost is real: lookup cases 3–13s (case 4/6 ~3s); User dump 29s; adversarial 45s. response itself stayed one line.

Recommendation

Yes — v3 is usable as the IRIS local-LLM Eloquent reference as-is for attached single-file lookups (method, type, fk, table), provided the IRIS prompt states that missing relations[] rows answer none and the agent never dumps llm/nav.json or all models.

Historical: 2026-08 Ollama N=20 control (Ollama since retired)

Production leftover LLM is vLLM iris-v3 on :8002.

Ollama vs version-3 catalog — N=20 no-file control

Second suite. First qualitative pass: OLLAMA_V3_TEST.md (n=1, no control, CSV answers). This run adds a with_json vs no_file control, grammar-constrained JSON, retrieval/hop tool-loop, generated traps, and N=20.

Setup

Field Value
Model qwen3:30b (already in VRAM; keep_alive: 24h)
Host http://127.0.0.1:11434 Ollama 0.32.5
API POST /api/generate, stream: false, format: <json-schema> (per case class)
Thinking think: false for copy / table; think: true for negative / hop / retrieval
Decode temperature 0 (copy/table) or 0.3 (think-on); num_ctx 4096 or 8192; num_predict 256
Started 2026-08-20T02:33:01+08:00
Finished 2026-08-20T02:53:20+08:00
Wall 1220.0 s (20.3 min) for 680 trials (17 cases × 2 modes × 20)
Catalog eloquent-model-relation/version-3/llm/ (generated_at 2026-08-19T18:07:17+00:00; 283 models)
Harness version-3/scripts/ollama_v3_harness.py
Cases version-3/tests/cases.json
Raw version-3/tests/results/run-20260820-023301.jsonl
Drift python3 scripts/check_catalog_drift.py → clean (286 files, 0 mismatches)

Scoring: parse JSON from response, else thinking. If expected.found === false, require found === false. If expected.found === true, require found === true and byte-equal method / type / fk / table / node_key when present. Hop with_json also requires requesting/using workorderitem. No CSV, no 45 s empty-slot loop.

Pass plan (before scoring)

Pass Question Leader after pass Contradiction?
1 Artifacts: harness, cases, trap generator, drift script exist contract runnable no
2 Schema: grammar JSON replaces CSV; absence = {found:false} format usable no
3 Completeness of live suite vs first 7 + traps + retrieval suite covers review items 1–7 no
4 Accuracy vs PHP on asked edges (sample) JSON matches PHP no
5 Delta: with_json − no_file (what proves v3) v3, not convention yes vs first review — cases 1/2/6 are not filler
6 Retrieval + hop tool-loop nav node_key + second file no
7 Failure modes, latency, think flag think-off copy is cheap; retrieval wall inflated no
8 Adversarial: can convention / abstention overturn “v3 earns keep”? overturn fails no

Results

Case class with_json% no_file% delta n
orig-01-wo-line-items copy 100.0 0.0 +100.0 20/20
orig-02-wo-sales-order copy 100.0 0.0 +100.0 20/20
orig-03-user-employee copy 100.0 0.0 +100.0 20/20
orig-04-grn-table table 100.0 0.0 +100.0 20/20
orig-05-wo-grni-negative negative 100.0 100.0 +0.0 20/20
orig-06-hop-inventory-fk hop 100.0 0.0 +100.0 20/20
orig-07-inventory-uom copy 100.0 0.0 +100.0 20/20
retrieval-grn-node-key retrieval 100.0 0.0 +100.0 20/20
trap-table-goodrecieptsnoteitem table 100.0 0.0 +100.0 20/20
trap-table-gpb table 100.0 0.0 +100.0 20/20
trap-table-workorderos table 100.0 0.0 +100.0 20/20
trap-fk-goodsreceiptsnote-po_reference copy 100.0 0.0 +100.0 20/20
trap-fk-goodrecieptsnoteitem-inventory copy 100.0 0.0 +100.0 20/20
trap-inbound-user-purchaseorder negative 100.0 100.0 +0.0 20/20
trap-inbound-bom-goodrecieptsnoteitem negative 100.0 100.0 +0.0 20/20
trap-spelling-goodsreceiptsnote negative 100.0 100.0 +0.0 20/20
trap-hasmany-id-bom-inventory copy 100.0 0.0 +100.0 20/20

680 / 680 trials produced parseable JSON. 0 HTTP errors. with_json fails: 0. Adversarial found:false rate: 160 / 160 (100%).

Temperature 0 made copy/table answers identical across the 20 repeats after the first decode. Think-on negatives/hop still never flipped found.

Filler vs real regression suite

Kind Cases Why
Proves v3 (delta +100) 13 cases: all copy, table, hop, retrieval no_file never emitted the catalog tokens
Filler for delta (delta ≈ 0) 4 negative cases both modes already return {found:false} — measures format, not the file
Not filler (contra first review) orig-01, orig-02, orig-06 first review guessed “convention / zero delta”. N=20 shows +100

orig-04 GRN table is still the poster-child irregular table (goodsreceiptsnotes). It is not unique: GPB gpb_documents, GRNI goodrecieptsnoteitems, WorkOrderOS work_order_operation_schedules have the same +100 delta.

Evidence (named files)

Pass 1 — artifacts

  • Harness: version-3/scripts/ollama_v3_harness.py (compact attach = class_name, table_name, relations[] method/type/fk/related, map_notes).
  • Cases: version-3/tests/cases.json (7 original + retrieval + 9 generated traps).
  • Full trap dump: version-3/tests/generated_traps.json (550 rows: 45 irregular tables, 475 non-convention FKs, 21 inbound, 2 spelling, 7 hasMany fk=id).
  • Drift: version-3/scripts/check_catalog_drift.py + build_llm_catalog.py --out.
  • Smoke runs (schema debug): tests/results/run-20260820-022816.jsonl, run-20260820-023209.jsonl.

Pass 2 — JSON schema (mandatory item 2)

Legal objects only. Per-class grammars after a smoke fail where the shared schema let the model put the table in fk (method: table_name, fk: goodsreceiptsnotes):

class required shape
copy {found, method, type, fk}
table {found, table}
negative {found} (+ optional need_file)
hop copy fields + need_file / lookup
retrieval {found, node_key, table} + lookup

think: false is supported on 0.32.5 and writes JSON to response. think: true (and omitted think on qwen3) writes the constrained JSON into thinking with empty response — 240 / 680 trials, all still parseable. No , , , rows, no 44 s format loop from the first suite.

Pass 3–4 — suite coverage and PHP sample

Live traps were bounded (9 of 550) so N=20 stayed under 90 minutes. They cover each generator kind except duplicating orig-04/05.

Claim PHP
WorkOrder::work_order_items() hasMany wo_id intec-erp-v2/app/Models/WorkOrder.php L125–127
WorkOrder::salesOrderItem() belongsTo so_item_id workorder.json relations + same PHP file
App\User::employee() hasOne staff_id intec-erp-v2/app/User.php L54–56
GRN $table GoodsReceiptsNote.php L13 public $table = 'goodsreceiptsnotes'
GRNI inventory() belongsTo item_id GoodRecieptsNoteItem.php L88–90
Bom::inventory() hasMany 'id','bom_id' Bom.php L154–156 (code_may_be_wrong)

Drift rebuild to a temp dir matched committed llm/ (timestamps stripped). The 2026-08-20 ERP pull did not change parsed relations for these files.

Pass 5 — no_file fingerprints (what convention actually does)

Deterministic wrong guesses (20/20 unless noted):

Case no_file output Why it fails
orig-01 found:false + lineItems / hasMany / work_order_id PHP is work_order_items / wo_id
orig-02 19× {found:false}; 1× salesOrderItem + sales_order_item_id catalog FK is so_item_id
orig-03 19× {found:false}; 1× fk: employee_id catalog is hasOne / staff_id
orig-04 / all table traps {found:false} abstains; never emits goodsreceiptsnotes / gpb_documents
orig-07 {found:false} does not emit uom / uom_id
orig-06 hop need_file: InventoryItem (14) / Inventory (4) never workorderitem then inventory_id
retrieval 15× {found:false}; 4× need_file: grn_notes; 1× need_file: grn slug trap: grn is legacy_diagram_slug, not node_key
trap GRN po_reference {found:false} does not emit po_number
trap GRNI inventory {found:false} does not emit item_id
trap Bom inventory belongsTo / inventory_id + found:false catalog/PHP is hasMany / fk: id

The no_file system line “If you are not sure, return found false” increases abstention. That does not create the +100 deltas by itself: every time the model guessed, the guess was Laravel convention, not this ERP’s PHP.

Pass 6 — retrieval and hop

Retrieval (nav candidates only; decoys: legacy_diagram_slug: grn, GRNI/grni, GrnCancellationRequest, Gpb). 20/20 with_json picked node_key: goodsreceiptsnote and table: goodsreceiptsnotes on step 0. 0/20 no_file picked that key; one trial asked for grn.

Harness then injected goodsreceiptsnote.json and called generate again even though step 0 already matched — retrieval mean wall 37.7 s is an extra prefix-compile, not thinking tokens (thinking_chars mean 40). Fixed after this run: stop when the parsed object already matches expected (non-hop).

Hop (only workorder.json attached). 20/20 step 0: {found:false, need_file: WorkOrderItem} (normalized to workorderitem). 19/20 then copied inventory / belongsTo / inventory_id from the second file. 1/20 asked for Inventory as a third hop, then still answered correctly. hop1_leak (answering work_order_items as if it were inventory) = 0 / 20. no_file never received a second file (control) and scored 0.

Pass 7 — latency and API notes

Condition n mean wall median max
think: false (copy/table) 440 0.61 s 0.26 s 19.48 s
think: true (neg/hop/retrieval) 240 3.96 s 0.26 s 38.75 s

The ~19 s spike is a first-token / prefix-compile tax on a new prompt, not eval: eval_duration stays ~0.2–0.3 s for ~20 tokens. Repeats of the same prefix drop to 0.2–0.5 s. think: true does not add a long chain-of-thought here — the grammar dumps the JSON object into thinking (max 87 chars).

First-suite case 5 was 44.8 s / 4480 eval tokens of CSV looping. This suite’s negatives are 0.2–1.2 s mean with {found:false}.

think: false in the generate body is accepted. Putting think only under options does not disable thinking on this build.

Pass 8 — adversarial re-check

Tried to overturn “v3 earns its keep”:

  1. Maybe cases 1/2/6 are convention-solved. Overturn fails. orig-01 invents lineItems/work_order_id 20/20. orig-02 never emits so_item_id. orig-06 never opens workorderitem without the catalog.
  2. Maybe negatives show the file does nothing. True for delta, false for format: first suite could not say none; this suite says {found:false} 160/160. Negatives are a format regression test, not a retrieval test.
  3. Maybe code_may_be_wrong Bom.inventory fk:id is a bad expected. The catalog copies PHP (hasMany(Inventory::class,'id','bom_id')). with_json copies that row 20/20; no_file “corrects” it to belongsTo/inventory_id. That is exactly when IRIS must trust v3 (and then a human) rather than Laravel folklore.

Trap-set coverage

Generator kind Enumerated Live (this run)
table_not_snake_plural 45 3 (+ orig-04 GRN)
fk_not_singular_id 475 2 (GRN po_number, GRNI item_id) + orig-01/02
inbound_only_map_notes 21 2 (User→PO, Bom→GRNI) + orig-05
receipts_misspelling 2 1 (GoodsRecieptsNote)
hasmany_fk_id 7 1 (Bom.inventory, tagged code_may_be_wrong)

Full list: tests/generated_traps.json. Live IDs are the from_generated rows in tests/cases.json.

Drift

python3 scripts/check_catalog_drift.py
# clean: true; committed=286, rebuilt=286; only_*=[]; content_mismatch=[]

Ignores generated_at. No GitHub Action; README documents the local command.

Review vs OLLAMA_V3_TEST.md

First suite This suite
n=1, no control n=20 × 2 modes
CSV method,type,fk — case 5 → , , , in 45 s schema {found:false} in <1 s median
Guessed cases 1/2/6 may be zero-delta filler all three are +100
“v3 usable as-is for attached lookups” Confirmed at 100% / 20; also required for tables, non-convention FKs, hop2, and node_key vs grn
Prompt should say none Use grammar JSON instead of a prose none
Thinking cost 3–45 s on lookups think: false → ~0.3 s after prefix warmup

Recommendation

v3 earns its keep. Attach the compact model JSON (or nav → node_key → one file). Do not ask qwen3:30b to reconstruct this ERP from Laravel memory: it abstains or emits lineItems/work_order_id/sales_order_item_id/goods_receipts_notes-style folklore.

IRIS should:

  1. Grep one llm/nav.json object; open llm/models/{node_key}.json — never the legacy_diagram_slug (grn ≠ goodsreceiptsnote).
  2. Constrain output with the JSON schema above. Missing edge → {found:false}.
  3. Disable thinking on field-copy / table questions (think: false top-level). Allow thinking (or a tool-loop) on hop/negative.
  4. For WO materials, if only the header file is loaded, expect need_file: workorderitem before answering inventory_id.
  5. Run scripts/check_catalog_drift.py after builder or PHP-model edits.

What the first suite still did better: a human-readable walk through thinking traces. What this suite adds: statistical deltas and a machine-parseable contract.