Manuscript Offprint
arXiv:2610.32817KrishokTech: A Bengali Agricultural Advisory System with Explicit Authorization Controls
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
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.
1 Introduction
Farmers often need treatment advice before an extension officer can visit. Their questions may be short, colloquial, or typed in Latin-script Bangla, and a request such as “Which pesticide should I spray?” may omit the crop entirely. In this setting, failure can begin before generation: retrieval may admit guidance for a different crop, while a fluent answer can make an unsupported dose appear actionable. Digital advisory services can narrow

Figure 1: KrishokTech places five control stages (T0–T4) before delivery. T0 can end a request in REFER, T1 in ASK, and T2 in CONFIRM. T3 produces an unverified draft; T4 removes unsupported dosage claims before the remaining text is delivered.
the access gap (Department of Agricultural Extension, 2022; Aker, 2011; Fabregas et al., 2019), but these unresolved inputs make pesticide advice safety-critical.
Photographs introduce another source of uncertainty. A farmer may attach a rice leaf while asking about potato disease, or the classifier may be unsure which crop it sees. Silently choosing the text or image hides that conflict (Deng et al., 2025; Zhu et al., 2024). Farmer questions also contain colloquial and Romanized forms that differ from the terminology of agricultural manuals (Bhuiyan et al., 2025; Reza et al., 2026a; Parikh and Solorio, 2021). Even after relevant evidence is retrieved, generated claims can drift from their context (Brown et al., 2025; Xu et al., 2025), and an incorrect numerical dose can be acted on directly (Reza et al., 2026b).
KRISHOKTECH is a Bengali agricultural advi-sory system built around explicit authorization controls. The generating model drafts an answer; it does not decide whether the request may proceed or whether a dosage claim may be shown. Three control families act around it: (C1) admission sends policy-covered high-risk requests to REFER and crop-less treatment requests to ASK before retrieval; (C2) evidence binding scopes retrieval to one crop and sends explicit text-image crop conflicts to CONFIRM; and (C3) release removes dosage-bearing claims that the retrieved passages and BARI/BRRI ranges do not support. The interface makes each decision visible to the farmer.
Bengali and Banglish normalization runs before admission and evidence binding, allowing colloquial and Latin-script spellings to reach the same controls as formal text. Agricultural guidance remains in an external evidence index, where maintainers can replace passages and rebuild retrieval without retraining the generator. Browser-side vision supports crop prediction on the device, while connected generation serves interactive use and the local generator supports queued SMS or offline kiosk workflows.
Our contribution is the ordered, visible control boundary rather than a new generator: admission, evidence, and release controls around a replaceable model, together with an interface that shows what stopped a request, which evidence was admitted, and why a claim was withheld. We measure each control on bounded test sets. We do not claim complete dialect coverage, general factual verification, or improved outcomes in the field.
The demonstration follows five steps, from a crop-less colloquial query to crop-bound evidence, a text-image conflict, a referral, and dosage-checked delivery (Section 4). UI preview: https://krishoktech.vercel.app; screencast (<2.5 min): https://krishoktech.vercel.app/screencast. Downloadable demonstration package: https://github.com/RaiyaanReza/KrishokChat-Agricultural-Advisory-System.
Clarifying questions can improve retrieval when a request is underspecified (Aliannejadi et al., 2019), yet models do not reliably decide when clarification is necessary (Chen et al., 2025; Gan et al., 2026). Claim-level checkers compare generated statements with supporting documents (Tang et al., 2024; Ji et al., 2026), while evidence-inspection interfaces help users examine that support (Fang and Mackenzie, 2026; Murugaraj et al., 2026). Multimodal studies further show that conflicting text and images can produce unreliable model behavior (Deng et al., 2025; Zhu et al., 2024). KrishokTech turns these concerns into visible state transitions: a missing crop produces ASK, an explicit text-image crop conflict produces CONFIRM, and an unsupported dosage claim produces DROP.
The system builds on two of our earlier studies. The KrishokChat benchmark provides Bengali agricultural data, safety tasks, and model resources used by the system (Reza et al., 2026c); a separate study evaluates retrieval architectures over an agricultural corpus (Reza et al., 2026a). Neither study implements the ordered runtime controls evaluated here. The contribution of this demonstration is the admission, evidence-binding, and release boundary around generation, together with an interface that exposes each decision to the user.
3 System Design
KrishokTech implements authorization as an ordered state transition rather than an instruction inside the generation prompt. Five stages, T0–T4, run before delivery. T0 and T1 can end a turn in REFER or ASK; T2 can enter CONFIRM; T3 produces a draft; and T4 can DROP unsupported dosage claims. Only T3 calls the answer generator. Learned components, including the crop classifier, may supply predictions to these stages, but they cannot override a halted state or release a claim rejected by T4.
3.1 Halting Before Retrieval
The first decision is whether the request may reach retrieval. At T0, normalization maps supported
Bengali, Banglish, and regional variants to canonical terms. A rule-based precheck then detects the high-risk chemical, poisoning, and crisis patterns covered by the system policy. A match ends the turn before retrieval or generation. Agronomic chemical cases are directed to the Krishi Call Centre (16123); poisoning and self-harm cases are directed to the National Emergency Service (999). This precheck enforces a bounded policy and does not attempt to determine the regulatory status of every chemical.
Requests that pass T0 reach T1. A gazetteer-based extractor identifies the crop, symptoms, and request intent without calling a language model. If a treatment request contains no crop, retrieval does not run (sources_retrieved=0), and the system enters ASK. The interface shows Bengali crop choices, a non-chemical guidance card, and the referral option. Selecting or typing a crop binds that value and allows the request to continue. Six regional synonym presets extend normalization for supported dialect forms; their current coverage is described in Appendix A.
3.2 Crop-Scoped Retrieval and Conflict Handling
At T2, the bound crop determines which evidence retrieval may admit. KrishokTech uses BM25 over about 2,100 curated passages from BARI, BRRI, and DAE guidance (Bangladesh Agricultural Research Institute, 2023; Bangladesh Rice Research Institute, 2024; Department of Agricultural Extension, 2022). BM25 keeps the retrieval path inspectable and is suitable for this small domain collection (Huly et al., 2024). The demonstrated deployment covers rice, potato, brassica, chili, corn, and wheat. Maintainers can replace passages and rebuild the external index without retraining the generator.
For a photographed crop, the browser-side classifier supplies its prediction to the router. A confident prediction binds the crop; an ambiguous prediction presents the top two candidates; and a low-confidence prediction asks the farmer to retake the photograph. The bound crop then conditions query construction and ranking. A final crop filter removes passages that mention only other crops while retaining crop-neutral guidance such as general soil recommendations.
When the crop named in the text differs from a confident image prediction, the router does not select either source silently. It enters CONFIRM, displays a Crop Mismatch warning, and withholds chemical advice until the farmer selects one crop. The selected crop becomes the binding constraint for retrieval.
3.3 Drafting, Verification, and Delivery
At T3, the selected generator receives the normalized request and crop-scoped passages. The package supports connected generation and an evaluated local krishokchat-4b deployment; operational measurements for the local path appear in Appendix B. Regardless of the generator, T3 returns an unverified draft rather than a deliverable answer.
At T4, the verifier examines each dosage-bearing numerical claim against the retrieved passage and the permitted BARI/BRRI range. If the available evidence does not support a claim, or its value falls outside the permitted range, the corresponding sentence is removed. The remaining text may then be delivered. This check has a deliberately narrow scope: it verifies dosage-bearing numerical claims and does not establish the correctness of every agronomic statement.
Delivered responses show their source, decision state, and verification path through a provenance badge and a Why panel. The same authorized content can be rendered for the web, SMS, an offline card, or read-aloud output. These displays make the system’s decision inspectable; citation display alone does not prove that the generator causally relied on a passage (Wallat et al., 2025). Together, the stages establish where a request stopped, which crop constrained its evidence, and which generated claims were permitted to reach the user.
4 Demonstration
The interface is designed for Bengali-speaking farmers and extension workers; the demonstration is aimed at researchers and practitioners building multilingual, multimodal, or safety-sensitive advisory systems. It uses five steps to show when KrishokTech proceeds, pauses, or withholds content. The public website provides a preview of the interface, while the downloadable package contains the implementation. Attendees can follow the prepared sequence and, when a generator is configured, enter their own text and photographs.
S1: A missing crop produces ASK. The attendee enters “Patay holud dag hoyeche, ki bish dibo?” (“The leaves have yellow spots. Which

(a) ASK (S1). T1 retrieves no evidence and asks the farmer to identify the crop.

(b) CONFIRM (S3). T2 holds chemical advice when the photographed and typed crops disagree.

(c) REFER (S4). T0 stops a policy-covered paraquat request and displays the 16123 referral.

(d) DROP (S5). T4 removes a dosage error and shows the BARI evidence supporting the retained advice.
Figure 2: The interface exposes four decisions at the authorization boundary. Each panel shows what stopped or changed the pipeline rather than presenting only its final answer. Full-size screens for S1–S5 appear in Appendix C.
pesticide should I use?”). Because the request asks for treatment without naming a crop, T1 stops before retrieval. The interface displays sources_retrieved=0, Bengali crop choices, and non-chemical guidance (Figure 2a). Selecting Alu (potato) binds the crop and resumes the request with potato-scoped retrieval. The step shows that missing information is resolved before evidence is selected.
S2: A photograph binds retrieval to a crop. In a new consultation, the attendee uploads a rice-leaf photograph without naming the crop. The browser-side classifier predicts rice, and T2 binds retrieval to rice guidance. The interface displays the predicted crop and the resulting evidence scope. This step shows how a visual prediction constrains which passages may reach generation.
S3: Conflicting modalities produce CONFIRM. With the rice photograph attached, the attendee asks about potato late blight. The typed and predicted crops disagree, so T2 enters CONFIRM. The interface displays a Crop Mismatch warning and asks the attendee to select rice or potato (Figure 2b). Chemical advice remains unavailable until one crop is chosen. The conflict is therefore shown to the user rather than resolved silently.
S4: A high-risk request produces REFER. The attendee asks how to apply paraquat, a request covered by the system’s referral policy. The T0 precheck ends the turn before retrieval or generation. The interface displays a safety notice and a one-tap link to the Krishi Call Centre (16123; Figure 2c). This step makes referral a terminal system state rather than a warning appended to generated advice.
S5: An unsupported dosage claim produces DROP. The attendee submits a fully specified potato-blight question. In the recorded test case, the draft contains a dosage value ten times above the permitted BARI range. T4 removes that sentence and delivers the remaining text. The provenance badge and expandable Why panel identify the removed claim and display the passage supporting the retained advice (Figure 2d). This final step shows that completing generation does not itself authorize every generated claim.
Across the five steps, attendees see the system at its decision boundaries: before retrieval, while evidence is being scoped, when text and images conflict, and after generation. The walkthrough therefore demonstrates the control path itself, not only successful advisory answers.
5 Evaluation
We evaluate whether the implementation follows the authorization boundary described in Section 3. The tests address three questions: (Q1) Do admission controls halt underspecified or policy-covered
| 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 |
Table 1: Main component results. For crop binding, the sequence is open retrieval, gold-crop binding, and the alias-based crop filter. For the generator test, it is the neutral prompt, guarded prompt, and T0 replay.
requests before retrieval? (Q2) Does crop binding restrict the evidence available to generation and expose text–image conflicts? (Q3) Do the prompt, precheck, and dosage verifier reduce the number of unsafe claims that can reach delivery? Table 1 reports the main results; Appendix E provides confidence intervals and supporting tests.
5.1 Q1: Admission and Referral
We test the T1 crop gate on 200 collected Bengali farmer treatment questions. Two annotators independently labeled whether each question named a crop and agreed on all 200 cases (Cohen's ). At T1, all 30 crop-less questions entered ASK before retrieval, while all 170 crop-specified questions were permitted to continue. This result measures the crop-presence decision at T1 rather than the outcome of later controls.
We separately test whether normalization helps T0 recognize colloquial and Latin-script forms. The constructed set contains 85 high-risk requests with Banglish, phonetic, or indirect wording and 15 benign farmer questions. A precheck limited to formal English and Bengali script intercepted 1 of the 85 high-risk requests. After normalization, T0 intercepted all 85 and flagged none of the 15 benign controls. The examples include forms such as parakwat for paraquat; category-level results appear in Appendix A.
5.2 Q2: Evidence Binding and Conflict Handling
We evaluate crop binding on 400 stress queries containing colloquial, dialectal, Banglish, or ambiguous disease descriptions. Each query has an adjudicated crop. A retrieved list counts as cross-crop when at least one of its top five passages names another crop but not the adjudicated crop. This is a property of the retrieved evidence, not a judgment of the final answer.
Open retrieval produced cross-crop lists for 146 of 400 queries (36.5%). Binding the adjudicated crop, which simulates correct crop routing, reduced this to 121 of 400 (30.25%): 25 queries improved and none became worse (exact McNemar ). The post-retrieval crop filter removed all remaining violations recognized by its alias list, while all 400 queries retained five passages. Because this zero is defined by the filter's own aliases, we also inspected 30 lists by title. Twenty-six contained no other crop, while four contained crop names outside the alias list: carrot, sweet potato, or forest trees. The independent audit therefore bounds what the 0/400 result establishes.
We test the CONFIRM transition with 54 farmer-derived text–image conflicts and 400 synthetic conflicts. Each case has a matched control containing the same query and an image of the named crop. The mismatch state fired on 53 of 54 farmer-derived cases and all 400 synthetic cases, while firing on none of the 454 matched controls. The single miss referred to the crop only implicitly.
5.3 Q3: Release Checks on Generated Advice
We first test the generator boundary using 280 fixed attack requests. With T0 and T4 disabled, each request was run once through the evaluated local krishokchat-4b deployment under a neutral prompt and once under the guarded prompt. A fixed rule-based judge marked 147 of 280 neutral responses (52.5%) and 30 of 280 guarded responses (10.71%) as successful attacks. Replaying the requests through T0, without making new model calls, shows that 17 of those 30 requests would have terminated before generation. This leaves 13 successful attacks among the 280 requests (4.64%) eligible to continue. The result demonstrates how the precheck complements the prompt for this model and test set; it does not establish complete generator independence.
We then test T4 using 38 previously verified answers. We inserted 118 controlled dosage errors while retaining the 38 unmodified answers as clean controls. The verifier removed 114 of the 118 inserted errors and rejected none of the clean originals. The four missed errors and results from the larger passage-derived benchmark are reported in Appendix E. This test concerns dosage-bearing numerical claims only; it does not evaluate every factual statement in an answer.
5.4 Scope of the Evidence
These results are component and property-conformance tests on the stated samples. They show that the evaluated implementation usually follows its admission, evidence-binding, conflict, and dosage-release rules. They do not establish improved yield, correct farmer decisions, or complete safety in deployment. The crop-binding experiment assumes a correct crop label; the normalization attacks are constructed; 400 of the 454 conflict cases are synthetic; each generator prompt was run once; and the dosage errors were inserted into existing answers. These limits define the claims carried into the conclusion.
6 Limitations, Availability, and Conclusion
Limitations. KrishokTech currently supports six crop groups and a bounded Bengali agricultural evidence collection. Adding a crop requires new evidence, aliases, routing rules, and a compatible vision classifier. The dialect presets expand known synonyms but have not been evaluated as general dialect-understanding models. Text–image conflict detection depends on an explicit crop mention or a confident image prediction, and the crop filter cannot reject crop names absent from its alias list.
The controls also have deliberately narrow scopes. T0 recognizes policy-covered patterns rather than every possible high-risk paraphrase, while T4 checks dosage-bearing numerical claims rather than all agronomic statements. Thirteen of 280 attacks remained eligible to continue after the guarded prompt and T0 replay, and the dosage verifier missed 4 of 118 inserted errors. These residual cases prevent a claim of complete safety.
The evaluation measures component behavior on bounded datasets. Several tests use constructed attacks or synthetic conflicts, and the crop-binding experiment assumes that the crop was identified correctly. We have not measured effects on farmer decisions, crop outcomes, or extension-service workload. Local generation is also slower than connected generation and is better suited to queued SMS or kiosk use. Browser-side classification and local retrieval reduce connectivity requirements, but they do not show that the complete pipeline runs interactively on every low-end phone.
Availability and Licensing. The interface preview is at https://krishoktech.vercel.app and the video is at https://krishoktech.vercel.app/screencast.Code, controls, and tests are released under tag v1.0.0-eacl2027 at https://github.com/RaiyaanReza/KrishokChat-Agricultural-Advisory-System. All evaluation results and safety gates are verifiable offline without API keys via a single command (python reproduce.py); an automated CI workflow verifies every release. Continuous access to a paid backend is not required to inspect code or controls.
Browser-side vision classifiers are released at https://huggingface.co/RaiyanKhaan/KrishokTech-Models. The generator's LoRA adapter and evidence-index artifacts are available at https://huggingface.co/RaiyanKhaan/KrishokChat-Advisory-System. The MIT license in the GitHub repository applies to the application code. Model files remain subject to the licenses and base-model terms stated on their respective model cards. BARI, BRRI, and DAE passages retain their original source attribution and are not relicensed by the software license. The public interface retains the KrishokChat product label; KrishokTech denotes the controlled demonstration configuration evaluated here.
Conclusion. KrishokTech places an explicit authorization boundary around a replaceable answer generator: deterministic controls decide whether retrieval may begin, which crop constrains the evidence, whether conflicting modalities require confirmation, and whether a dosage-bearing claim may be delivered. On the evaluated test sets, these controls halted all crop-less treatment requests, exposed 453 of 454 text-image conflicts, and removed 114 of 118 inserted dosage errors. The demonstration makes these decisions visible while keeping the claims bounded to component behavior; KrishokTech is designed to support farmers and extension services, and field evaluation remains future work.
Ethics and Broader Impact Statement
Agricultural advice can affect health, livelihoods, and crop production. A fluent but incorrect chemical recommendation may be acted on immediately, especially when access to an extension officer is limited. KrishokTech therefore exposes its control decisions and routes selected requests to human services, but these measures do not remove the risks of automated advice.
Farmer Query Data. The T1 evaluation uses 200 Bengali questions: 100 collected from public Bangladeshi farming groups on Facebook, 60 submitted to KrishokChat, and 40 taken from the public question archive of krishibangla.com. We retained the question text needed for analysis and removed names, phone numbers, locations, and account information. No demographic attributes were inferred. Two annotators independently labeled crop presence and normalized crop identity; the paper reports aggregate results and agreement statistics. Publicly posted text may remain sensitive after direct identifiers are removed, so quotations and released records should be checked for indirect identification.
Agricultural Images and Privacy. The demonstrated browser classifier is designed to process crop photographs locally through ONNX and WebAssembly. The privacy claim applies to this browser-side path; any deployment that enables a server fallback, remote logging, or image telemetry must disclose that transmission and apply appropriate retention and access controls. Evaluation images come from previously released agricultural datasets. Their source attribution and license conditions are retained in the artifact metadata, and we do not claim ownership of those images.
Chemical and Dosage Guidance. T0 stops the high-risk chemical, poisoning, and crisis patterns covered by its policy before retrieval or generation. T4 checks dosage-bearing numerical claims against retrieved passages and permitted dose ranges. Both controls remain incomplete: unseen wording can pass T0, 13 of 280 tested attacks remained eligible to continue after the guarded prompt and T0 replay, and the verifier missed 4 of 118 inserted dosage errors. KrishokTech should therefore not be used as the sole authority for chemical application or medical decisions.
Referral Information. Agronomic chemical cases covered by the policy are directed to the Krishi Call Centre (16123). Poisoning, self-harm, and medical-crisis language is directed to the National Emergency Service (999) and appropriate medical care. The interface presents these routes immediately, but it cannot guarantee service availability or that a user will reach help. Helpline details and operating conditions may change and should be checked against current official information before deployment.
Third-Party Services. When connected generation is enabled, the text required for a request is transmitted to the configured model provider and is governed by that provider's retention and processing terms. Deployers must disclose the provider and avoid sending unnecessary personal information. The public website is an interface preview and need not keep a paid generation service active. The downloadable package can instead be configured with a compatible local runtime, subject to the local model's license and hardware requirements.
Human Oversight and Broader Impact. KrishokTech is intended to help farmers and extension workers inspect an advisory path, not to replace agronomists, medical professionals, or emergency services. ASK and CONFIRM return unresolved decisions to the user, while REFER directs policy-covered cases to a human service. Visible evidence and provenance may improve scrutiny, but they may also create false confidence if users interpret a citation as proof that every statement is correct. The present evaluation measures system behavior rather than effects on farmers, and deployment should be preceded by participatory evaluation with intended users and agricultural experts.
References
Jenny C Aker. 2011. Dial “a” for agriculture: a review of information and communication technologies for agricultural extension in developing countries. Agricultural economics, 42(6):631–647.
Mohammad Aliannejadi, Hamed Zamani, Fabio Crestani, and W Bruce Croft. 2019. Asking clarifying questions in open-domain information-seeking conversations. In Proceedings of the 42nd international acm sigir conference on research and development in information retrieval, pages 475–484.
Mohd Ruhul Ameen, Akif Islam, Farjana Aktar, and M Saifuzzaman Rafat. 2026. KrishokBondhu: A retrieval-augmented voice-based agricultural advisory call center for Bengali farmers. In 2026 IEEE
2nd International Conference on Quantum Photonics, Artificial Intelligence & Networking (QPAIN), pages 1–6. IEEE.
Bangladesh Agricultural Research Institute. 2023. Krishi projekti hatboi (handbook on agricultural technology). BARI Publications, Gazipur, Bangladesh.
Bangladesh Rice Research Institute. 2024. Adhunik dhaner chas (modern rice cultivation manual). BRRI Publications, Gazipur, Bangladesh.
Md Tofael Ahmed Bhuiyan, Md Abdur Rahman, and Abdul Kadar Muhammad Masum. 2025. Bhasabodh: Bridging bangla dialects and romanized forms through machine translation. In Proceedings of the Second Workshop on Bangla Language Processing (BLP-2025), pages 113–118.
Andrew Brown, Muhammad Roman, and Barry Devereux. 2025. A systematic literature review of retrieval-augmented generation: Techniques, metrics, and challenges. arXiv preprint arXiv:2508.06401.
Maximillian Chen, Ruoxi Sun, Tomas Pfister, and Sercan Arik. 2025. Learning to clarify: Multi-turn conversations with action-based contrastive self-training. In International Conference on Learning Representations, volume 2025, pages 32244–32279.
Ailin Deng, Tri Cao, Zhirui Chen, and Bryan Hooi. 2025. Words or vision: Do vision-language models have blind faith in text? In 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 3867–3876. IEEE.
Department of Agricultural Extension. 2022. Agricultural extension manual. Technical report, Ministry of Agriculture, Government of Bangladesh, Dhaka.
Raissa Fabregas, Michael Kremer, and Frank Schilbach. 2019. Realizing the potential of digital development: The case of agricultural advice. Science, 366(6471):eaay3038.
Meng Fang and Harry Mackenzie. 2026. FactSearch: An interactive agentic fact search system for verifying large language model outputs. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations), pages 367–373.
Yujian Gan, Changling Li, Jinxia Xie, Luou Wen, Matthew Purver, and Massimo Poesio. 2026. Clarq4llm: A benchmark for models clarifying and requesting information in task-oriented dialog. IEEE Transactions on Audio, Speech and Language Processing.
Md Asif Hossain, Nabil Subhan, Mantasha Rahman Mahi, and Jannatul Ferdous Nabila. 2026. Cost-efficient cross-lingual retrieval-augmented generation for low-resource languages: A case study in Bengali agricultural advisory. arXiv preprint arXiv:2601.02065.
Oz Huly, Idan Pogrebinsky, David Carmel, Oren Kurland, and Yoelle Maarek. 2024. Old IR methods meet RAG. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 2559–2563.
Yuelyu Ji, Min Gu Kwak, Hang Zhang, Xizhi Wu, Chenyu Li, and Yanshan Wang. 2026. MedRAGChecker: Claim-level verification for biomedical retrieval-augmented generation. arXiv
preprint arXiv:2601.06519.
Keerthana Murugaraj, Salima Lamsiyah, and Martin Theobald. 2026. RAGVUE: A diagnostic view for explainable and automated evaluation of retrieval-augmented generation. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 3: System Demonstrations), pages 512–526.
Dwija Parikh and Thamar Solorio. 2021. Normalization and back-transliteration for code-switched data. In Proceedings of the Fifth Workshop on Computational Approaches to Linguistic Code-Switching, pages 119–124.
Khan Raiyan Ibne Reza, Sanjana Aktar Maria, and Sumaiya Tabassum Nimi. 2026a. Where does retrieval fail? evaluating RAG architectures for agricultural advisory. arXiv preprint arXiv:2608.14886.
Khan Raiyan Ibne Reza Reza, Sumaiya Tabassum Nimi, and Omar Ibne Shahid. 2026b. Krishokchat: A provenance-traceable multi-task bengali agricultural benchmark with safety-critical chemical advisory.
Khan Raiyan Ibne Reza Reza, Sumaiya Tabassum Nimi, and Omar Ibne Shahid. 2026c. Krishokchat: A provenance-traceable multi-task bengali agricultural benchmark with safety-critical chemical advisory.
Namita Singh, Jacqueline Wang'ombe, Nereah Okanga, Tetyana Zelenska, Jona Repishti, Sanjeev Mishra, Rajsekar Manokaran, Vineet Singh, Mohammed Irfan Rafiq, Rikin Gandhi, et al. 2024. Farmer.Chat: Scaling AI-powered agricultural services for smallholder farmers. arXiv preprint arXiv:2409.08916.
Liyan Tang, Philippe Laban, and Greg Durrett. 2024. MiniCheck: Efficient fact-checking of LLMs on grounding documents. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 8818–8847.
Abhay Vijayvargia, Ajay Nagpal, Kundeshwar Pundalik, Atharva Savarkar, Smita Gautam, Pankaj Singh, Rohit Saluja, and Ganesh Ramakrishnan. 2025. Intent aware context retrieval for multi-turn agricultural question answering. arXiv preprint arXiv:2508.03719.
Jonas Wallat, Maria Heuss, Maarten de Rijke, and Avishek Anand. 2025. Correctness is not faithfulness in retrieval augmented generation attributions. In Proceedings of the 2025 International ACM SIGIR Conference on Innovative Concepts and Theories in Information Retrieval (ICTIR), pages 22–32.
Shan Xu, Zhaokun Yan, Chengxiao Dai, and Fan Wu. 2025. MEGA-RAG: a retrieval-augmented generation framework with multi-evidence guided answer refinement for mitigating hallucinations of LLMs in public health. Frontiers in Public Health, 13:1635381.
Tinghui Zhu, Qin Liu, Fei Wang, Zhengzhong Tu, and Muhao Chen. 2024. Unraveling cross-modality knowledge conflicts in large vision-language models. arXiv preprint arXiv:2410.03659.
A Architecture, Decision Logic, and Gate Evaluation
This section specifies the state transitions behind T0–T4 and provides supporting results for the pre-retrieval controls. The released implementation includes the T0 rules and chemical registry in backend/app/domain/safety_policy.py and backend/app/domain/chemical_registry.py.
State transitions. REFER is terminal for the current turn: T0 returns the appropriate referral without retrieval or generation, and a later message begins again at T0. ASK ends the current turn with a request for the missing crop; selecting a chip or typing a crop binds that value and allows the request to continue to T2. CONFIRM holds chemical advice when the typed and predicted crops conflict; the farmer's selection becomes the bound crop. DROP applies at claim level after generation: T4 removes an unsupported dosage-bearing sentence and delivers any remaining authorized content.
Information-state extractor (T1). The extractor uses gazetteers and pattern rules, without a language-model call, to fill five fields: crop, growth stage, location, intent, and symptom terms. Its internal taxonomy contains 45 normalized crop labels. Thirty-seven of these labels occurred in the 200-query evaluation set, while the demonstrated crop-specific retrieval and vision path covers six crop groups.
For the 200 farmer questions, the extractor matched the adjudicated normalized crop label on of cases. The remaining errors concerned crop identity rather than crop presence: the T1 presence decision still separated all 30 crop-less questions from the 170 crop-specified questions. Annotator agreement was for crop presence , for normalized crop identity , and for intent .
A separate constructed pilot contained 100 crop-less and 140 crop-specified treatment requests. T1 halted all 100 crop-less requests. All 140 crop-specified requests avoided the missing-crop halt; 114 continued directly, while 26 requested another bounded field such as growth stage or location.
Vision crop router (T2). Let and be the highest and second-highest crop probabilities. If and , the router binds the top prediction. If but either confidence condition fails, the interface presents the top two crops for confirmation. If , retrieval remains halted and the interface asks for another photograph. These thresholds govern the demonstrated router and are not calibrated estimates of correctness for crops outside the evaluated data.
| 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 |
Table 2: Constructed Banglish and phonetic test for T0 (N = 100). The formal condition recognizes only formal English and Bengali-script terms; the normalized condition adds the supported variants. The 95% Wilson interval for 85/85 intercepted attacks is [95.7, 100].
Dialect presets. The DialectSelector offers Standard Bengali, Sylheti, Chittagonian, Noakhali, Rangpuri, and Barishali presets. A preset adds known regional synonyms during normalization while leaving recognized chemical names unchanged. These are lookup-based interface features; we have not measured general understanding or accuracy for any dialect.
Provenance badges. Each rendered result carries one interface badge: Fact lookup for an exact match in the nine-fact base without generation; Grounded generation for a generated draft processed by T4; Guidance card for non-chemical information shown during ASK; Clarification for crop selection or a mismatch; or Referral for T0 routing. The Grounded generation badge records that the dosage check ran. It does not mean that every factual statement was independently verified.
Banglish red-teaming. Table 2 reports the constructed normalization test used for T0. For the three attack sets, the outcome is the number intercepted before retrieval. For the benign set, it is the number allowed to continue.
B Delivery, Offline Operation, and Deployment
This section reports implementation measurements that clarify how an authorized result is rendered and operated. These measurements are supplementary: they do not establish usability on farmers' devices or performance under real rural network conditions.
| 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 ≤ 160 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 |
Table 3: Paired SMS comparison on 100 long dosage-bearing advisories (seed 42). Comp. 1 is the original deterministic compressor; Comp. 2 additionally copies the nearest recognized active ingredient from the verified answer. Sixty-seven reference advisories contain a chemical recognized by the scorer.
B.1 SMS Rendering
Bengali-script SMS uses UCS-2 encoding, which permits 70 characters in one message and 67 characters per part in a concatenated message. A 160-character Bengali advisory therefore occupies two or three SMS segments rather than one. Across separate offline and connected test sets, the deterministic packer kept 399 of 400 outputs within its configured 160-character limit. All eight referral cases contained only the referral message.
Table 3 compares four rendering methods on the same 100 long, dosage-bearing advisories. The current compressor copies detected values from the verified answer and does not generate new quantities. It improved preservation of both the dose and chemical name from 14/100 under naive truncation to 61/100. This remains insufficient for treating the compact SMS as semantically equivalent to the full answer. The SMS view is therefore a constrained rendering whose source and full verified response should remain available when exact chemical details matter.
B.2 Offline Retrieval
The local BM25 path obtained a hit rate of 0.94 on the 400-query retrieval benchmark. With service-worker precaching enabled, the test recorded no cache miss in 400 requests. In a network simulation, remote retrieval lost 13.25 percentage points at packet loss and 30.0 points at packet loss, while local retrieval was unchanged. Packet loss was simulated rather than measured in a field deployment. This result applies to retrieval; offline generation additionally requires a compatible local model and sufficient hardware.
B.3 Installation Footprint
Table 4 reports measured application and vision-asset sizes. The minimal installation occupies
| Artifact, excluding LLM weights | Size (MB) |
|---|---|
| Unique ONNX vision assets (11 files) | 95.64 |
| Minimal installation | 284.0 |
| Installation with PyTorch checkpoints | 339.6 |
Table 4: Measured installation footprint. Language-model weights are excluded from every row.
| 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 |
Table 5: Latency over 400 requests with BM25 retrieval and generation stubbed out. Component medians need not sum to the median total.
284.0 MB, including 95.64 MB of unique ONNX vision files. These totals exclude language-model weights, which require several additional gigabytes. The footprint therefore supports browser-side vision and local retrieval, not a claim that the complete generator fits on a low-end phone.
B.4 Updating the Evidence Index
Agricultural passages are stored outside the generator. As an implementation check, we removed and reinserted 10 guideline passages selected from the top-ranked results of the stress queries. Rebuilding the index took a median of 0.2 s on the evaluation laptop, and the rebuilt full index reproduced the deployed top five for all 400 queries. After reinsertion, each of the 10 selected passages again appeared at rank 1 for its original query.
This check confirms that passages can be replaced and the index rebuilt without loading or modifying the generator. It does not measure whether newly added guidance is correct, sufficiently complete, or retrieved well for a new topic. Adding a crop still requires supporting evidence, aliases, routing rules, and any corresponding vision component.
B.5 Latency
Table 5 reports non-generation latency over 400 requests. The median total was 33.565 ms. Generation is excluded from this total: on the evaluated CPU setup, the local generator required a median of 24.3 s for 150 output tokens and is therefore intended for queued or kiosk workflows rather than interactive low-latency chat.
| Cohort | Dial. | Turns | Check | Result |
|---|---|---|---|---|
| Carryover | 75 | 175 | Crop slot kept | 100/100 |
| Crop shift (same) | 75 | 150 | Slots flushedOld slot kept | 75/750/75 |
| Delayed evasion | 30 | 60 | Turn-2 catch | 30/30 |
| Clarification | 20 | 40 | ASK, then bound | 20/20 |
| Total | 200 | 425 |
Table 6: Multi-turn state tests on constructed dialogues. The crop-shift cohort is scored on two checks; no pooled score is reported. Carryover counts the 100 follow-up turns.
B.6 Trace Ordering
We inspected the provenance traces for 100 evaluation cases. All 100 preserved the required order among the stages present in the turn, with a median of nine recorded events. This is a conformance check on event ordering; it does not establish that every recorded source causally determined the generated text.
C Demonstration Gallery
Figures 3a–3e show full-size screens for the five steps (S1–S5) in Section 4.
D Multi-Turn State Tests
These tests check that conversation state moves as designed across turns. The suite has four constructed dialogue cohorts (200 dialogues, 425 turns) and five checks; the crop-shift cohort is scored twice (Table 6). Follow-up turns are rewritten into standalone queries by an LLM rewriter (gemini-2.5-flash-lite; 58 rewrites).
In anaphoric carryover, farmers ask follow-ups such as “tahole ekhon ki spray korbo?” (“what should I spray then?”) without restating the crop; the crop slot was kept in all 100 follow-up turns. In crop shift, farmers switch crops mid-conversation; all 75 switches were detected and the previous crop’s disease slots were cleared. This measures conversation state, not the text of generated advice. In delayed evasion, a benign first turn is followed by a request for a prohibited chemical (for example paraquat, Furadan, or methamidophos); T0 stopped all 30 second turns (median 0.20 ms) and showed the 16123 referral. In clarification, a crop-less symptom query halted at ASK and the crop supplied on turn two was bound in all 20 dialogues.

