Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'district_store:WH_0042', 'commodity_category': 'medical_devices_consumables', 'year': 2023, 'month': 8}) -> {'status': 'ok', 'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'year': 2023, 'month': 8, 'reported_issue': 'temperature_excursion', 'has_issue': True, 'signals': ['FEFO compliance failed', 'low inventory accuracy (10.0%)', 'high wastage (38.4%)', 'active stockout'], 'uncertain': True}

Q: why is WH_0042 at the district_store failing fulfillment for medical devices consumables?
A:

Chosen response:
FACTS: WH_0042 (district_store, 8/2023): reported issue = temperature_excursion. other signals: FEFO compliance failed; low inventory accuracy (10.0%); high wastage (38.4%); active stockout (note: report not submitted, numbers may be provisional)
RECOMMENDATION: address the reported issue (temperature_excursion).

Rejected response: not sure, you'd have to check the system yourself

FEFO compliance failed
low inventory accuracy (10.0%)
high wastage (38.4%)
active stockout


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'uid': 'district_store:WH_0037'}) -> [{'uid': 'district_store:WH_0037', 'warehouse_id': 'WH_0037', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'risk_score': 5.5, 'risk_factors': ['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']}]

Q: is WH_0037 at the district_store at risk of running short on anything?
A:

Chosen response:
FACTS: top shortage risk (uid=district_store:WH_0037) is WH_0037 (district_store, contraceptives), score=5.5, factors=['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']
RECOMMENDATION: focus replenishment planning on WH_0037 (district_store).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'warehouse_level': 'national_CMS'}) -> [{'uid': 'national_CMS:WH_0088', 'warehouse_id': 'WH_0088', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'orders_backordered': 32, 'backorder_rate_pct': 61.5}, {'uid': 'national_CMS:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 32, 'backorder_rate_pct': 59.3}, {'uid': 'national_CMS:WH_0041', 'warehouse_id': 'WH_0041', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 23, 'backorder_rate_pct': 52.3}, {'uid': 'national_CMS:WH_0001', 'warehouse_id': 'WH_0001', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 26, 'backorder_rate_pct': 50.0}, {'uid': 'national_CMS:WH_0040', 'warehouse_id': 'WH_0040', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'orders_backordered': 27, 'backorder_rate_pct': 45.8}, '... and 63 more']

Q: which items are backordered in the national_CMS tier?
A:

Chosen response:
FACTS: 68 backordered records (warehouse_level=national_CMS). worst: WH_0088 (national_CMS, malaria_commodities) at 61.5% backorder rate
RECOMMENDATION: expedite WH_0088 (national_CMS).

Rejected response:
FACTS: 102.2 backordered records (warehouse_level=national_CMS). worst: WH_0088 (national_CMS, malaria_commodities) at 61.5% backorder rate
RECOMMENDATION: expedite WH_0088 (national_CMS).


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'warehouse_level': 'district_store'}) -> [{'uid': 'district_store:WH_0067', 'warehouse_id': 'WH_0067', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'ARVs', 'orders_backordered': 3, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0012', 'warehouse_id': 'WH_0012', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0017', 'warehouse_id': 'WH_0017', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, '... and 60 more']

Q: which items are backordered in the district_store tier?
A:

Chosen response:
FACTS: 65 backordered records (warehouse_level=district_store). worst: WH_0067 (district_store, surgical_supplies) at 100.0% backorder rate
RECOMMENDATION: expedite WH_0067 (district_store).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'district_store:WH_0075'}) -> [{'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'facilities_affected_by_stockout': 1}]

Q: does WH_0075 at the district_store currently have any active stockouts?
A:

Chosen response:
FACTS: 2 active stockouts (uid=district_store:WH_0075). worst: WH_0075 (district_store, PPE_IPC_supplies), 2 facilities hit
RECOMMENDATION: prioritize WH_0075 (district_store) first.

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'uid': 'national_CMS:WH_0026'}) -> {'n_records': 1, 'avg_inventory_accuracy_pct': 76.0, 'avg_order_fulfilment_rate_pct': 62.7, 'months_with_stockout': 0, 'issue_counts': {'FEFO_not_followed': 1}, 'uid': 'national_CMS:WH_0026', 'warehouse_id': 'WH_0026', 'warehouse_level': 'national_CMS'}

Q: how is WH_0026 at the national_CMS doing overall?
A:

Chosen response:
FACTS: WH_0026 (national_CMS): avg inventory accuracy 76.0%, avg fulfilment 62.7%, 0 months w/ stockout (based on 1 records), issues on record: {'FEFO_not_followed': 1}
RECOMMENDATION: looks fine.

Rejected response:
FACTS: WH_0026 (national_CMS): avg inventory accuracy 76.0%, avg fulfilment 62.7%, 0 months w/ stockout (based on 1 records), issues on record: {'FEFO_not_followed': 1}
RECOMMENDATION: Not sure. To get more information, I would need to check further.
FACTS: WH_0026 (national_CMS): avg inventory accuracy 76.0%, avg fulfilment 62.7%, 0 months w/ stockout (based on 1 records), issues on record: {'FEFO_not_followed': 1}
RECOMMENDATION: Not sure. To get more information, I would need to check further.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'compare_by': 'warehouse_level', 'compare_values': ['district_store', 'national_CMS']}) -> {'_grouped_by': 'warehouse_level', 'groups': {'district_store': [{'uid': 'district_store:WH_0022', 'warehouse_id': 'WH_0022', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'facilities_affected_by_stockout': 13}, {'uid': 'district_store:WH_0014', 'warehouse_id': 'WH_0014', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 7}, {'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'facilities_affected_by_stockout': 6}, {'uid': 'district_store:WH_0012', 'warehouse_id': 'WH_0012', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'facilities_affected_by_stockout': 5}, {'uid': 'district_store:WH_0041', 'warehouse_id': 'WH_0041', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'facilities_affected_by_stockout': 3}, {'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 3}, {'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0070', 'warehouse_id': 'WH_0070', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0024', 'warehouse_id': 'WH_0024', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0054', 'warehouse_id': 'WH_0054', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0078', 'warehouse_id': 'WH_0078', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0087', 'warehouse_id': 'WH_0087', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0026', 'warehouse_id': 'WH_0026', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0045', 'warehouse_id': 'WH_0045', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0068', 'warehouse_id': 'WH_0068', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0001', 'warehouse_id': 'WH_0001', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0094', 'warehouse_id': 'WH_0094', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'facilities_affected_by_stockout': 2}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'ARVs', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0028', 'warehouse_id': 'WH_0028', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0006', 'warehouse_id': 'WH_0006', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0094', 'warehouse_id': 'WH_0094', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0005', 'warehouse_id': 'WH_0005', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'facilities_affected_by_stockout': 1}, {'uid': 'district_store:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0067', 'warehouse_id': 'WH_0067', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0071', 'warehouse_id': 'WH_0071', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0098', 'warehouse_id': 'WH_0098', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0019', 'warehouse_id': 'WH_0019', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0069', 'warehouse_id': 'WH_0069', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0010', 'warehouse_id': 'WH_0010', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0018', 'warehouse_id': 'WH_0018', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0007', 'warehouse_id': 'WH_0007', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'facilities_affected_by_stockout': 0}, {'uid': 'district_store:WH_0019', 'warehouse_id': 'WH_0019', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 0}], 'national_CMS': [{'uid': 'national_CMS:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'facilities_affected_by_stockout': 108}, {'uid': 'national_CMS:WH_0074', 'warehouse_id': 'WH_0074', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'facilities_affected_by_stockout': 60}, {'uid': 'national_CMS:WH_0060', 'warehouse_id': 'WH_0060', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 36}, {'uid': 'national_CMS:WH_0008', 'warehouse_id': 'WH_0008', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 14}, {'uid': 'national_CMS:WH_0015', 'warehouse_id': 'WH_0015', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 14}, {'uid': 'national_CMS:WH_0003', 'warehouse_id': 'WH_0003', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'facilities_affected_by_stockout': 7}, {'uid': 'national_CMS:WH_0002', 'warehouse_id': 'WH_0002', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'facilities_affected_by_stockout': 5}, {'uid': 'national_CMS:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 5}, {'uid': 'national_CMS:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'facilities_affected_by_stockout': 3}, {'uid': 'national_CMS:WH_0096', 'warehouse_id': 'WH_0096', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'facilities_affected_by_stockout': 0}]}}

Q: how do district_store and national_CMS compare on stockouts?
A:

Chosen response:
FACTS: stockouts by warehouse_level: district_store: 38 stockouts, worst WH_0022 (laboratory_reagents, 13 facilities); national_CMS: 10 stockouts, worst WH_0046 (malaria_commodities, 108 facilities)
RECOMMENDATION: prioritize the national_CMS group first - most facilities affected.

Rejected response:
FACTS: stockouts by warehouse_level: district_store: 38 stockouts, worst WH_0022 (laboratory_reagents, 13 facilities); national_CMS: 10 stockouts, worst WH_0046 (malaria_commodities, 108 facilities)
RECOMMENDATION: Not sure. (Not enough information to determine)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'compare_by': 'region_type', 'compare_values': ['peri_urban', 'rural']}) -> {'_grouped_by': 'region_type', 'groups': {'rural': {'n_records': 87, 'avg_inventory_accuracy_pct': 42.2, 'avg_order_fulfilment_rate_pct': 42.5, 'months_with_stockout': 45, 'issue_counts': {'theft_pilferage': 5, 'expired_stock': 5, 'stock_record_discrepancy': 9, 'temperature_excursion': 8, 'FEFO_not_followed': 10, 'damaged_goods': 8, 'overstocking': 9, 'receiving_error': 9, 'understocking': 9, 'dispatch_error': 6, 'pest_infestation': 6}}, 'peri_urban': {'n_records': 68, 'avg_inventory_accuracy_pct': 53.2, 'avg_order_fulfilment_rate_pct': 55.1, 'months_with_stockout': 20, 'issue_counts': {'theft_pilferage': 7, 'expired_stock': 8, 'FEFO_not_followed': 7, 'overstocking': 6, 'dispatch_error': 5, 'pest_infestation': 7, 'damaged_goods': 5, 'understocking': 5, 'receiving_error': 7, 'temperature_excursion': 4, 'stock_record_discrepancy': 3}}}}

Q: how do peri_urban and rural compare on kpis?
A:

Chosen response:
FACTS: kpis by region_type: peri_urban: avg inventory accuracy 53.2%, avg fulfilment 55.1%, 20 months w/ stockout; rural: avg inventory accuracy 42.2%, avg fulfilment 42.5%, 45 months w/ stockout
RECOMMENDATION: review the rural group first - most months with a stockout.

Rejected response: FACTS: review the rural group first - most months with a stockout.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'uid': 'national_CMS:WH_0011'}) -> {'n_records': 1, 'avg_inventory_accuracy_pct': 75.0, 'avg_order_fulfilment_rate_pct': 75.5, 'months_with_stockout': 0, 'issue_counts': {'dispatch_error': 1}, 'uid': 'national_CMS:WH_0011', 'warehouse_id': 'WH_0011', 'warehouse_level': 'national_CMS'}

