KrishokTech: A Bengali Agricultural Advisory System with Explicit Authorization Controls
Organizations: Department of Computer Science and Engineering, North South University, Dhaka 1229, Bangladesh
Abstract
For agricultural advisory, generating an answer is only part of the problem: the system must also control unsafe requests, work with limited connectivity, and accommodate changing guidance. KRISHOKTECH is a Bengali agricultural advisory system built around an explicit authorization boundary around generation. Before retrieval, normalization and rule-based admission checks refer policy-covered high-risk requests and ask for a crop when treatment intent is underspecified. The system then binds retrieval to a single crop and asks for confirmation when the text and image indicate different crops. After generation, a narrow verifier removes dosage claims not supported by retrieved BARI/BRRI evidence. Agricultural guidance is kept in an external evidence index that can be updated without retraining the generator, while browser-side vision and local retrieval reduce connectivity requirements. The interface makes these decisions visible as ASK, CONFIRM, REFER, and DROP, together with their evidence. On 200 farmer queries and 400 stress queries, the controls halted underspecified requests and reduced cross-crop retrieval violations from 36.5% to 0% under the tested alias filter. Mismatch detection caught 453 of 454 text-image conflicts, while the verifier caught 114 of 118 inserted dosage errors. The demonstration shows how these controls govern the path from request to delivered advice.
Figures & tables
| Control | Test set | Result |
|---|---|---|
| T1 crop gate (C1) | 200 farmer queries | 30/30 halt; 170/170 pass |
| T0 normalization (C1) | 85 attacks, 15 benign | 85/85 caught; 0/15 flagged |
| Crop binding/filter (C2) | 400 stress queries | 146 121 0 lists |
| Mismatch state (C2) | 54 farmer, 400 synthetic | 453/454; 0/454 controls |
| Prompt + T0 (C1) | 280 fixed attacks | 147 30 13 success |
| Dosage verifier (C3) | 118 errors, 38 clean | 114 caught; 0/38 rejected |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Set | n | Formal | Normalized | Route |
| Phonetic chemical | 35 | 0 blocked | 35 blocked | 16123 |
| Banglish crisis | 25 | 1 blocked | 25 blocked | 999 |
| Indirect sabotage | 25 | 0 blocked | 25 blocked | 16123 |
| All attacks | 85 | 1 (1.2%) | 85 (100%) | |
| Benign control | 15 | 15 passed | 15 passed | none |
| Measure | Naive | LLM | Comp. 1 | Comp. 2 |
|---|---|---|---|---|
| Dose retained | 23/100 | 89/100 | 92/100 | 94/100 |
| Chemical retained | 20/100 | 56/100 | 34/100 | 63/100 |
| Both retained | 14/100 | 51/100 | 32/100 | 61/100 |
| Length chars | 100/100 | 98/100 | 100/100 | 100/100 |
| UCS-2 segments (mean) | 3.0 | 2.1 | 2.5 | 2.5 |
| Invented value | 0 | 1 | 0 | 0 |
| Artifact, excluding LLM weights | Size (MB) |
|---|---|
| Unique ONNX vision assets (11 files) | 95.64 |
| Minimal installation | 284.0 |
| Installation with PyTorch checkpoints | 339.6 |
| Component | Median (ms) | p95 (ms) |
|---|---|---|
| Safety processing | 0.321 | 0.705 |
| BM25 retrieval | 26.831 | 61.248 |
| Dosage verification | 4.815 | 11.220 |
| Non-generation total | 33.565 | 67.833 |
| Cohort | Dial. | Turns | Check | Result |
|---|---|---|---|---|
| Carryover | 75 | 175 | Crop slot kept | 100/100 |
| Crop shift | 75 | 150 | Slots flushed | 75/75 |
| (same) | Old slot kept | 0/75 | ||
| Delayed evasion | 30 | 60 | Turn-2 catch | 30/30 |
| Clarification | 20 | 40 | ASK, then bound | 20/20 |
| Total | 200 | 425 |
LLM Guardrails
Large language model guardrails detect or constrain harmful outputs, prompt attacks, and unsafe agent actions before they cause harm.
See all 194 papers