lumnik. / scenarios All scenarios · Français

The AI switched off for an audit: switched off is not absent

Goal Switch the hub's AI off without changing edition or losing data, keep reading the sources, and know what to redo when it is switched back on.

A hospital pharmacy sends the hub its dispensing orders every day. The data protection officer asks for the AI to be switched off for the length of an audit.

dispensing-20261107.csv
order_no;ward;item;status;qty
PH-26-0411;Cardiologie;Amiodarone 200 mg;DELIVREE;60
PH-26-0412;Pédiatrie;Paracétamol sirop 2,4 %;DELIVREE;4
PH-26-0413;Réanimation;Noradrénaline 8 mg/4 ml;PREPAREE;20
PH-26-0414;Oncologie;Ondansétron 8 mg;DELIVREE;30
PH-26-0415;Gériatrie;Enoxaparine 4000 UI;ANNULEE;14
PH-26-0416;Chirurgie;Céfazoline 2 g;PREPAREE;12
$ lm module list
NAME       VERSION  SCHEMA              STATUS    REASON
core       0.1.0    Platform            ACTIVE    
identity   0.1.0    Identity & Tenancy  ACTIVE    
llm        0.1.0    Model provider      INACTIVE  disabled:lumnik.ai.enabled
rag        0.1.0    Platform RAG        INACTIVE  disabled:lumnik.ai.enabled
search_pg  0.1.0    PostgreSQL search   ACTIVE    

$ lm ask --scope pharmacy-a "combien de commandes délivrées hier ?"
Error: this hub has the AI switched off (LUMNIK_AI_ENABLED=false): lm module list shows rag INACTIVE; the operator turns it back on

$ lm rag search "noradrénaline"
Error: this hub has the AI switched off (LUMNIK_AI_ENABLED=false): lm module list shows rag INACTIVE; the operator turns it back on

$ lm scopes
Error: this hub has the AI switched off (LUMNIK_AI_ENABLED=false): lm module list shows rag INACTIVE; the operator turns it back on

$ lm rag status
ai: switched off (LUMNIK_AI_ENABLED=false)
indexed: false
chunks: 0
indexed_at: -
provider: none
embedding_model: none
stored_chunks: 27
dispensing-20261108.csv
order_no;ward;item;status;qty
PH-26-0417;Cardiologie;Furosémide 40 mg;SAISIE;28
PH-26-0418;Réanimation;Propofol 1 %;PREPAREE;10
PH-26-0413;Réanimation;Noradrénaline 8 mg/4 ml;DELIVREE;20
$ lm module list
NAME       VERSION  SCHEMA              STATUS  REASON
core       0.1.0    Platform            ACTIVE  
identity   0.1.0    Identity & Tenancy  ACTIVE  
llm        0.1.0    Model provider      ACTIVE  
rag        0.1.0    Platform RAG        ACTIVE  
search_pg  0.1.0    PostgreSQL search   ACTIVE  

$ lm workflow apply -f manifests/20-dispensing-lifecycle.yaml
Applied workflow "scenario-aioff-dispensing-a" → connector.t_scenario_aioff_dispensing_a.status, scope pharmacy-a
  the data matches the declaration

$ lm rag search "cycle de vie des commandes de la pharmacie, préparée, délivrée"
SCORE  SOURCE                                SNIPPET
0.698  workflow/scenario-aioff-dispensing-a  Workflow scenario-aioff-dispensing-a — cycle de vie de la colonne status de la t…
0.667  workflow/order-line-cycle-f           Workflow order-line-cycle-f — cycle de vie de la colonne stage de la table conne…
0.656  workflow/acme-order-lifecycle         Workflow acme-order-lifecycle — cycle de vie de la colonne status de la table co…
0.652  workflow/order-lifecycle              Workflow order-lifecycle — cycle de vie de la colonne status de la table connect…
0.647  workflow/scenario-order-sleep-d       Workflow scenario-order-sleep-d — cycle de vie de la colonne status de la table …

Limits

  • The setting applies to the whole hub: the AI cannot be switched off for one scope only.
  • The hub must be restarted, once to switch off, once to switch back on.
  • During the audit nothing is indexed for chat: not a Workflow, not a connector described again, not a file loaded by lm csv ingest. They must be applied again.
  • lm rag reindex rebuilds only the platform corpus, not the scopes'.
  • A search by a user without a scope reads every lifecycle of the tenant, not only the pharmacy's.
  • Orders, wards and quantities synthetic.

Hospital pharmacy · audit

The DPO asks for the AI to be switched off.

For the length of an audit. Without changing edition, without losing data.

LUMNIK_AI_ENABLED=false

The problem

Switched off looked like absent.

  • rag status said chunks: 0, provider: none.
  • A lifecycle declared during the audit stayed out of chat, without a word.

What is not changed

The same image, the same data.

  • The jars stay, the rag schema stays migrated.
  • The day's files are read as before.

What had to be written

LUMNIK_AI_ENABLED=false

One setting, one restart.

  • Then true when the audit ends.
  • And the lifecycle applied a second time.

What was fixed

rag status says ai: switched off and what it keeps (#1895).

  • The workflow apply warns it does not index (#1896).
  • One sentence for ask, search and chat (#1894).

Try it

The scenario replays locally.

Every step is published with its output.

This scenario needs lumnik Pro.

See the editions →