The customer invoiced after its establishment closed found by place in the legacy export
Goal Offer each ERP customer the SIRET of its establishment, and spot the ones INSEE says are closed, by crossing the customer export with INSEE's public files through the GPS point.
With e-invoicing, the customer's SIREN becomes a mandatory mention. The legacy export has no reliable SIRET; INSEE publishes every establishment with its state and its GPS point. No common key: the link is the place.
- 5 customers get an active SIRET within 30 m
- 3 closed establishments within 30 m of a customer, each for a person to read
- one customer is still invoiced after the closure, with no active establishment beside it
code_client;raison_sociale;adresse;ville;latitude;longitude;derniere_facture C-101;Boulang. des Pentes;12, r. Garibaldi – Bât B;LYON;45,76020;4,85230;2026-10-15 C-102;Garage du Tonkin;31 avenue Salvador Allende;Villeurbanne;45,77190;4,89020;2026-10-28 C-103;Pharmacie de la Part-Dieu;Centre commercial Part-Dieu, niveau 1;Lyon;45,76090;4,85640;2026-10-21 C-104;Fleurs Saint-Jean;4 place Saint-Jean;Lyon;45,76080;4,82720;2026-10-30 C-105;Cave de Gerland;40 avenue Tony Garnier;Lyon;45,73060;4,83180;2026-10-17 C-106;Imprimerie de Vaise;18 rue de Bourgogne;Lyon;45,77420;4,80510;2026-09-30 C-107;Menuiserie Berliet;8, rue Marius Berliet;Saint-Priest;0;0;2026-10-09 C-108;Traiteur de la Guillotière;25 rue de Marseille;Lyon;45,75280;4,84270;2026-10-24
siret;x;y;qualite_xy;epsg;plg_qp24;plg_iris;plg_zus;plg_qp15;plg_qva;plg_code_commune;distance_precision;qualite_qp24;qualite_iris;qualite_zus;qualite_qp15;qualite_qva;y_latitude;x_longitude 91234567100012;843966.33;6519537.06;11;2154;HZ;0104;CSZ;HZ;CSZ;69386;;1;1;"";1;"";45.760240000;4.8523000000 92345678200015;846885.01;6520907.01;11;2154;HZ;0104;CSZ;HZ;CSZ;69266;;1;1;"";1;"";45.771950000;4.8902600000 93456789300024;844283.09;6519623.37;11;2154;HZ;0104;CSZ;HZ;CSZ;69383;;1;1;"";1;"";45.760950000;4.8564000000 94567890400011;844302.25;6519634.93;11;2154;HZ;0104;CSZ;HZ;CSZ;69383;;1;1;"";1;"";45.761050000;4.8566500000 95678901500010;842526.83;6520254.36;11;2154;HZ;0104;CSZ;HZ;CSZ;69385;;1;1;"";1;"";45.767000000;4.8340000000 95678901500028;842014.32;6519557.11;11;2154;HZ;0104;CSZ;HZ;CSZ;69385;;1;1;"";1;"";45.760830000;4.8272000000 96789012600013;842453.28;6516220.42;11;2154;HZ;0104;CSZ;HZ;CSZ;69387;;1;1;"";1;"";45.730700000;4.8318500000 97890123700019;842453.28;6516220.42;11;2154;HZ;0104;CSZ;HZ;CSZ;69387;;1;1;"";1;"";45.730700000;4.8318500000 98901234800017;840277.29;6521057.83;22;2154;HZ;0104;CSZ;HZ;CSZ;69389;120.4;1;1;"";1;"";45.774700000;4.8053000000 99012345900016;843239.56;6518695.83;11;2154;HZ;0104;CSZ;HZ;CSZ;69387;;1;1;"";1;"";45.752820000;4.8427000000 91234098700010;846879.72;6520933.54;11;2154;HZ;0104;CSZ;HZ;CSZ;69266;;1;1;"";1;"";45.772190000;4.8902000000 92340187600015;843238.80;6518728.02;11;2154;HZ;0104;CSZ;HZ;CSZ;69387;;1;1;"";1;"";45.753110000;4.8427000000 90123456000014;851305.27;6512633.10;11;2154;HZ;0104;CSZ;HZ;CSZ;69290;;1;1;"";1;"";45.696500000;4.9445000000
siren,nic,siret,statutDiffusionEtablissement,dateCreationEtablissement,trancheEffectifsEtablissement,anneeEffectifsEtablissement,activitePrincipaleRegistreMetiersEtablissement,dateDernierTraitementEtablissement,etablissementSiege,nombrePeriodesEtablissement,complementAdresseEtablissement,numeroVoieEtablissement,indiceRepetitionEtablissement,dernierNumeroVoieEtablissement,indiceRepetitionDernierNumeroVoieEtablissement,typeVoieEtablissement,libelleVoieEtablissement,codePostalEtablissement,libelleCommuneEtablissement,libelleCommuneEtrangerEtablissement,distributionSpecialeEtablissement,codeCommuneEtablissement,codeCedexEtablissement,libelleCedexEtablissement,codePaysEtrangerEtablissement,libellePaysEtrangerEtablissement,identifiantAdresseEtablissement,coordonneeLambertAbscisseEtablissement,coordonneeLambertOrdonneeEtablissement,complementAdresse2Etablissement,numeroVoie2Etablissement,indiceRepetition2Etablissement,typeVoie2Etablissement,libelleVoie2Etablissement,codePostal2Etablissement,libelleCommune2Etablissement,libelleCommuneEtranger2Etablissement,distributionSpeciale2Etablissement,codeCommune2Etablissement,codeCedex2Etablissement,libelleCedex2Etablissement,codePaysEtranger2Etablissement,libellePaysEtranger2Etablissement,dateDebut,etatAdministratifEtablissement,enseigne1Etablissement,enseigne2Etablissement,enseigne3Etablissement,denominationUsuelleEtablissement,activitePrincipaleEtablissement,nomenclatureActivitePrincipaleEtablissement,caractereEmployeurEtablissement,activitePrincipaleNAF25Etablissement 912345671,00012,91234567100012,O,2010-01-01,,,,2026-10-28T09:12:44,true,2,,12,,,,RUE,GARIBALDI,69006,LYON 6E ARRONDISSEMENT,,,69386,,,,,,,,,,,,,,,,,,,,,,2026-06-30,F,BOULANGERIE DES PENTES,,,,10.71C,NAFRev2,N, 923456782,00015,92345678200015,O,2011-03-01,,,,2026-10-28T09:12:44,true,1,,31,,,,AV,SALVADOR ALLENDE,69100,VILLEURBANNE,,,69266,,,,,,,,,,,,,,,,,,,,,,2011-03-01,A,GARAGE DU TONKIN,,,,45.20A,NAFRev2,N, 934567893,00024,93456789300024,O,2008-09-15,,,,2026-10-28T09:12:44,true,1,,17,,,,RUE,DU DOCTEUR BOUCHUT,69003,LYON 3E ARRONDISSEMENT,,,69383,,,,,,,,,,,,,,,,,,,,,,2008-09-15,A,PHARMACIE DE LA PART-DIEU,,,,47.73Z,NAFRev2,N, 945678904,00011,94567890400011,O,2010-01-01,,,,2026-10-28T09:12:44,true,2,,17,,,,RUE,DU DOCTEUR BOUCHUT,69003,LYON 3E ARRONDISSEMENT,,,69383,,,,,,,,,,,,,,,,,,,,,,2025-12-31,F,OPTIQUE BOUCHUT,,,,47.78A,NAFRev2,N, 956789015,00010,95678901500010,O,2010-01-01,,,,2026-10-28T09:12:44,false,2,,2,,,,RUE,SAINT-JEAN,69005,LYON 5E ARRONDISSEMENT,,,69385,,,,,,,,,,,,,,,,,,,,,,2024-01-31,F,FLEURS SAINT-JEAN,,,,47.76Z,NAFRev2,N, 956789015,00028,95678901500028,O,2024-02-01,,,,2026-10-28T09:12:44,true,1,,4,,,,PL,SAINT-JEAN,69005,LYON 5E ARRONDISSEMENT,,,69385,,,,,,,,,,,,,,,,,,,,,,2024-02-01,A,FLEURS SAINT-JEAN,,,,47.76Z,NAFRev2,N, 967890126,00013,96789012600013,O,2010-01-01,,,,2026-10-28T09:12:44,true,2,,40,,,,AV,TONY GARNIER,69007,LYON 7E ARRONDISSEMENT,,,69387,,,,,,,,,,,,,,,,,,,,,,2026-03-31,F,CAVE DE GERLAND,,,,47.25Z,NAFRev2,N, 978901237,00019,97890123700019,O,2026-04-01,,,,2026-10-28T09:12:44,true,1,,40,,,,AV,TONY GARNIER,69007,LYON 7E ARRONDISSEMENT,,,69387,,,,,,,,,,,,,,,,,,,,,,2026-04-01,A,CAVE DE GERLAND,,,LES VINS DE GERLAND,47.25Z,NAFRev2,N, 989012348,00017,98901234800017,O,2002-05-02,,,,2026-10-28T09:12:44,true,1,,18,,,,RUE,DE BOURGOGNE,69009,LYON 9E ARRONDISSEMENT,,,69389,,,,,,,,,,,,,,,,,,,,,,2002-05-02,A,IMPRIMERIE DE VAISE,,,,18.12Z,NAFRev2,N, 990123459,00016,99012345900016,O,2015-10-12,,,,2026-10-28T09:12:44,true,1,,25,,,,RUE,DE MARSEILLE,69007,LYON 7E ARRONDISSEMENT,,,69387,,,,,,,,,,,,,,,,,,,,,,2015-10-12,A,TRAITEUR DE LA GUILLOTIERE,,,,56.21Z,NAFRev2,N, 912340987,00010,91234098700010,O,2019-06-03,,,,2026-10-28T09:12:44,true,1,,29,,,,AV,SALVADOR ALLENDE,69100,VILLEURBANNE,,,69266,,,,,,,,,,,,,,,,,,,,,,2019-06-03,A,BOUCHERIE DU TONKIN,,,,47.22Z,NAFRev2,N, 923401876,00015,92340187600015,O,2010-01-01,,,,2026-10-28T09:12:44,true,2,,21,,,,RUE,DE MARSEILLE,69007,LYON 7E ARRONDISSEMENT,,,69387,,,,,,,,,,,,,,,,,,,,,,2025-09-30,F,PRESSING DE MARSEILLE,,,,96.01B,NAFRev2,N, 901234560,00014,90123456000014,O,1998-01-05,,,,2026-10-28T09:12:44,true,1,,8,,,,RUE,MARIUS BERLIET,69800,SAINT-PRIEST,,,69290,,,,,,,,,,,,,,,,,,,,,,1998-01-05,A,MENUISERIE BERLIET,,,,16.23Z,NAFRev2,N,
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-erp-customers-a connector_type: csv-file scopes: [billing-a]spec: transport: kind: local path: /tmp/lumnik-scenario/customer-closed-at-insee/a/customers.csv parser: delimiter: ";" after_process: none mapping: cell: - parse-coordinates: lat: latitude lon: longitude within: [41.0, -5.5, 51.5, 10.0] # south, west, north, east: metropolitan France reason: coord_issue # why a pair was emptiedapiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-insee-geoloc-a connector_type: csv-file scopes: [billing-a]spec: transport: kind: local path: /tmp/lumnik-scenario/customer-closed-at-insee/a/sirene-geolocalisation.csv parser: delimiter: ";" after_process: none mapping: cell: - parse-coordinates: lat: y_latitude # INSEE gives degrees too, beside its Lambert 93 x and y lon: x_longitude within: [41.0, -5.5, 51.5, 10.0] reason: coord_issueapiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-insee-sirene-a connector_type: csv-file scopes: [billing-a]spec: transport: kind: local path: /tmp/lumnik-scenario/customer-closed-at-insee/a/sirene-etablissements.csv parser: delimiter: "," after_process: none$ lm apply -f 10-customers.yaml
Applied connector "scenario-erp-customers-a" — 1 endpoint
$ lm apply -f 11-insee-geolocation.yaml
Applied connector "scenario-insee-geoloc-a" — 1 endpoint
$ lm apply -f 12-insee-establishments.yaml
Applied connector "scenario-insee-sirene-a" — 1 endpoint
$ lm connector run scenario-erp-customers-a
run scheduled: a8ef8760-922a-436a-9b96-8881c8ce558d
$ lm run get a8ef8760-922a-436a-9b96-8881c8ce558d
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
a8ef8760 scenario-erp-customers-a default Completed 8 8 0 0 2026-11-14 02:07 2026-11-14 02:07 no
⚠ 1 cell(s) not delivered as declared (a hook, or a promoted value of the wrong type) — the rows were still written
$ lm connector run scenario-insee-geoloc-a
run scheduled: 9ffc9642-fe1c-4d67-8290-f3c31ac569f8
$ lm run get 9ffc9642-fe1c-4d67-8290-f3c31ac569f8
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
9ffc9642 scenario-insee-geoloc-a default Completed 13 13 0 0 2026-11-14 02:07 2026-11-14 02:07 no
$ lm connector run scenario-insee-sirene-a
run scheduled: beb94e1b-3eaa-4c20-a293-08953e985984
$ lm run get beb94e1b-3eaa-4c20-a293-08953e985984
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
beb94e1b scenario-insee-sirene-a default Completed 13 13 0 0 2026-11-14 02:07 2026-11-14 02:07 yes- scenario-erp-customers-a
- Completed · IN 8 · OUT 8 · cell_errors 1
- scenario-insee-geoloc-a
- Completed · IN 13 · OUT 13 · cell_errors 0
- scenario-insee-sirene-a
- Completed · IN 13 · OUT 13 · cell_errors 0
evidence: replay.log, insee.txt, customers.json, establishments.txt, establishments.json, run-scenario-erp-customers-a.txt, run-scenario-erp-customers-a.json, run-scenario-insee-geoloc-a.txt, run-scenario-insee-geoloc-a.json, run-scenario-insee-sirene-a.txt, run-scenario-insee-sirene-a.json, 01-active.txt, 01-active.json, 02-closed.txt, 02-closed.json, 03-another.txt, 03-another.json, 04-insee.txt, 04-insee.json · transform v1
kind: Entityname: client_alabel: Clientdescription: "A customer account of the ERP, with the date of its last invoice and the GPS point of its shop; coord_issue says why a point was set aside."match: [customer_no]scopes: [billing-a]columns: customer_no: label: "Code client" name: label: "Raison sociale" address: label: "Adresse" city: label: "Ville" latitude: label: "Latitude" longitude: label: "Longitude" coord_issue: label: "Coordonnées: remarque" last_invoice: label: "Dernière facture"sources: - table: t_scenario_erp_customers_a map: code_client: customer_no raison_sociale: name adresse: address ville: city latitude: latitude longitude: longitude coord_issue: coord_issue derniere_facture: last_invoicepoints: - name: shop # the chat may measure a distance from this point lat: latitude lon: longitudekind: Entityname: etablissement_alabel: Établissement INSEEdescription: "An establishment of the INSEE Sirene register: its SIRET, its sign, whether it is active or closed, and where INSEE places it."match: [siret]scopes: [billing-a]columns: siret: label: "SIRET" sign: label: "Enseigne" state: label: "État administratif (A actif, F fermé)" period_start: label: "Début de la période en cours (dateDebut)" street: label: "Voie" commune: label: "Commune" latitude: label: "Latitude" longitude: label: "Longitude"sources: - table: t_scenario_insee_sirene_a # the stock: state, sign, address map: siret: siret enseigne1Etablissement: sign etatAdministratifEtablissement: state dateDebut: period_start libelleVoieEtablissement: street libelleCommuneEtablissement: commune - table: t_scenario_insee_geoloc_a # the geolocation: the point, by SIRET map: siret: siret y_latitude: latitude x_longitude: longitudepoints: - name: site lat: latitude lon: longitude$ lm entity apply -f 20-customer.yaml
Applied entity "client_a" → connector."v_client_a"
$ lm entity apply -f 21-establishment.yaml
Applied entity "etablissement_a" → connector."v_etablissement_a"
$ lm entity get etablissement_a
SIRET SIGN STATE PERIOD_START STREET COMMUNE LATITUDE LONGITUDE _CONFLICTS
90123456000014 MENUISERIE BERLIET A 1998-01-05 MARIUS BERLIET SAINT-PRIEST 45.6965 4.9445 {}
91234098700010 BOUCHERIE DU TONKIN A 2019-06-03 SALVADOR ALLENDE VILLEURBANNE 45.77219 4.8902 {}
91234567100012 BOULANGERIE DES PENTES F 2026-06-30 GARIBALDI LYON 6E ARRONDISSEMENT 45.76024 4.8523 {}
92340187600015 PRESSING DE MARSEILLE F 2025-09-30 DE MARSEILLE LYON 7E ARRONDISSEMENT 45.75311 4.8427 {}
92345678200015 GARAGE DU TONKIN A 2011-03-01 SALVADOR ALLENDE VILLEURBANNE 45.77195 4.89026 {}
93456789300024 PHARMACIE DE LA PART-DIEU A 2008-09-15 DU DOCTEUR BOUCHUT LYON 3E ARRONDISSEMENT 45.76095 4.8564 {}
94567890400011 OPTIQUE BOUCHUT F 2025-12-31 DU DOCTEUR BOUCHUT LYON 3E ARRONDISSEMENT 45.76105 4.85665 {}
95678901500010 FLEURS SAINT-JEAN F 2024-01-31 SAINT-JEAN LYON 5E ARRONDISSEMENT 45.767 4.834 {}
95678901500028 FLEURS SAINT-JEAN A 2024-02-01 SAINT-JEAN LYON 5E ARRONDISSEMENT 45.76083 4.8272 {}
96789012600013 CAVE DE GERLAND F 2026-03-31 TONY GARNIER LYON 7E ARRONDISSEMENT 45.7307 4.83185 {}
97890123700019 CAVE DE GERLAND A 2026-04-01 TONY GARNIER LYON 7E ARRONDISSEMENT 45.7307 4.83185 {}
98901234800017 IMPRIMERIE DE VAISE A 2002-05-02 DE BOURGOGNE LYON 9E ARRONDISSEMENT 45.7747 4.8053 {}
99012345900016 TRAITEUR DE LA GUILLOTIERE A 2015-10-12 DE MARSEILLE LYON 7E ARRONDISSEMENT 45.75282 4.8427 {}- points
- 7 / 8
- C-107
- outside the declared area
- establishments
- A 8 · F 5
evidence: replay.log, insee.txt, customers.json, establishments.txt, establishments.json, run-scenario-erp-customers-a.txt, run-scenario-erp-customers-a.json, run-scenario-insee-geoloc-a.txt, run-scenario-insee-geoloc-a.json, run-scenario-insee-sirene-a.txt, run-scenario-insee-sirene-a.json, 01-active.txt, 01-active.json, 02-closed.txt, 02-closed.json, 03-another.txt, 03-another.json, 04-insee.txt, 04-insee.json · transform v1
$ lm ask --scope billing-a --lang fr "Pour chaque client, quels établissements actifs sont à moins de 30 m de lui ?"
Il y a 5 établissements actifs à moins de 30 mètres de chaque client. Les détails sont les suivants :
1. **Client : C-102, Nom : Garage du Tonkin, Établissement : 92345678200015, Signe : GARAGE DU TONKIN**
2. **Client : C-103, Nom : Pharmacie de la Part-Dieu, Établissement : 93456789300024, Signe : PHARMACIE DE LA PART-DIEU**
3. **Client : C-104, Nom : Fleurs Saint-Jean, Établissement : 95678901500028, Signe : FLEURS SAINT-JEAN**
4. **Client : C-105, Nom : Cave de Gerland, Établissement : 97890123700019, Signe : CAVE DE GERLAND**
5. **Client : C-108, Nom : Traiteur de la Guillotière, Établissement : 99012345900016, Signe : TRAITEUR DE LA GUILLOTIERE**
Total : 5 établissements
data as of: 2026-11-14T01:07:05.150191Z (last completed run)
CUSTOMER_NO NAME SIRET SIGN
C-102 Garage du Tonkin 92345678200015 GARAGE DU TONKIN
C-103 Pharmacie de la Part-Dieu 93456789300024 PHARMACIE DE LA PART-DIEU
C-104 Fleurs Saint-Jean 95678901500028 FLEURS SAINT-JEAN
C-105 Cave de Gerland 97890123700019 CAVE DE GERLAND
C-108 Traiteur de la Guillotière 99012345900016 TRAITEUR DE LA GUILLOTIERE
5 rows returned
SQL: SELECT
c."customer_no",
c."name",
e."siret",
e."sign"
FROM
"connector"."v_client_a" c
JOIN
"connector"."v_etablissement_a" e
ON
connector.distance_m(c."latitude", c."longitude", e."latitude", e."longitude") <= 30
WHERE
e."state" = 'A'
LIMIT 500- Pour chaque client, quels établissements actifs sont à moins de 30 m de lui ?
- 5
- C-102
- 92345678200015 · GARAGE DU TONKIN
- C-103
- 93456789300024 · PHARMACIE DE LA PART-DIEU
- C-104
- 95678901500028 · FLEURS SAINT-JEAN
- C-105
- 97890123700019 · CAVE DE GERLAND
- C-108
- 99012345900016 · TRAITEUR DE LA GUILLOTIERE
- SQL · 01-active
- SELECT c."customer_no", c."name", e."siret", e."sign" FROM "connector"."v_client_a" c JOIN "connector"."v_etablissement_a" e ON connector.distance_m(c."latitude", c."longitude", e."latitude", e."longitude") <= 30 WHERE e."state" = 'A' LIMIT 500
evidence: replay.log, insee.txt, customers.json, establishments.txt, establishments.json, run-scenario-erp-customers-a.txt, run-scenario-erp-customers-a.json, run-scenario-insee-geoloc-a.txt, run-scenario-insee-geoloc-a.json, run-scenario-insee-sirene-a.txt, run-scenario-insee-sirene-a.json, 01-active.txt, 01-active.json, 02-closed.txt, 02-closed.json, 03-another.txt, 03-another.json, 04-insee.txt, 04-insee.json · transform v1
$ lm ask --scope billing-a --lang fr "Pour chaque client, quels établissements fermés sont à moins de 30 m de lui ?"
Il y a 3 établissements fermés à moins de 30 m de chaque client. Les détails sont les suivants :
1. **Boulang. des Pentes** (SIRET : 91234567100012)
2. **Pharmacie de la Part-Dieu** (SIRET : 94567890400011)
3. **Cave de Gerland** (SIRET : 96789012600013)
data as of: 2026-11-14T01:07:05.150191Z (last completed run)
CUSTOMER_NO NAME SIRET SIGN
C-101 Boulang. des Pentes 91234567100012 BOULANGERIE DES PENTES
C-103 Pharmacie de la Part-Dieu 94567890400011 OPTIQUE BOUCHUT
C-105 Cave de Gerland 96789012600013 CAVE DE GERLAND
3 rows returned
SQL: SELECT
c."customer_no",
c."name",
e."siret",
e."sign"
FROM
"connector"."v_client_a" c
JOIN
"connector"."v_etablissement_a" e
ON
connector.distance_m(c."latitude", c."longitude", e."latitude", e."longitude") <= 30
WHERE
e."state" = 'F'
LIMIT 500- Pour chaque client, quels établissements fermés sont à moins de 30 m de lui ?
- 3
- C-101
- 91234567100012 · BOULANGERIE DES PENTES
- C-103
- 94567890400011 · OPTIQUE BOUCHUT
- C-105
- 96789012600013 · CAVE DE GERLAND
- SQL · 02-closed
- SELECT c."customer_no", c."name", e."siret", e."sign" FROM "connector"."v_client_a" c JOIN "connector"."v_etablissement_a" e ON connector.distance_m(c."latitude", c."longitude", e."latitude", e."longitude") <= 30 WHERE e."state" = 'F' LIMIT 500
evidence: replay.log, insee.txt, customers.json, establishments.txt, establishments.json, run-scenario-erp-customers-a.txt, run-scenario-erp-customers-a.json, run-scenario-insee-geoloc-a.txt, run-scenario-insee-geoloc-a.json, run-scenario-insee-sirene-a.txt, run-scenario-insee-sirene-a.json, 01-active.txt, 01-active.json, 02-closed.txt, 02-closed.json, 03-another.txt, 03-another.json, 04-insee.txt, 04-insee.json · transform v1
$ lm ask --scope billing-a --lang fr "Quels clients sont à moins de 30 m d'un établissement fermé ?"
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é.
$ lm ask --scope billing-a --lang fr "Pour chaque client, quels établissements INSEE sont à moins de 30 m de lui ?"
Il y a 8 établissements INSEE à moins de 30 mètres de chaque client. Les clients sont : Boulang. des Pentes, Garage du Tonkin, Pharmacie de la Part-Dieu, Fleur Saint-Jean, Cave de Gerland et Traiteur de la Guillotière.
data as of: 2026-11-14T01:07:05.150191Z (last completed run)
CUSTOMER_NO NAME SIRET SIGN
C-101 Boulang. des Pentes 91234567100012 BOULANGERIE DES PENTES
C-102 Garage du Tonkin 92345678200015 GARAGE DU TONKIN
C-103 Pharmacie de la Part-Dieu 93456789300024 PHARMACIE DE LA PART-DIEU
C-103 Pharmacie de la Part-Dieu 94567890400011 OPTIQUE BOUCHUT
C-104 Fleurs Saint-Jean 95678901500028 FLEURS SAINT-JEAN
C-105 Cave de Gerland 96789012600013 CAVE DE GERLAND
C-105 Cave de Gerland 97890123700019 CAVE DE GERLAND
C-108 Traiteur de la Guillotière 99012345900016 TRAITEUR DE LA GUILLOTIERE
8 rows returned
SQL: SELECT
c."customer_no",
c."name",
e."siret",
e."sign"
FROM
"connector"."v_client_a" c
JOIN
"connector"."v_etablissement_a" e
ON
connector.distance_m(c."latitude", c."longitude", e."latitude", e."longitude") <= 30
LIMIT 500- Quels clients sont à moins de 30 m d'un établissement fermé ?
- 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é.
- Pour chaque client, quels établissements INSEE sont à moins de 30 m de lui ?
- 8 · C-101:91234567100012 C-102:92345678200015 C-103:93456789300024 C-103:94567890400011 C-104:95678901500028 C-105:96789012600013 C-105:97890123700019 C-108:99012345900016
evidence: replay.log, insee.txt, customers.json, establishments.txt, establishments.json, run-scenario-erp-customers-a.txt, run-scenario-erp-customers-a.json, run-scenario-insee-geoloc-a.txt, run-scenario-insee-geoloc-a.json, run-scenario-insee-sirene-a.txt, run-scenario-insee-sirene-a.json, 01-active.txt, 01-active.json, 02-closed.txt, 02-closed.json, 03-another.txt, 03-another.json, 04-insee.txt, 04-insee.json · transform v1
Limits
- The wording matters, and the model's (qwen2.5-coder:7b) path varies with the card: across the preparation rehearsals, "… d'un établissement fermé?" got an abstention with no SQL, a query the guard refused, or the right list. The guard refuses a measure made through a sub-query, even a right one. All questions were asked in French.
- INSEE's point is not always the door. With qualite_xy 12 the street is sure but the position along it is random; with 22 the street itself is only probable: within 120.4 m for C-106's print shop.
- The link is the place, not the name: "Boulang. des Pentes" and "BOULANGERIE DES PENTES" are compared by eye. In a shopping centre, 30 m covers dozens of establishments: the list becomes a list of candidates.
- The answer's sentence is written by the model: here it says "of each customer" when two customers have none, mixes a customer's name with the SIRET next door, misspells a sign. The table and the SQL are what counts.
- The national files, 1.1 GB and 2.9 GB compressed, were not loaded: their volume is not measured here.
- INSEE announces the end of the geolocation CSV in the second half of 2027, for Parquet only, which csv-file does not read.
- The November 2026 file codes the state A or F. The Sirene V4 API splits it into several codes.
- Invented establishments and SIRETs: they fail the Luhn check on purpose, none is real. The files keep INSEE's real format.
This scenario needs lumnik Pro.
See the editions →