Q: how is WH_0011 at the national_CMS doing overall?
A:

Chosen response:
FACTS: WH_0011 (national_CMS): avg inventory accuracy 75.0%, avg fulfilment 75.5%, 0 months w/ stockout (based on 1 records), issues on record: {'dispatch_error': 1}
RECOMMENDATION: looks fine.

Rejected response:
FACTS: WH_0011 (national_CMS): avg inventory accuracy 108.6%, avg fulfilment 75.5%, 0 months w/ stockout (based on 1 records), issues on record: {'dispatch_error': 1}
RECOMMENDATION: looks fine.
FACTS: WH_0011 (national_CMS): avg inventory accuracy 108.6%, avg fulfilment 75.5%, 0 months w/ stockout (based on 1 records), issues on record: {'dispatch_error': 1}
RECOMMENDATION: looks fine.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'national_CMS:WH_0034'}) -> [{'uid': 'national_CMS:WH_0034', 'warehouse_id': 'WH_0034', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 10, 'backorder_rate_pct': 20.4}, {'uid': 'national_CMS:WH_0034', 'warehouse_id': 'WH_0034', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 10.3}, {'uid': 'national_CMS:WH_0034', 'warehouse_id': 'WH_0034', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 7.0}]

Q: which category has the most backorders at WH_0034 at the national_CMS?
A:

Chosen response:
FACTS: 3 backordered records (uid=national_CMS:WH_0034). worst: WH_0034 (national_CMS, IV_fluids) at 20.4% backorder rate
RECOMMENDATION: expedite WH_0034 (national_CMS).

Rejected response:
FACTS: 3 backordered records (uid=national_CMS:WH_0034). worst: WH_0034 (national_CMS, IV_fluids) at 20.4% backorder rate
RECOMMENDATION: Not sure. (Not enough information)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'uid': 'national_CMS:WH_0050'}) -> [{'uid': 'national_CMS:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'risk_score': 5.5, 'risk_factors': ['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']}]

Q: is WH_0050 at the national_CMS at risk of running short on anything?
A:

Chosen response:
FACTS: top shortage risk (uid=national_CMS:WH_0050) is WH_0050 (national_CMS, laboratory_reagents), score=5.5, factors=['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']
RECOMMENDATION: focus replenishment planning on WH_0050 (national_CMS).

Rejected response:
FACTS: top shortage risk (uid=national_CMS:WH_0050) is WH_0050 (national_CMS, laboratory_reagents), score=5.5, factors=['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']
RECOMMENDATION: Not sure. (Not enough information)
FACTS: top shortage risk (uid=national_CMS:WH_0050) is WH_0050 (national_CMS, laboratory_reagents), score=5.5, factors=['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']
RECOMMENDATION: Not sure. (Not enough information)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'national_CMS:WH_0026', 'commodity_category': 'surgical_supplies', 'year': 2022, 'month': 2}) -> {'status': 'ok', 'uid': 'national_CMS:WH_0026', 'warehouse_id': 'WH_0026', 'warehouse_level': 'national_CMS', 'year': 2022, 'month': 2, 'reported_issue': 'FEFO_not_followed', 'has_issue': True, 'signals': ['low inventory accuracy (76.0%)', 'high wastage (6.3%)']}

Q: why is WH_0026 at the national_CMS failing fulfillment for surgical supplies?
A:

Chosen response:
FACTS: WH_0026 (national_CMS, 2/2022): reported issue = FEFO_not_followed. other signals: low inventory accuracy (76.0%); high wastage (6.3%)
RECOMMENDATION: address the reported issue (FEFO_not_followed).

Rejected response: not sure, you'd have to check the system yourself

low inventory accuracy (76.0%)
high wastage (6.3%)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'uid': 'district_store:WH_0078'}) -> [{'uid': 'district_store:WH_0078', 'warehouse_id': 'WH_0078', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'risk_score': 8.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']}]

Q: is WH_0078 at the district_store at risk of running short on anything?
A:

Chosen response:
FACTS: top shortage risk (uid=district_store:WH_0078) is WH_0078 (district_store, contraceptives), score=8.5, factors=['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']
RECOMMENDATION: focus replenishment planning on WH_0078 (district_store).

Rejected response:
FACTS: top shortage risk (uid=district_store:WH_0078) is WH_0078 (district_store, contraceptives), score=8.5, factors=['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_medium']
RECOMMENDATION: Not sure about that - would need to check the system for more detail.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'regional_warehouse:WH_0050'}) -> [{'uid': 'regional_warehouse:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 10, 'backorder_rate_pct': 76.9}, {'uid': 'regional_warehouse:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 4, 'backorder_rate_pct': 36.4}]

Q: which category has the most backorders at WH_0050 at the regional_warehouse?
A:

Chosen response:
FACTS: 2 backordered records (uid=regional_warehouse:WH_0050). worst: WH_0050 (regional_warehouse, medical_devices_consumables) at 76.9% backorder rate
RECOMMENDATION: expedite WH_0050 (regional_warehouse).

