lumnik. / scenarios All scenarios · Français

And SUP-004? Ask answers the follow-up as the whole question

Goal Let a buyer chain questions without retyping them, showing each time the question understood.

A buyer asks how many orders were cancelled, then "And for supplier SUP-003?", then "And SUP-004?". They do not retype the question.

purchase_orders.csv
po_number,supplier_id,supplier_name,category,order_date,status,amount_eur
PO-2025-0001,SUP-006,Fournisseur F,visserie,2025-06-30,received,12328.52
PO-2025-0002,SUP-002,Fournisseur B,emballage,2025-01-25,received,17452.35
PO-2025-0003,SUP-002,Fournisseur B,emballage,2025-05-01,received,241.35
PO-2025-0004,SUP-002,Fournisseur B,emballage,2025-01-31,received,4350.22
PO-2025-0005,SUP-003,Fournisseur C,transport,2025-11-24,cancelled,14903.09
PO-2025-0006,SUP-001,Fournisseur A,visserie,2025-04-10,received,16044.38
PO-2025-0007,SUP-005,Fournisseur E,emballage,2025-03-01,cancelled,4720.45
PO-2025-0008,SUP-004,Fournisseur D,maintenance,2025-01-03,ordered,12530.45
PO-2025-0009,SUP-003,Fournisseur C,transport,2025-03-14,received,12444.82
PO-2025-0010,SUP-004,Fournisseur D,maintenance,2025-01-30,received,1472.23
PO-2025-0011,SUP-002,Fournisseur B,emballage,2025-08-23,ordered,1548.55
PO-2025-0012,SUP-005,Fournisseur E,emballage,2025-04-25,received,10939.14
PO-2025-0013,SUP-003,Fournisseur C,transport,2025-02-18,received,17843.19
PO-2025-0014,SUP-004,Fournisseur D,maintenance,2025-11-12,received,16114.73
PO-2025-0015,SUP-001,Fournisseur A,visserie,2025-08-07,ordered,9761.13
PO-2025-0016,SUP-002,Fournisseur B,emballage,2025-07-17,received,11251.27
PO-2025-0017,SUP-001,Fournisseur A,visserie,2025-02-06,ordered,7957.67
PO-2025-0018,SUP-003,Fournisseur C,transport,2025-09-16,ordered,4198.67
PO-2025-0019,SUP-001,Fournisseur A,visserie,2025-02-08,received,8351.96

… 221 more lines

$ lm ask --scope followup-b --lang fr "Combien de commandes ont été annulées ?"
26 commandes ont été annulées.
  data as of: 2026-11-03T18:38:08.026728Z (last completed run)

  COUNT
  26
  1 row returned

  SQL: SELECT COUNT(*) FROM "connector"."v_followup_order_b" WHERE "status" = 'cancelled'
LIMIT 500
$ lm ask --scope followup-b --lang fr --previous "Combien de commandes ont été annulées ?" "Et pour le fournisseur SUP-003 ?"
7 commandes ont été annulées pour le fournisseur SUP-003.
  understood as: Combien de commandes ont été annulées pour le fournisseur SUP-003 ?
  data as of: 2026-11-03T18:38:08.026728Z (last completed run)

  COUNT
  7
  1 row returned

  SQL: SELECT COUNT(*) 
FROM "connector"."v_followup_order_b" 
WHERE "supplier_id" = 'SUP-003' AND "status" = 'cancelled'
LIMIT 500

$ lm ask --scope followup-b --lang fr --previous "Combien de commandes ont été annulées pour le fournisseur SUP-003 ?" "Et SUP-004 ?"
2 commandes ont été annulées pour le fournisseur SUP-004.
  understood as: Combien de commandes ont été annulées pour le fournisseur SUP-004 ?
  data as of: 2026-11-03T18:38:08.026728Z (last completed run)

  COUNT
  2
  1 row returned

  SQL: SELECT COUNT(*) 
FROM "connector"."v_followup_order_b" 
WHERE "supplier_id" = 'SUP-004' AND "status" = 'cancelled'
LIMIT 500
$ lm ask --scope followup-b --lang fr --previous "Combien de commandes ont été annulées ?" "Et celle de mardi dernier ?"
Je ne peux pas répondre à partir des données disponibles pour ce périmètre — la question ne correspond pas au schéma déclaré.
  understood as: Combien de commandes ont été annulées mardi dernier ?

Limits

  • The question understood comes from the model configured on the hub (qwen2.5-coder:7b here). The hub checks it before using it; another model may phrase it differently.
  • lm sends the previous question only when given it, with --previous.
  • Synthetic orders; one entity, one scope.

Purchasing · questions

A buyer chains questions.

"And SUP-004?"

They do not retype the whole question.

Synthetic orders

The problem

A follow-up alone means nothing.

  • "And SUP-004?" has no verb.
  • Without the question before, no answer.
  • And the buyer does not know what was understood.

What answers

26, then 7, then 2.

  • 26 cancelled orders.
  • 7 for SUP-003.
  • 2 for SUP-004.

What had to be written

lm ask --previous

The question before travels with the follow-up.

A 56-line scenario, two declaration files.

The question understood

Shown every time.

understood as
Combien de commandes ont été annulées pour le fournisseur SUP-004 ?

Real answer, replay of 3 November 2026.

A follow-up with no answer

"And last Tuesday's?"

  • Understood: the ones cancelled last Tuesday.
  • No column answers it.
  • No query, and it says so.

The limit

The question understood comes from the model.

  • Here qwen2.5-coder:7b, local.
  • The hub checks it before using it.
  • Another model may phrase it differently.

Try it

The scenario replays end to end.

Four questions: every answer is published with its question understood.

This scenario needs lumnik Pro.

See the editions →