Describe It Privately.
Land in the Right Department.
A patient describes the problem in their own words; the router matches the meaning on the device and fills the right branch and department in the appointment form. No keyword search, no login, no front-desk call. The symptom text stays on the device.
From Symptom to Department.
Describe → Match → Fill. The patient stays in control; the router handles the navigation.
STEP 1
Describe
The patient types in plain language. No department dropdown, no phone call. For example, “My heart keeps racing at night” finds Cardiology without the word “cardiology”.
STEP 2
Match
The browser converts the sentence into an ONNX vector embedding and compares it with the hospital’s published department content. Calibrated thresholds decide whether the match is confident, weak, ambiguous, or should fail closed.
STEP 3
Fill
The router fills the branch, department and optional doctor in the booking form. When a department is available at more than one branch, the patient picks the branch.
PRIVATE BY DESIGN
Your Words Stay on Your Device.
The symptom text is matched in the browser. It is not stored in the appointment, shown to staff, or sent to the doctor. The appointment records the department, not the description.
| The appointment records | The router does not store |
|---|---|
| Patient name, DOB, email, phone | The symptom text |
| Branch, department, doctor, date/time | The query embedding |
| Optional booking message, if the patient fills it | Not applicable |
Scope note: This covers the router’s symptom box. The booking form, once submitted, still sends the patient’s contact details and the appointment selections. The booking form’s optional Message field is separate.
Sensitive departments
For sensitive concerns such as sexual health, mental health, or anything carrying stigma, the patient can describe the problem without that text becoming part of the appointment record.
The Red-Flag Gate Runs First.
The safety gate runs before the model, and the router never guesses its way past it.
- Red Flags First: A deterministic red-flag gate runs before the model.
- Emergency Phrases Stop: They stop immediately and point the patient to urgent care.
- The Form Is Not Touched: The booking form is never touched by the red-flag path.
- Fail Closed, Not Guess: If the index is not calibrated, the router fails closed rather than guessing.
- Exact Names Still Route: Exact department, condition and doctor names route without the model.
TECHNICAL / WP-CLI
For the Hospital Tech Admin.
The router exposes three WP-CLI commands. The hospital tech admin’s daily check is status; index:compile and model:install are implementation/deployment commands.
Per-site setup. The model is shared; the index and thresholds are not. Each hospital site compiles its own index from its published departments, conditions, doctors and branches.
Calibration is also per site: the thresholds are measured against a golden set of representative symptom phrases, expected departments and negative anchors curated for that site. Activating the plugin does not calibrate it. Until the index and calibration are in place, the semantic path fails closed; exact department, condition and doctor names still route.
Help output
NAME
wp vg-router
SYNOPSIS
wp vg-router <command>
SUBCOMMANDS
index:compile Compile a routing-index fixture into manifest + .bin artifacts.
model:install Install ONNX model weights from a local Hugging Face repo tree.
status Report why the router will or will not match symptom text.
Command reference
| Command | Who uses it | What it answers |
|---|---|---|
index:compile | Implementation / deployment | Rebuild the routing index from hospital content |
model:install | Implementation / deployment | Install the on-device ONNX model |
status | Hospital tech admin | Is the router ready, and if not, why? |
Status command
wp vg-router status
On a healthy site the output reads:
Index artifact: index-2caa2682e9bc.json + index-2caa2682e9bc.bin (8 chunks)
Index directory: …/wp-content/uploads/vg-router
Calibration: complete - tau_min=0.32, tau_strong=0.36, margin=0.136
Model weights: present - onnx-community/all-MiniLM-L6-v2-ONNX
Next: none - the index is calibrated and the model is installed.
Reading the report
| Line | Meaning |
|---|---|
| Index artifact | The live compiled index the router is using |
| Index directory | Where the compiled index and vectors live |
| Calibration: complete | The thresholds were measured against the frozen golden set. The real output also names that set and its hash (calibration_set=golden-set@sha256:…). |
| Model weights: present | The on-device ONNX model is installed |
| Next: none | No action is needed |
If the router is not ready
status is a diagnostic, not a gate. It exits 0 even when the site is uncalibrated. If calibration is incomplete or the model weights are missing, the input box fails closed. Contact the implementation team; do not run index:compile or model:install as an admin fix.
For the full flag reference:
wp help vg-router <command>
See It With Your Departments.
The router uses your published departments, branches and calibration. See it in your booking flow.