Rejected response:
FACTS: 2 backordered records (uid=regional_warehouse:WH_0050). worst: WH_0050 (regional_warehouse, miscellaneous_items) at 76.9% backorder rate
RECOMMENDATION: expedite WH_0050 (regional_warehouse).


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({}) -> [{'uid': 'district_store:WH_0028', 'warehouse_id': 'WH_0028', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0070', 'warehouse_id': 'WH_0070', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0006', 'warehouse_id': 'WH_0006', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0087', 'warehouse_id': 'WH_0087', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}]

Q: which warehouses have the highest shortage risk?
A:

Chosen response:
FACTS: top shortage risk is WH_0028 (district_store, vaccines), score=11.5, factors=['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']
RECOMMENDATION: focus replenishment planning on WH_0028 (district_store).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'regional_warehouse:WH_0082', 'commodity_category': 'controlled_substances', 'year': 2023, 'month': 3}) -> {'status': 'ok', 'uid': 'regional_warehouse:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'regional_warehouse', 'year': 2023, 'month': 3, 'reported_issue': 'expired_stock', 'has_issue': True, 'signals': ['storage conditions not adequate', 'FEFO compliance failed', 'low inventory accuracy (50.0%)', 'high wastage (29.1%)'], 'uncertain': True}

Q: why is WH_0082 at the regional_warehouse failing fulfillment for controlled substances?
A:

Chosen response:
FACTS: WH_0082 (regional_warehouse, 3/2023): reported issue = expired_stock. other signals: storage conditions not adequate; FEFO compliance failed; low inventory accuracy (50.0%); high wastage (29.1%) (note: report not submitted, numbers may be provisional)
RECOMMENDATION: address the reported issue (expired_stock).

Rejected response:
FACTS: WH_0082 (regional_warehouse, 29.2/2023): reported issue = expired_stock. other signals: storage conditions not adequate; FEFO compliance failed; low inventory accuracy (50.0%); high wastage (29.1%) (note: report not submitted, numbers may be provisional)
RECOMMENDATION: address the reported issue (expired_stock).

storage conditions not adequate
FEFO compliance failed
low inventory accuracy (50.0%)
high wastage (29.1%)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'uid': 'district_store:WH_0036'}) -> [{'uid': 'district_store:WH_0036', 'warehouse_id': 'WH_0036', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'risk_score': 8.0, 'risk_factors': ['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_high']}]

Q: is WH_0036 at the district_store at risk of running short on anything?
A:

Chosen response:
FACTS: top shortage risk (uid=district_store:WH_0036) is WH_0036 (district_store, essential_medicines), score=8.0, factors=['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_high']
RECOMMENDATION: focus replenishment planning on WH_0036 (district_store).

Rejected response: FACTS: focus replenishment planning on WH_0036 (district_store).


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'uid': 'district_store:WH_0026'}) -> {'n_records': 1, 'avg_inventory_accuracy_pct': 10.0, 'avg_order_fulfilment_rate_pct': 26.7, 'months_with_stockout': 1, 'issue_counts': {'dispatch_error': 1}, 'uid': 'district_store:WH_0026', 'warehouse_id': 'WH_0026', 'warehouse_level': 'district_store'}

Q: how is WH_0026 at the district_store doing overall?
A:

Chosen response:
FACTS: WH_0026 (district_store): avg inventory accuracy 10.0%, avg fulfilment 26.7%, 1 months w/ stockout (based on 1 records), issues on record: {'dispatch_error': 1}
RECOMMENDATION: worth a review.

Rejected response:
FACTS: WH_0026 (district_store): avg inventory accuracy 10.0%, avg fulfilment 26.7%, 1 months w/ stockout (based on 1 records), issues on record: {'dispatch_error': 1}
RECOMMENDATION: Not sure about that - would need to check the system for more detail.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({}) -> [{'uid': 'national_CMS:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'facilities_affected_by_stockout': 108}, {'uid': 'national_CMS:WH_0074', 'warehouse_id': 'WH_0074', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'facilities_affected_by_stockout': 60}, {'uid': 'regional_warehouse:WH_0025', 'warehouse_id': 'WH_0025', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'ARVs', 'facilities_affected_by_stockout': 38}, {'uid': 'national_CMS:WH_0060', 'warehouse_id': 'WH_0060', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'facilities_affected_by_stockout': 36}, {'uid': 'regional_warehouse:WH_0064', 'warehouse_id': 'WH_0064', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'facilities_affected_by_stockout': 28}, '... and 72 more']

Q: which items are stocked out right now?
A:

Chosen response:
FACTS: 77 active stockouts. worst: WH_0046 (national_CMS, malaria_commodities), 108 facilities hit
RECOMMENDATION: prioritize WH_0046 (national_CMS) first.

Rejected response: FACTS: prioritize WH_0046 (national_CMS) first.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'regional_warehouse:WH_0021', 'commodity_category': 'PPE_IPC_supplies', 'year': 2024, 'month': 1}) -> {'status': 'ok', 'uid': 'regional_warehouse:WH_0021', 'warehouse_id': 'WH_0021', 'warehouse_level': 'regional_warehouse', 'year': 2024, 'month': 1, 'reported_issue': 'overstocking', 'has_issue': True, 'signals': ['storage conditions not adequate', 'FEFO compliance failed', 'low inventory accuracy (61.8%)', 'high wastage (21.3%)', 'active stockout']}

Q: why is WH_0021 at the regional_warehouse failing fulfillment for PPE IPC supplies?
A:

Chosen response:
FACTS: WH_0021 (regional_warehouse, 1/2024): reported issue = overstocking. other signals: storage conditions not adequate; FEFO compliance failed; low inventory accuracy (61.8%); high wastage (21.3%); active stockout
RECOMMENDATION: address the reported issue (overstocking).

Rejected response:
FACTS: WH_0696 (regional_warehouse, 1/2024): reported issue = overstocking. other signals: storage conditions not adequate; FEFO compliance failed; low inventory accuracy (61.8%); high wastage (21.3%); active stockout
RECOMMENDATION: address the reported issue (overstocking).

storage conditions not adequate
FEFO compliance failed
low inventory accuracy (61.8%)
high wastage (21.3%)
active stockout


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'national_CMS:WH_0069'}) -> [{'uid': 'national_CMS:WH_0069', 'warehouse_id': 'WH_0069', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 15, 'backorder_rate_pct': 26.8}]

Q: which category has the most backorders at WH_0069 at the national_CMS?
A:

Chosen response:
FACTS: 1 backordered records (uid=national_CMS:WH_0069). worst: WH_0069 (national_CMS, laboratory_reagents) at 26.8% backorder rate
RECOMMENDATION: expedite WH_0069 (national_CMS).

Rejected response:
FACTS: 1 backordered records (uid=national_CMS:WH_0761). worst: WH_0761 (national_CMS, laboratory_reagents) at 26.8% backorder rate
RECOMMENDATION: expedite WH_0761 (national_CMS).


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'uid': 'regional_warehouse:WH_0082'}) -> [{'uid': 'regional_warehouse:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'controlled_substances', 'risk_score': 8.5, 'risk_factors': ['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'regional_warehouse:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'nutrition_commodities', 'risk_score': 7.0, 'risk_factors': ['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_medium']}]

Q: is WH_0082 at the regional_warehouse at risk of running short on anything?
A:

Chosen response:
FACTS: top shortage risk (uid=regional_warehouse:WH_0082) is WH_0082 (regional_warehouse, controlled_substances), score=8.5, factors=['high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']
RECOMMENDATION: focus replenishment planning on WH_0082 (regional_warehouse).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'national_CMS:WH_0021', 'commodity_category': 'surgical_supplies', 'year': 2023, 'month': 6}) -> {'status': 'ok', 'uid': 'national_CMS:WH_0021', 'warehouse_id': 'WH_0021', 'warehouse_level': 'national_CMS', 'year': 2023, 'month': 6, 'reported_issue': 'overstocking', 'has_issue': True, 'signals': ['low inventory accuracy (76.7%)']}

Q: why is WH_0021 at the national_CMS failing fulfillment for surgical supplies?
A:

Chosen response:
FACTS: WH_0021 (national_CMS, 6/2023): reported issue = overstocking. other signals: low inventory accuracy (76.7%)
RECOMMENDATION: address the reported issue (overstocking).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'regional_warehouse:WH_0082'}) -> []

Q: does WH_0082 at the regional_warehouse currently have any active stockouts?
A:

Chosen response:
FACTS: no active stockouts (uid=regional_warehouse:WH_0082)
RECOMMENDATION: nothing urgent here.

Rejected response: FACTS: nothing urgent here.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'compare_by': 'region_type', 'compare_values': ['peri_urban', 'rural', 'urban']}) -> {'_grouped_by': 'region_type', 'groups': {'rural': [{'uid': 'district_store:WH_0028', 'warehouse_id': 'WH_0028', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0006', 'warehouse_id': 'WH_0006', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}], 'peri_urban': [{'uid': 'district_store:WH_0087', 'warehouse_id': 'WH_0087', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'regional_warehouse:WH_0025', 'warehouse_id': 'WH_0025', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'regional_warehouse:WH_0089', 'warehouse_id': 'WH_0089', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'essential_medicines', 'risk_score': 11.0, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_high']}], 'urban': [{'uid': 'district_store:WH_0070', 'warehouse_id': 'WH_0070', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'national_CMS:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0068', 'warehouse_id': 'WH_0068', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'risk_score': 11.0, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_high']}]}}

Q: compare shortage risk across region types
A:

Chosen response:
FACTS: shortage risk by region_type: peri_urban: top risk WH_0087 (vaccines), score=11.5; rural: top risk WH_0028 (vaccines), score=11.5; urban: top risk WH_0070 (vaccines), score=11.5
RECOMMENDATION: focus replenishment planning on the rural group first - highest risk score.

Rejected response:
FACTS: shortage risk by region_type: peri_urban: top risk WH_0572 (vaccines), score=11.5; rural: top risk WH_0028 (vaccines), score=11.5; urban: top risk WH_0070 (vaccines), score=11.5
RECOMMENDATION: focus replenishment planning on the rural group first - highest risk score.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'national_CMS:WH_0005'}) -> []

Q: does WH_0005 at the national_CMS currently have any active stockouts?
A:

Chosen response:
FACTS: no active stockouts (uid=national_CMS:WH_0005)
RECOMMENDATION: nothing urgent here.

Rejected response:
FACTS: no active stockouts (uid=national_CMS:WH_0756)
RECOMMENDATION: nothing urgent here.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'district_store:WH_0017'}) -> []