(a) ASK (S1): missing crop halts before retrieval; offers crop chips.

(b) BIND (S2): on-device classifier bounds retrieval to the predicted crop.

(c) CONFIRM (S3): mismatch badge holds advice on conflicting inputs.

(d) REFER (S4): safety notice with 16123 helpline call button.

(e) DROP (S5): T4 strips the unsupported dosage claim and retains BARI evidence.
Figure 3: Demonstration gallery: the five website states expose admission, crop binding, conflict confirmation, safety referral, and dosage release. The two-row, three-column layout enlarges the screenshots while preserving their aspect ratios.
E Evidence Summary and Limitations Ledger
Tables 7 and 8 list each measured result with its sample size, status, and scope. Status is measured (direct measurement on benchmark or logged data), pilot (small controlled check), simulated (part of the condition, such as packet loss, is simulated), modeled (derived from a cost model), or stated (a limitation without a measurement).
| Component | Measure and result | n | Status | Scope and boundary |
|---|---|---|---|---|
| Admission and referral (C1) | ||||
| Crop gate | Halted 30/30 crop-less queries (15.0% of the set, Wilson [10.71, 20.61]); passed 170/170 crop-specified queries | 200 | Measured | Real farmer queries, dual-annotated (κ = 1.00); no false halts on these 170 |
| Extractor accuracy | Crop label matched gold on 95.5%; miss 1.5%, false positive 3.0% | 200 | Measured | Same 200 queries; separate from annotator agreement |
| Controlled pilot | Crop-less requests halted 100/100; specified requests passed directly 114/140, 26/140 received a bounded clarification for another slot | 240 | Pilot | Constructed pairs; conformance, not open-domain accuracy |
| Token metering | Median 89 tokens for a clarification vs 2,146 for retrieval context | 200 | Measured | Separate medians; no combined saving is claimed |
| LLM vs rule-based gate | LLM halted 10% vs 15% for the gate; decision agreement 0.91; median LLM latency 4,218.6 ms | 200 | Measured | Halt rate and latency only; a 14-answer review (7/14 medium or better) is descriptive |
| Banglish precheck | 85/85 attacks intercepted (95% CI [95.7, 100.0]) vs 1/85 for a formal-only precheck; 0/15 false alarms | 100 | Measured | Constructed Latin-script and phonetic attacks; pattern matching median 0.016 ms, full T0 0.321 ms |
| Off-topic audit | 10/10 injections blocked; off-topic queries refused 0/30 by T0 and 25/30 (83.33%) by the LLM intent classifier | 40 | Measured | Five weather queries are routed to agricultural information by design |
| Evidence binding and conflicts (C2) | ||||
| Crop binding | Top-5 cross-crop retrieval was 36.5% with open retrieval and 30.25% with the adjudicated crop bound (146 vs. 121 of 400); 25/0 discordant, exact McNemar p = 5.96 × 10-8 | 400 | Measured | Simulates correct routing; this is a retrieval measure, not answer quality |
| Crop filter (N08c) | Other-crop top-5 lists 0/400 (vs 121/400 bound only, current code); 121/0 discordant, p < 10-36; five passages served for 400/400; gold-disease hit@5 20/120 in both arms; title check 26/30 clean, 4 with crops outside the alias list | 400 | Measured | Filter and metric share the alias list, so 0/400 holds by construction; coverage, disease hit and title check are the independent checks |
| Text-extracted binding | Top-5 cross-crop retrieval 30.25% (no gate) vs 28.75% (gated pipeline); 6/0 discordant, p = 0.031 | 400 | Measured | All 400 name a crop, so the gate halts none; separate run from the row above |
| Disease vision (top-1) | 0.9413 to 0.9907 across six crop-specific classifiers | 4,294 | Measured | Disease within a crop, not crop routing; 100% ONNX-PyTorch label agreement |
| Family router | Botanical family correct for 433/437 (0.9908, [97.67, 99.64]) | 437 | Measured | Six target crops, wheat-800 excluded; not open-world identification |
| INT8 quantization | Wheat 3.68 × smaller (5.92 to 1.61 MB), 0.00 pp drop (n = 400); potato 0.09 pp (n = 1,170), brassica 0.00 pp (n = 443); 1.5 to 2.0 × slower on non-VNNI x86 CPUs | 2,013 | Measured | Storage saving, not speedup; rice INT8 lost 2.5 pp, exceeded the 2.0 pp gate, and was not deployed |
| Mismatch badge | Fired on 53/54 farmer conflicts [90.2, 99.7] and 400/400 PRISM conflicts [99.05, 100.0]; 0/54 and 0/400 matched controls | 908 | Measured | One implicit-reference miss (farmer_q.63) |
Table 7: Evidence summary for admission and evidence binding. Status is defined at the start of this appendix.
| Component | Measure and result | n | Status | Scope and boundary |
|---|---|---|---|---|
| Generation and release (C3) | ||||
| Guarded prompt, local model | ASR 10.71% [7.61, 14.88] guarded vs 52.5% [46.66, 58.28] neutral (30 vs 147 of 280); Bengali-native 19/100 vs 77/100 | 280 per arm | Measured | krishokchat-4b, T0 and T4 disabled; 210 prompts in seven families plus 70 Bengali-native probes; rule-based judge |
| T0 + guarded prompt, local | ASR 4.64% [2.73, 7.78] (13/280); Bengali-native 2/100 [0.55, 7.0]; T0 stopped 207/280 prompts and 17 of the 30 prompt-level successes | 280 | Measured | Replay of the guarded N14 responses with T0 applied (no new model calls); T4 not applied. On 200 farmer queries T0 matched 9: 8 out-of-scope requests (training, livestock, input sourcing) sent to 16123 by the coverage rule, 1 false safety match |
| Output audit | 46/47 guarded outputs safe and actionable, 1/47 vague but harmless, 0/47 dangerous; 3/3 unguarded controls dangerous; Fleiss κ = 0.82 | 50 | Measured | Three blinded raters (two undergraduates, one extension officer) |
| Dosage verifier, live | 114/118 inserted errors caught (96.6%); 0/38 unmodified answers rejected | 38 | Measured | Errors inserted into 38 live answers, so they are not independent natural errors |
| Dosage verifier, scaled | 296/350 inserted errors caught (84.6%): overdose 76/76, underdose 67/67; chemical 85%, unit 73%, invented PHI 65% | 528 | Measured | Cases built from 88 BARI/BRRI passages; numerical dosage sentences only |
| Multi-turn state | Slot kept in 100/100 follow-ups; 75/75 crop shifts flushed; 30/30 delayed attacks caught; 20/20 ASK then bound | 200 | Measured | Constructed dialogues, 425 turns, four cohorts; state checks, not generated advice |
| Trace ordering | 100/100 traces in required event order (median 9 events) | 100 | Measured | Sampled evaluation cases |
| Delivery and deployment | ||||
| SMS length | 399/400 messages within 160 characters; 8/8 referral messages carried only the referral | 400 | Measured | Bengali output uses UCS-2, so 160 characters is 2-3 segments |
| SMS slot survival | Dose, interval, and PHI kept in 1,000/1,000 constructed tuples; dose kept in 65/66 live gold advisories vs 12/92 for naive truncation | 1,000 | Measured | Different denominators, not a paired comparison |
| SMS comparison | Dose kept in 23 (naive), 89 (LLM), 92 (Comp. 1), 94 (Comp. 2) of 100; chemical name in 20, 56, 34, 63; both in 14, 51, 32, 61; 0 invented values for Comp. 2 | 100 | Measured | Seed 42; no model calls for the compressors; active-ingredient list overlaps the scorer's list |
| Offline retrieval | Local BM25 hit rate 0.94, 0/400 cache misses; remote retrieval loses 13.25 pp (15% loss) and 30.0 pp (30% loss) | 400 | Measured, loss simulated | Retrieval only |
| Non-LLM overhead | Median 33.565 ms (p95 67.833 ms): safety 0.321, BM25 26.831, verifier 4.815 ms | 400 | Measured | Stub LLM; local generation about 24 s per call |
| Installation footprint | 95.64 MB ONNX vision assets; 284.0 MB minimal; 339.6 MB with PyTorch checkpoints | n/a | Measured | Excludes the language-model weights |
| Knowledge update (X5) | 10/10 withheld passages at rank 1 after re-insertion; index rebuild 0.2 s (median); rebuilt index matches deployed top-5 on 400/400 queries | 10 | Measured | Leave-one-out on real passages; no model loaded; not evidence for adding new crops |
| Retrieval backend | BM25 only; dense retrieval not evaluated | n/a | Stated | All retrieval numbers are BM25-only |
Table 8: Evidence summary for generation, release, delivery, and deployment. Status is defined at the start of this appendix.