Q: does WH_0017 at the district_store currently have any active stockouts?
A:

Chosen response:
FACTS: no active stockouts (uid=district_store:WH_0017)
RECOMMENDATION: nothing urgent here.

Rejected response:
FACTS: no active stockouts (uid=district_store:WH_0017) Not sure if there's more to report here.
RECOMMENDATION: nothing urgent here.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: shortage_risk({'region_type': 'urban'}) -> [{'uid': 'district_store:WH_0070', 'warehouse_id': 'WH_0070', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'national_CMS:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'risk_score': 11.5, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']}, {'uid': 'district_store:WH_0068', 'warehouse_id': 'WH_0068', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'risk_score': 11.0, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_high']}, {'uid': 'national_CMS:WH_0008', 'warehouse_id': 'WH_0008', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'risk_score': 11.0, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_high']}, {'uid': 'national_CMS:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'risk_score': 10.0, 'risk_factors': ['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'criticality_critical']}]

Q: what needs urgent replenishment in urban areas?
A:

Chosen response:
FACTS: top shortage risk (region_type=urban) is WH_0070 (district_store, vaccines), score=11.5, factors=['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']
RECOMMENDATION: focus replenishment planning on WH_0070 (district_store).

Rejected response:
FACTS: top shortage risk (region_type=urban) is WH_0561 (district_store, vaccines), score=11.5, factors=['stockout', 'high_backorder_rate', 'low_fulfilment', 'high_wastage', 'storage_inadequate', 'criticality_critical']
RECOMMENDATION: focus replenishment planning on WH_0561 (district_store).


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'warehouse_level': 'district_store'}) -> {'n_records': 66, 'avg_inventory_accuracy_pct': 26.8, 'avg_order_fulfilment_rate_pct': 30.2, 'months_with_stockout': 38, 'issue_counts': {'theft_pilferage': 6, 'expired_stock': 6, 'stock_record_discrepancy': 6, 'temperature_excursion': 6, 'FEFO_not_followed': 6, 'damaged_goods': 6, 'overstocking': 6, 'receiving_error': 6, 'understocking': 6, 'dispatch_error': 6, 'pest_infestation': 6}}

Q: what are the kpis for the district_store tier?
A:

Chosen response:
FACTS: avg inventory accuracy 26.8%, avg fulfilment 30.2%, 38 months w/ stockout (warehouse_level=district_store) (based on 66 records), issues on record: {'theft_pilferage': 6, 'expired_stock': 6, 'stock_record_discrepancy': 6, 'temperature_excursion': 6, 'FEFO_not_followed': 6, 'damaged_goods': 6, 'overstocking': 6, 'receiving_error': 6, 'understocking': 6, 'dispatch_error': 6, 'pest_infestation': 6}
RECOMMENDATION: worth a review.

Rejected response:
FACTS: avg inventory accuracy 49.8%, avg fulfilment 30.2%, 38 months w/ stockout (warehouse_level=district_store) (based on 66 records), issues on record: {'theft_pilferage': 6, 'expired_stock': 6, 'stock_record_discrepancy': 6, 'temperature_excursion': 6, 'FEFO_not_followed': 6, 'damaged_goods': 6, 'overstocking': 6, 'receiving_error': 6, 'understocking': 6, 'dispatch_error': 6, 'pest_infestation': 6}
RECOMMENDATION: worth a review.
FACTS: to repeat, the figure is 49.8. Again, 49.8 is the number.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'district_store:WH_0063'}) -> []

Q: does WH_0063 at the district_store currently have any active stockouts?
A:

Chosen response:
FACTS: no active stockouts (uid=district_store:WH_0063)
RECOMMENDATION: nothing urgent here.

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'national_CMS:WH_0079', 'commodity_category': 'laboratory_reagents', 'year': 2022, 'month': 4}) -> {'status': 'ok', 'uid': 'national_CMS:WH_0079', 'warehouse_id': 'WH_0079', 'warehouse_level': 'national_CMS', 'year': 2022, 'month': 4, 'reported_issue': 'none', 'has_issue': False, 'signals': ['high wastage (6.5%)']}

Q: why is WH_0079 at the national_CMS failing fulfillment for laboratory reagents?
A:

Chosen response:
FACTS: WH_0079 (national_CMS, 4/2022): reported issue = none. other signals: high wastage (6.5%)
RECOMMENDATION: no action needed.

Rejected response:
FACTS: WH_0079 (national_CMS, 4/2022): reported issue = none. other signals: high wastage (6.5%)
RECOMMENDATION: Not sure. (Not enough information)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'uid': 'district_store:WH_0046'}) -> {'n_records': 1, 'avg_inventory_accuracy_pct': 13.7, 'avg_order_fulfilment_rate_pct': 24.2, 'months_with_stockout': 0, 'issue_counts': {'stock_record_discrepancy': 1}, 'uid': 'district_store:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'district_store'}

Q: how is WH_0046 at the district_store doing overall?
A:

Chosen response:
FACTS: WH_0046 (district_store): avg inventory accuracy 13.7%, avg fulfilment 24.2%, 0 months w/ stockout (based on 1 records), issues on record: {'stock_record_discrepancy': 1}
RECOMMENDATION: looks fine.

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'national_CMS:WH_0041'}) -> []

Q: does WH_0041 at the national_CMS currently have any active stockouts?
A:

Chosen response:
FACTS: no active stockouts (uid=national_CMS:WH_0041)
RECOMMENDATION: nothing urgent here.

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'compare_by': 'warehouse_level', 'compare_values': ['national_CMS', 'regional_warehouse']}) -> {'_grouped_by': 'warehouse_level', 'groups': {'national_CMS': {'dominant_issue': 'theft_pilferage', 'count': 6, 'n_records': 72, 'issue_counts': {'theft_pilferage': 6, 'stock_record_discrepancy': 6, 'damaged_goods': 6, 'overstocking': 6, 'understocking': 6, 'expired_stock': 6, 'FEFO_not_followed': 6, 'receiving_error': 6, 'dispatch_error': 6, 'pest_infestation': 6, 'temperature_excursion': 6}}, 'regional_warehouse': {'dominant_issue': 'stock_record_discrepancy', 'count': 6, 'n_records': 72, 'issue_counts': {'stock_record_discrepancy': 6, 'pest_infestation': 6, 'theft_pilferage': 6, 'understocking': 6, 'expired_stock': 6, 'overstocking': 6, 'receiving_error': 6, 'FEFO_not_followed': 6, 'temperature_excursion': 6, 'damaged_goods': 6, 'dispatch_error': 6}}}}

Q: how do national_CMS and regional_warehouse compare on why they're failing?
A:

Chosen response:
FACTS: most common issue by warehouse_level: national_CMS: theft_pilferage (6x); regional_warehouse: stock_record_discrepancy (6x)
RECOMMENDATION: focus on the national_CMS group's most common issue first.

Rejected response:
FACTS: most common issue by warehouse_level: national_CMS: theft_pilferage (6x); regional_warehouse: stock_record_discrepancy (6x)
RECOMMENDATION: Not sure about that - would need to check the system for more detail.
FACTS: most common issue by warehouse_level: national_CMS: theft_pilferage (6x); regional_warehouse: stock_record_discrepancy (6x)
RECOMMENDATION: Not sure about that - would need to check the system for more detail.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: stockouts({'uid': 'district_store:WH_0046'}) -> []

Q: does WH_0046 at the district_store currently have any active stockouts?
A:

Chosen response:
FACTS: no active stockouts (uid=district_store:WH_0046)
RECOMMENDATION: nothing urgent here.

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'national_CMS:WH_0076'}) -> [{'uid': 'national_CMS:WH_0076', 'warehouse_id': 'WH_0076', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 12, 'backorder_rate_pct': 25.0}]

Q: which category has the most backorders at WH_0076 at the national_CMS?
A:

Chosen response:
FACTS: 1 backordered records (uid=national_CMS:WH_0076). worst: WH_0076 (national_CMS, surgical_supplies) at 25.0% backorder rate
RECOMMENDATION: expedite WH_0076 (national_CMS).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'compare_by': 'region_type', 'compare_values': ['peri_urban', 'rural', 'urban']}) -> {'_grouped_by': 'region_type', 'groups': {'rural': [{'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'ARVs', 'orders_backordered': 3, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0012', 'warehouse_id': 'WH_0012', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0017', 'warehouse_id': 'WH_0017', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'orders_backordered': 7, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0041', 'warehouse_id': 'WH_0041', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'orders_backordered': 1, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0048', 'warehouse_id': 'WH_0048', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 6, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 3, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0098', 'warehouse_id': 'WH_0098', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'orders_backordered': 3, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0062', 'warehouse_id': 'WH_0062', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0044', 'warehouse_id': 'WH_0044', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'orders_backordered': 5, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0069', 'warehouse_id': 'WH_0069', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 1, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'district_store', 'commodity_category': 'ARVs', 'orders_backordered': 5, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0037', 'warehouse_id': 'WH_0037', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 1, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'orders_backordered': 4, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0038', 'warehouse_id': 'WH_0038', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0007', 'warehouse_id': 'WH_0007', 'warehouse_level': 'district_store', 'commodity_category': 'ARVs', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0045', 'warehouse_id': 'WH_0045', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'orders_backordered': 8, 'backorder_rate_pct': 88.9}, {'uid': 'district_store:WH_0094', 'warehouse_id': 'WH_0094', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 8, 'backorder_rate_pct': 88.9}, {'uid': 'district_store:WH_0001', 'warehouse_id': 'WH_0001', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 6, 'backorder_rate_pct': 85.7}, {'uid': 'district_store:WH_0054', 'warehouse_id': 'WH_0054', 'warehouse_level': 'district_store', 'commodity_category': 'ARVs', 'orders_backordered': 5, 'backorder_rate_pct': 83.3}, {'uid': 'district_store:WH_0007', 'warehouse_id': 'WH_0007', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'orders_backordered': 5, 'backorder_rate_pct': 83.3}, {'uid': 'regional_warehouse:WH_0096', 'warehouse_id': 'WH_0096', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'surgical_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 83.3}, {'uid': 'district_store:WH_0022', 'warehouse_id': 'WH_0022', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 9, 'backorder_rate_pct': 81.8}, {'uid': 'district_store:WH_0071', 'warehouse_id': 'WH_0071', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0028', 'warehouse_id': 'WH_0028', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0053', 'warehouse_id': 'WH_0053', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0014', 'warehouse_id': 'WH_0014', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0092', 'warehouse_id': 'WH_0092', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0056', 'warehouse_id': 'WH_0056', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0010', 'warehouse_id': 'WH_0010', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'orders_backordered': 7, 'backorder_rate_pct': 77.8}, {'uid': 'district_store:WH_0063', 'warehouse_id': 'WH_0063', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 75.0}, {'uid': 'district_store:WH_0038', 'warehouse_id': 'WH_0038', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 3, 'backorder_rate_pct': 75.0}, {'uid': 'regional_warehouse:WH_0044', 'warehouse_id': 'WH_0044', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 6, 'backorder_rate_pct': 75.0}, {'uid': 'district_store:WH_0094', 'warehouse_id': 'WH_0094', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 71.4}, {'uid': 'district_store:WH_0054', 'warehouse_id': 'WH_0054', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 71.4}, {'uid': 'district_store:WH_0078', 'warehouse_id': 'WH_0078', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 5, 'backorder_rate_pct': 71.4}, {'uid': 'regional_warehouse:WH_0028', 'warehouse_id': 'WH_0028', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'orders_backordered': 9, 'backorder_rate_pct': 69.2}, {'uid': 'district_store:WH_0032', 'warehouse_id': 'WH_0032', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 2, 'backorder_rate_pct': 66.7}, {'uid': 'district_store:WH_0048', 'warehouse_id': 'WH_0048', 'warehouse_level': 'district_store', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 2, 'backorder_rate_pct': 66.7}, {'uid': 'district_store:WH_0011', 'warehouse_id': 'WH_0011', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 4, 'backorder_rate_pct': 66.7}, {'uid': 'district_store:WH_0019', 'warehouse_id': 'WH_0019', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'orders_backordered': 2, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0090', 'warehouse_id': 'WH_0090', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 6, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0064', 'warehouse_id': 'WH_0064', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 16, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0021', 'warehouse_id': 'WH_0021', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 13, 'backorder_rate_pct': 65.0}, {'uid': 'regional_warehouse:WH_0066', 'warehouse_id': 'WH_0066', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'surgical_supplies', 'orders_backordered': 9, 'backorder_rate_pct': 64.3}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'orders_backordered': 5, 'backorder_rate_pct': 62.5}, {'uid': 'national_CMS:WH_0088', 'warehouse_id': 'WH_0088', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'orders_backordered': 32, 'backorder_rate_pct': 61.5}, {'uid': 'district_store:WH_0019', 'warehouse_id': 'WH_0019', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 3, 'backorder_rate_pct': 60.0}, {'uid': 'regional_warehouse:WH_0025', 'warehouse_id': 'WH_0025', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 6, 'backorder_rate_pct': 60.0}, {'uid': 'district_store:WH_0033', 'warehouse_id': 'WH_0033', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 4, 'backorder_rate_pct': 57.1}, {'uid': 'district_store:WH_0006', 'warehouse_id': 'WH_0006', 'warehouse_level': 'district_store', 'commodity_category': 'controlled_substances', 'orders_backordered': 5, 'backorder_rate_pct': 55.6}, {'uid': 'regional_warehouse:WH_0098', 'warehouse_id': 'WH_0098', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 6, 'backorder_rate_pct': 54.5}, {'uid': 'regional_warehouse:WH_0070', 'warehouse_id': 'WH_0070', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'orders_backordered': 8, 'backorder_rate_pct': 53.3}, {'uid': 'district_store:WH_0024', 'warehouse_id': 'WH_0024', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 3, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0004', 'warehouse_id': 'WH_0004', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 8, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0025', 'warehouse_id': 'WH_0025', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'ARVs', 'orders_backordered': 9, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0053', 'warehouse_id': 'WH_0053', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 5, 'backorder_rate_pct': 45.5}, {'uid': 'regional_warehouse:WH_0013', 'warehouse_id': 'WH_0013', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'surgical_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 45.5}, {'uid': 'district_store:WH_0018', 'warehouse_id': 'WH_0018', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 4, 'backorder_rate_pct': 44.4}, {'uid': 'national_CMS:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 24, 'backorder_rate_pct': 44.4}, {'uid': 'regional_warehouse:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'essential_medicines', 'orders_backordered': 7, 'backorder_rate_pct': 43.8}, {'uid': 'regional_warehouse:WH_0012', 'warehouse_id': 'WH_0012', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'orders_backordered': 7, 'backorder_rate_pct': 43.8}, {'uid': 'regional_warehouse:WH_0074', 'warehouse_id': 'WH_0074', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'ARVs', 'orders_backordered': 8, 'backorder_rate_pct': 38.1}, {'uid': 'national_CMS:WH_0098', 'warehouse_id': 'WH_0098', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 17, 'backorder_rate_pct': 37.8}, {'uid': 'regional_warehouse:WH_0007', 'warehouse_id': 'WH_0007', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'controlled_substances', 'orders_backordered': 9, 'backorder_rate_pct': 36.0}, {'uid': 'national_CMS:WH_0019', 'warehouse_id': 'WH_0019', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 18, 'backorder_rate_pct': 34.6}, {'uid': 'national_CMS:WH_0019', 'warehouse_id': 'WH_0019', 'warehouse_level': 'national_CMS', 'commodity_category': 'contraceptives', 'orders_backordered': 16, 'backorder_rate_pct': 32.0}, {'uid': 'national_CMS:WH_0074', 'warehouse_id': 'WH_0074', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 18, 'backorder_rate_pct': 31.0}, {'uid': 'regional_warehouse:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'controlled_substances', 'orders_backordered': 4, 'backorder_rate_pct': 30.8}, {'uid': 'regional_warehouse:WH_0029', 'warehouse_id': 'WH_0029', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'orders_backordered': 4, 'backorder_rate_pct': 28.6}, {'uid': 'regional_warehouse:WH_0086', 'warehouse_id': 'WH_0086', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 5, 'backorder_rate_pct': 27.8}, {'uid': 'regional_warehouse:WH_0053', 'warehouse_id': 'WH_0053', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 3, 'backorder_rate_pct': 27.3}, {'uid': 'national_CMS:WH_0064', 'warehouse_id': 'WH_0064', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 14, 'backorder_rate_pct': 26.4}, {'uid': 'national_CMS:WH_0068', 'warehouse_id': 'WH_0068', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 10, 'backorder_rate_pct': 19.2}, {'uid': 'national_CMS:WH_0074', 'warehouse_id': 'WH_0074', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'orders_backordered': 9, 'backorder_rate_pct': 16.7}, {'uid': 'national_CMS:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 6, 'backorder_rate_pct': 11.3}, {'uid': 'national_CMS:WH_0096', 'warehouse_id': 'WH_0096', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'orders_backordered': 5, 'backorder_rate_pct': 10.4}, {'uid': 'national_CMS:WH_0034', 'warehouse_id': 'WH_0034', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 10.3}, {'uid': 'national_CMS:WH_0032', 'warehouse_id': 'WH_0032', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'orders_backordered': 1, 'backorder_rate_pct': 2.0}], 'peri_urban': [{'uid': 'district_store:WH_0067', 'warehouse_id': 'WH_0067', 'warehouse_level': 'district_store', 'commodity_category': 'surgical_supplies', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0018', 'warehouse_id': 'WH_0018', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 2, 'backorder_rate_pct': 100.0}, {'uid': 'district_store:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'district_store', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 100.0}, {'uid': 'regional_warehouse:WH_0054', 'warehouse_id': 'WH_0054', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 12, 'backorder_rate_pct': 92.3}, {'uid': 'district_store:WH_0091', 'warehouse_id': 'WH_0091', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'orders_backordered': 5, 'backorder_rate_pct': 83.3}, {'uid': 'district_store:WH_0065', 'warehouse_id': 'WH_0065', 'warehouse_level': 'district_store', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 5, 'backorder_rate_pct': 83.3}, {'uid': 'district_store:WH_0067', 'warehouse_id': 'WH_0067', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0005', 'warehouse_id': 'WH_0005', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 4, 'backorder_rate_pct': 80.0}, {'uid': 'district_store:WH_0054', 'warehouse_id': 'WH_0054', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 3, 'backorder_rate_pct': 75.0}, {'uid': 'district_store:WH_0026', 'warehouse_id': 'WH_0026', 'warehouse_level': 'district_store', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 3, 'backorder_rate_pct': 75.0}, {'uid': 'regional_warehouse:WH_0042', 'warehouse_id': 'WH_0042', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 12, 'backorder_rate_pct': 75.0}, {'uid': 'regional_warehouse:WH_0089', 'warehouse_id': 'WH_0089', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'essential_medicines', 'orders_backordered': 12, 'backorder_rate_pct': 70.6}, {'uid': 'district_store:WH_0062', 'warehouse_id': 'WH_0062', 'warehouse_level': 'district_store', 'commodity_category': 'malaria_commodities', 'orders_backordered': 4, 'backorder_rate_pct': 66.7}, {'uid': 'district_store:WH_0036', 'warehouse_id': 'WH_0036', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'orders_backordered': 2, 'backorder_rate_pct': 66.7}, {'uid': 'district_store:WH_0087', 'warehouse_id': 'WH_0087', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 4, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0073', 'warehouse_id': 'WH_0073', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 10, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0047', 'warehouse_id': 'WH_0047', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 8, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0092', 'warehouse_id': 'WH_0092', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 6, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0041', 'warehouse_id': 'WH_0041', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 11, 'backorder_rate_pct': 61.1}, {'uid': 'regional_warehouse:WH_0029', 'warehouse_id': 'WH_0029', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'essential_medicines', 'orders_backordered': 9, 'backorder_rate_pct': 60.0}, {'uid': 'regional_warehouse:WH_0088', 'warehouse_id': 'WH_0088', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'IV_fluids', 'orders_backordered': 6, 'backorder_rate_pct': 60.0}, {'uid': 'regional_warehouse:WH_0096', 'warehouse_id': 'WH_0096', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'controlled_substances', 'orders_backordered': 6, 'backorder_rate_pct': 60.0}, {'uid': 'regional_warehouse:WH_0053', 'warehouse_id': 'WH_0053', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'ARVs', 'orders_backordered': 6, 'backorder_rate_pct': 60.0}, {'uid': 'national_CMS:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 32, 'backorder_rate_pct': 59.3}, {'uid': 'regional_warehouse:WH_0021', 'warehouse_id': 'WH_0021', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 16, 'backorder_rate_pct': 57.1}, {'uid': 'regional_warehouse:WH_0017', 'warehouse_id': 'WH_0017', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 9, 'backorder_rate_pct': 52.9}, {'uid': 'national_CMS:WH_0041', 'warehouse_id': 'WH_0041', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 23, 'backorder_rate_pct': 52.3}, {'uid': 'district_store:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'district_store', 'commodity_category': 'IV_fluids', 'orders_backordered': 2, 'backorder_rate_pct': 50.0}, {'uid': 'national_CMS:WH_0001', 'warehouse_id': 'WH_0001', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 26, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 5, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0021', 'warehouse_id': 'WH_0021', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'IV_fluids', 'orders_backordered': 5, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0037', 'warehouse_id': 'WH_0037', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'ARVs', 'orders_backordered': 8, 'backorder_rate_pct': 47.1}, {'uid': 'regional_warehouse:WH_0025', 'warehouse_id': 'WH_0025', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'orders_backordered': 8, 'backorder_rate_pct': 47.1}, {'uid': 'regional_warehouse:WH_0091', 'warehouse_id': 'WH_0091', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 8, 'backorder_rate_pct': 47.1}, {'uid': 'regional_warehouse:WH_0001', 'warehouse_id': 'WH_0001', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 8, 'backorder_rate_pct': 47.1}, {'uid': 'regional_warehouse:WH_0063', 'warehouse_id': 'WH_0063', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'IV_fluids', 'orders_backordered': 7, 'backorder_rate_pct': 46.7}, {'uid': 'regional_warehouse:WH_0045', 'warehouse_id': 'WH_0045', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 7, 'backorder_rate_pct': 46.7}, {'uid': 'regional_warehouse:WH_0066', 'warehouse_id': 'WH_0066', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 6, 'backorder_rate_pct': 46.2}, {'uid': 'regional_warehouse:WH_0006', 'warehouse_id': 'WH_0006', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 6, 'backorder_rate_pct': 46.2}, {'uid': 'regional_warehouse:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 6, 'backorder_rate_pct': 46.2}, {'uid': 'regional_warehouse:WH_0011', 'warehouse_id': 'WH_0011', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 5, 'backorder_rate_pct': 45.5}, {'uid': 'national_CMS:WH_0031', 'warehouse_id': 'WH_0031', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'orders_backordered': 16, 'backorder_rate_pct': 42.1}, {'uid': 'regional_warehouse:WH_0052', 'warehouse_id': 'WH_0052', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 7, 'backorder_rate_pct': 41.2}, {'uid': 'national_CMS:WH_0026', 'warehouse_id': 'WH_0026', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 16, 'backorder_rate_pct': 39.0}, {'uid': 'national_CMS:WH_0017', 'warehouse_id': 'WH_0017', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 21, 'backorder_rate_pct': 38.9}, {'uid': 'regional_warehouse:WH_0028', 'warehouse_id': 'WH_0028', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'IV_fluids', 'orders_backordered': 5, 'backorder_rate_pct': 38.5}, {'uid': 'national_CMS:WH_0060', 'warehouse_id': 'WH_0060', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 23, 'backorder_rate_pct': 38.3}, {'uid': 'regional_warehouse:WH_0027', 'warehouse_id': 'WH_0027', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 37.5}, {'uid': 'regional_warehouse:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 4, 'backorder_rate_pct': 36.4}, {'uid': 'regional_warehouse:WH_0052', 'warehouse_id': 'WH_0052', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'IV_fluids', 'orders_backordered': 7, 'backorder_rate_pct': 35.0}, {'uid': 'national_CMS:WH_0007', 'warehouse_id': 'WH_0007', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'orders_backordered': 17, 'backorder_rate_pct': 34.7}, {'uid': 'national_CMS:WH_0098', 'warehouse_id': 'WH_0098', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 14, 'backorder_rate_pct': 33.3}, {'uid': 'regional_warehouse:WH_0051', 'warehouse_id': 'WH_0051', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 5, 'backorder_rate_pct': 33.3}, {'uid': 'regional_warehouse:WH_0003', 'warehouse_id': 'WH_0003', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 33.3}, {'uid': 'regional_warehouse:WH_0073', 'warehouse_id': 'WH_0073', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 3, 'backorder_rate_pct': 33.3}, {'uid': 'national_CMS:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'national_CMS', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 16, 'backorder_rate_pct': 32.7}, {'uid': 'regional_warehouse:WH_0008', 'warehouse_id': 'WH_0008', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 3, 'backorder_rate_pct': 30.0}, {'uid': 'regional_warehouse:WH_0091', 'warehouse_id': 'WH_0091', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 4, 'backorder_rate_pct': 28.6}, {'uid': 'regional_warehouse:WH_0093', 'warehouse_id': 'WH_0093', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 23.1}, {'uid': 'regional_warehouse:WH_0043', 'warehouse_id': 'WH_0043', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 5, 'backorder_rate_pct': 22.7}, {'uid': 'national_CMS:WH_0055', 'warehouse_id': 'WH_0055', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 9, 'backorder_rate_pct': 22.0}, {'uid': 'regional_warehouse:WH_0088', 'warehouse_id': 'WH_0088', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 2, 'backorder_rate_pct': 20.0}, {'uid': 'national_CMS:WH_0021', 'warehouse_id': 'WH_0021', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 11, 'backorder_rate_pct': 18.6}, {'uid': 'national_CMS:WH_0049', 'warehouse_id': 'WH_0049', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 8, 'backorder_rate_pct': 17.4}, {'uid': 'national_CMS:WH_0020', 'warehouse_id': 'WH_0020', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'orders_backordered': 8, 'backorder_rate_pct': 16.7}, {'uid': 'national_CMS:WH_0053', 'warehouse_id': 'WH_0053', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 7, 'backorder_rate_pct': 14.6}, {'uid': 'national_CMS:WH_0046', 'warehouse_id': 'WH_0046', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'orders_backordered': 4, 'backorder_rate_pct': 9.8}, {'uid': 'national_CMS:WH_0091', 'warehouse_id': 'WH_0091', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'orders_backordered': 4, 'backorder_rate_pct': 9.3}], 'urban': [{'uid': 'district_store:WH_0068', 'warehouse_id': 'WH_0068', 'warehouse_level': 'district_store', 'commodity_category': 'essential_medicines', 'orders_backordered': 7, 'backorder_rate_pct': 87.5}, {'uid': 'regional_warehouse:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 10, 'backorder_rate_pct': 76.9}, {'uid': 'regional_warehouse:WH_0022', 'warehouse_id': 'WH_0022', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 9, 'backorder_rate_pct': 75.0}, {'uid': 'regional_warehouse:WH_0030', 'warehouse_id': 'WH_0030', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 6, 'backorder_rate_pct': 66.7}, {'uid': 'regional_warehouse:WH_0079', 'warehouse_id': 'WH_0079', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'essential_medicines', 'orders_backordered': 6, 'backorder_rate_pct': 60.0}, {'uid': 'regional_warehouse:WH_0032', 'warehouse_id': 'WH_0032', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'controlled_substances', 'orders_backordered': 6, 'backorder_rate_pct': 60.0}, {'uid': 'district_store:WH_0070', 'warehouse_id': 'WH_0070', 'warehouse_level': 'district_store', 'commodity_category': 'vaccines', 'orders_backordered': 4, 'backorder_rate_pct': 57.1}, {'uid': 'regional_warehouse:WH_0075', 'warehouse_id': 'WH_0075', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 8, 'backorder_rate_pct': 57.1}, {'uid': 'regional_warehouse:WH_0009', 'warehouse_id': 'WH_0009', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'ARVs', 'orders_backordered': 8, 'backorder_rate_pct': 50.0}, {'uid': 'regional_warehouse:WH_0005', 'warehouse_id': 'WH_0005', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 8, 'backorder_rate_pct': 47.1}, {'uid': 'national_CMS:WH_0040', 'warehouse_id': 'WH_0040', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'orders_backordered': 27, 'backorder_rate_pct': 45.8}, {'uid': 'national_CMS:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'orders_backordered': 21, 'backorder_rate_pct': 44.7}, {'uid': 'regional_warehouse:WH_0060', 'warehouse_id': 'WH_0060', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'malaria_commodities', 'orders_backordered': 7, 'backorder_rate_pct': 43.8}, {'uid': 'national_CMS:WH_0094', 'warehouse_id': 'WH_0094', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 23, 'backorder_rate_pct': 40.4}, {'uid': 'national_CMS:WH_0078', 'warehouse_id': 'WH_0078', 'warehouse_level': 'national_CMS', 'commodity_category': 'contraceptives', 'orders_backordered': 17, 'backorder_rate_pct': 39.5}, {'uid': 'national_CMS:WH_0040', 'warehouse_id': 'WH_0040', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 20, 'backorder_rate_pct': 39.2}, {'uid': 'national_CMS:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'national_CMS', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 16, 'backorder_rate_pct': 39.0}, {'uid': 'regional_warehouse:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 5, 'backorder_rate_pct': 38.5}, {'uid': 'national_CMS:WH_0074', 'warehouse_id': 'WH_0074', 'warehouse_level': 'national_CMS', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 19, 'backorder_rate_pct': 37.3}, {'uid': 'regional_warehouse:WH_0055', 'warehouse_id': 'WH_0055', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'vaccines', 'orders_backordered': 7, 'backorder_rate_pct': 36.8}, {'uid': 'national_CMS:WH_0003', 'warehouse_id': 'WH_0003', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 19, 'backorder_rate_pct': 35.8}, {'uid': 'national_CMS:WH_0093', 'warehouse_id': 'WH_0093', 'warehouse_level': 'national_CMS', 'commodity_category': 'contraceptives', 'orders_backordered': 20, 'backorder_rate_pct': 35.7}, {'uid': 'national_CMS:WH_0012', 'warehouse_id': 'WH_0012', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 15, 'backorder_rate_pct': 34.9}, {'uid': 'national_CMS:WH_0016', 'warehouse_id': 'WH_0016', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 17, 'backorder_rate_pct': 32.7}, {'uid': 'national_CMS:WH_0082', 'warehouse_id': 'WH_0082', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 15, 'backorder_rate_pct': 32.6}, {'uid': 'national_CMS:WH_0052', 'warehouse_id': 'WH_0052', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 18, 'backorder_rate_pct': 32.1}, {'uid': 'national_CMS:WH_0008', 'warehouse_id': 'WH_0008', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 15, 'backorder_rate_pct': 31.2}, {'uid': 'national_CMS:WH_0018', 'warehouse_id': 'WH_0018', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'orders_backordered': 15, 'backorder_rate_pct': 30.6}, {'uid': 'regional_warehouse:WH_0099', 'warehouse_id': 'WH_0099', 'warehouse_level': 'regional_warehouse', 'commodity_category': 'contraceptives', 'orders_backordered': 6, 'backorder_rate_pct': 30.0}, {'uid': 'national_CMS:WH_0077', 'warehouse_id': 'WH_0077', 'warehouse_level': 'national_CMS', 'commodity_category': 'vaccines', 'orders_backordered': 14, 'backorder_rate_pct': 28.6}, {'uid': 'national_CMS:WH_0079', 'warehouse_id': 'WH_0079', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 16, 'backorder_rate_pct': 28.6}, {'uid': 'national_CMS:WH_0080', 'warehouse_id': 'WH_0080', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'orders_backordered': 15, 'backorder_rate_pct': 27.3}, {'uid': 'national_CMS:WH_0050', 'warehouse_id': 'WH_0050', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 13, 'backorder_rate_pct': 27.1}, {'uid': 'national_CMS:WH_0004', 'warehouse_id': 'WH_0004', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 11, 'backorder_rate_pct': 26.8}, {'uid': 'national_CMS:WH_0069', 'warehouse_id': 'WH_0069', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 15, 'backorder_rate_pct': 26.8}, {'uid': 'national_CMS:WH_0011', 'warehouse_id': 'WH_0011', 'warehouse_level': 'national_CMS', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 15, 'backorder_rate_pct': 25.9}, {'uid': 'national_CMS:WH_0047', 'warehouse_id': 'WH_0047', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 14, 'backorder_rate_pct': 25.5}, {'uid': 'national_CMS:WH_0076', 'warehouse_id': 'WH_0076', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 12, 'backorder_rate_pct': 25.0}, {'uid': 'national_CMS:WH_0047', 'warehouse_id': 'WH_0047', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 10, 'backorder_rate_pct': 24.4}, {'uid': 'national_CMS:WH_0001', 'warehouse_id': 'WH_0001', 'warehouse_level': 'national_CMS', 'commodity_category': 'controlled_substances', 'orders_backordered': 16, 'backorder_rate_pct': 24.2}, {'uid': 'national_CMS:WH_0092', 'warehouse_id': 'WH_0092', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 9, 'backorder_rate_pct': 23.7}, {'uid': 'national_CMS:WH_0015', 'warehouse_id': 'WH_0015', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 13, 'backorder_rate_pct': 22.8}, {'uid': 'national_CMS:WH_0096', 'warehouse_id': 'WH_0096', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'orders_backordered': 8, 'backorder_rate_pct': 20.5}, {'uid': 'national_CMS:WH_0034', 'warehouse_id': 'WH_0034', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 10, 'backorder_rate_pct': 20.4}, {'uid': 'national_CMS:WH_0024', 'warehouse_id': 'WH_0024', 'warehouse_level': 'national_CMS', 'commodity_category': 'PPE_IPC_supplies', 'orders_backordered': 12, 'backorder_rate_pct': 20.0}, {'uid': 'national_CMS:WH_0081', 'warehouse_id': 'WH_0081', 'warehouse_level': 'national_CMS', 'commodity_category': 'laboratory_reagents', 'orders_backordered': 10, 'backorder_rate_pct': 17.9}, {'uid': 'national_CMS:WH_0089', 'warehouse_id': 'WH_0089', 'warehouse_level': 'national_CMS', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 7, 'backorder_rate_pct': 15.9}, {'uid': 'national_CMS:WH_0086', 'warehouse_id': 'WH_0086', 'warehouse_level': 'national_CMS', 'commodity_category': 'medical_devices_consumables', 'orders_backordered': 9, 'backorder_rate_pct': 13.6}, {'uid': 'national_CMS:WH_0039', 'warehouse_id': 'WH_0039', 'warehouse_level': 'national_CMS', 'commodity_category': 'essential_medicines', 'orders_backordered': 8, 'backorder_rate_pct': 13.3}, {'uid': 'national_CMS:WH_0002', 'warehouse_id': 'WH_0002', 'warehouse_level': 'national_CMS', 'commodity_category': 'ARVs', 'orders_backordered': 5, 'backorder_rate_pct': 11.4}, {'uid': 'national_CMS:WH_0034', 'warehouse_id': 'WH_0034', 'warehouse_level': 'national_CMS', 'commodity_category': 'surgical_supplies', 'orders_backordered': 3, 'backorder_rate_pct': 7.0}, {'uid': 'national_CMS:WH_0095', 'warehouse_id': 'WH_0095', 'warehouse_level': 'national_CMS', 'commodity_category': 'IV_fluids', 'orders_backordered': 4, 'backorder_rate_pct': 6.3}]}}

Q: compare backorder rates across region types
A:

Chosen response:
FACTS: backorders by region_type: peri_urban: worst WH_0067 (surgical_supplies) at 100.0%, 2 orders; rural: worst WH_0075 (PPE_IPC_supplies) at 100.0%, 3 orders; urban: worst WH_0068 (essential_medicines) at 87.5%, 7 orders
RECOMMENDATION: expedite the rural group first - highest backorder rate.

Rejected response:
FACTS: backorders by region_type: peri_urban: worst WH_0067 (surgical_supplies) at 100.0%, 2 orders; rural: worst WH_0075 (PPE_IPC_supplies) at 100.0%, 3 orders
RECOMMENDATION: expedite the rural group first - highest backorder rate.
FACTS: backorders by region_type: peri_urban: worst WH_0067 (surgical_supplies) at 100.0%, 2 orders; rural: worst WH_0075 (PPE_IPC_supplies) at 100.0%, 3 orders
RECOMMENDATION: expedite the rural group first - highest backorder rate.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: kpis({'uid': 'national_CMS:WH_0078'}) -> {'n_records': 2, 'avg_inventory_accuracy_pct': 70.2, 'avg_order_fulfilment_rate_pct': 81.0, 'months_with_stockout': 0, 'issue_counts': {'understocking': 1, 'pest_infestation': 1}, 'uid': 'national_CMS:WH_0078', 'warehouse_id': 'WH_0078', 'warehouse_level': 'national_CMS'}

Q: how is WH_0078 at the national_CMS doing overall?
A:

Chosen response:
FACTS: WH_0078 (national_CMS): avg inventory accuracy 70.2%, avg fulfilment 81.0%, 0 months w/ stockout (based on 2 records), issues on record: {'understocking': 1, 'pest_infestation': 1}
RECOMMENDATION: looks fine.

Rejected response:
FACTS: WH_0078 (national_CMS): avg inventory accuracy 70.2%, avg fulfilment 81.0%, 0 months w/ stockout (based on 2 records), issues on record: {'understocking': 1, 'pest_infestation': 1}
RECOMMENDATION: Not sure about that - would need to check the system for more detail.
FACTS: WH_0078 (national_CMS): avg inventory accuracy 70.2%, avg fulfilment 81.0%, 0 months w/ stockout (based on 2 records), issues on record: {'understocking': 1, 'pest_infestation': 1}
RECOMMENDATION: Not sure about that - would need to check the system for more detail.


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: explain_issue({'uid': 'district_store:WH_0068', 'commodity_category': 'essential_medicines', 'year': 2021, 'month': 1}) -> {'status': 'ok', 'uid': 'district_store:WH_0068', 'warehouse_id': 'WH_0068', 'warehouse_level': 'district_store', 'year': 2021, 'month': 1, 'reported_issue': 'pest_infestation', 'has_issue': True, 'signals': ['storage conditions not adequate', 'FEFO compliance failed', 'low inventory accuracy (22.8%)', 'high wastage (34.3%)', 'active stockout'], 'uncertain': True}

Q: why is WH_0068 at the district_store failing fulfillment for essential medicines?
A:

Chosen response:
FACTS: WH_0068 (district_store, 1/2021): reported issue = pest_infestation. other signals: storage conditions not adequate; FEFO compliance failed; low inventory accuracy (22.8%); high wastage (34.3%); active stockout (note: report not submitted, numbers may be provisional)
RECOMMENDATION: address the reported issue (pest_infestation).

Rejected response: FACTS: address the reported issue (pest_infestation).

storage conditions not adequate
FEFO compliance failed
low inventory accuracy (22.8%)
high wastage (34.3%)
active stockout


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'district_store:WH_0078'}) -> [{'uid': 'district_store:WH_0078', 'warehouse_id': 'WH_0078', 'warehouse_level': 'district_store', 'commodity_category': 'contraceptives', 'orders_backordered': 5, 'backorder_rate_pct': 71.4}]

Q: which category has the most backorders at WH_0078 at the district_store?
A:

Chosen response:
FACTS: 1 backordered records (uid=district_store:WH_0078). worst: WH_0078 (district_store, contraceptives) at 71.4% backorder rate
RECOMMENDATION: expedite WH_0078 (district_store).

Rejected response:
FACTS: 1 backordered records (uid=district_store:WH_0078). worst: WH_0078 (district_store, contraceptives) at 71.4% backorder rate
RECOMMENDATION: Not sure. (Not enough information to determine)


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'national_CMS:WH_0088'}) -> [{'uid': 'national_CMS:WH_0088', 'warehouse_id': 'WH_0088', 'warehouse_level': 'national_CMS', 'commodity_category': 'malaria_commodities', 'orders_backordered': 32, 'backorder_rate_pct': 61.5}]

Q: which category has the most backorders at WH_0088 at the national_CMS?
A:

Chosen response:
FACTS: 1 backordered records (uid=national_CMS:WH_0088). worst: WH_0088 (national_CMS, malaria_commodities) at 61.5% backorder rate
RECOMMENDATION: expedite WH_0088 (national_CMS).

Rejected response: not sure, you'd have to check the system yourself


Prompt:
You're a warehouse assistant. Answer using only the data given. Separate FACTS from RECOMMENDATION. Say if you're not sure. Don't make stuff up.

tool call: backorders({'uid': 'national_CMS:WH_0011'}) -> [{'uid': 'national_CMS:WH_0011', 'warehouse_id': 'WH_0011', 'warehouse_level': 'national_CMS', 'commodity_category': 'nutrition_commodities', 'orders_backordered': 15, 'backorder_rate_pct': 25.9}]

Q: which category has the most backorders at WH_0011 at the national_CMS?
A:

Chosen response:
FACTS: 1 backordered records (uid=national_CMS:WH_0011). worst: WH_0011 (national_CMS, nutrition_commodities) at 25.9% backorder rate
RECOMMENDATION: expedite WH_0011 (national_CMS).

Rejected response:
FACTS: 1 backordered records (uid=national_CMS:WH_0184). worst: WH_0184 (national_CMS, nutrition_commodities) at 25.9% backorder rate
RECOMMENDATION: expedite WH_0184 (national_CMS).