---
title: "From Script to Semantics: Prompting Strategies for African NLI"
description: "The authors test five zero-shot prompt designs on the AfriXNLI test sets for Swahili, Yoruba and Hausa, using Llama3.2-3B and… 8 references."
authors: ["Anuj Tiwari", "Terry Oko-odion", "Hannah Nwokocha"]
year: 2026
venue: "Proceedings of Resources for African Indigenous Languages (RAIL) 2026 @ LREC 2026"
source: "https://aclanthology.org/2026.rail-1.8/"
doi: "10.63317/3eydkjk4pzb7"
licence: "CC BY-NC 4.0 (ELRA, LREC proceedings)"
licence_url: "https://creativecommons.org/licenses/by-nc/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/tiwari-2026-script-semantics-prompting-strategies-african/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/tiwari-2026-script-semantics-prompting-strategies-african/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2026](https://md.research.elamur.ai/free/en/papers/2026/page/31/) / From Script to Semantics: Prompting Strategies for African NLI

# From Script to Semantics: Prompting Strategies for African NLI

**Authors:** [Anuj Tiwari](https://md.research.elamur.ai/free/en/authors/anuj-tiwari/), [Terry Oko-odion](https://md.research.elamur.ai/free/en/authors/terry-oko-odion/) and [Hannah Nwokocha](https://md.research.elamur.ai/free/en/authors/hannah-sopuruchi-nwokocha/) · **Year:** 2026 · **Venue:** [Proceedings of Resources for African Indigenous Languages (RAIL) 2026 @ LREC 2026](https://md.research.elamur.ai/free/en/venues/rail/) ([Resources for African Indigenous Languages (RAIL) @ LREC 2026](https://md.research.elamur.ai/free/en/venues/rail/2026/)) · **Publisher:** [European Language Resources Association (ELRA)](https://md.research.elamur.ai/free/en/publishers/european-language-resources-association-elra/) · **Licence:** [CC BY-NC 4.0 (ELRA, LREC proceedings)](https://creativecommons.org/licenses/by-nc/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2026.rail-1.8/) · [PDF](https://aclanthology.org/2026.rail-1.8.pdf) · [DOI 10.63317/3eydkjk4pzb7](https://doi.org/10.63317/3eydkjk4pzb7) · [OpenAlex](https://openalex.org/W7166538665)

**Citations:** 0 citations (OpenAlex, 2026-10-14)

## Summary

This study asks how much prompt wording alone changes the way small open-weight LLMs perform Natural Language Inference in low-resource African languages. It sets aside fine-tuning, in-context demonstrations and Chain-of-Thought. The authors test five zero-shot prompt designs on the AfriXNLI test sets for Swahili, Yoruba and Hausa, using Llama3.2-3B and Gemma3-4B with deterministic decoding. The designs are a plain baseline, Script-Aware, Language-Specific, Contrastive, and Native-Label Self-Translation (NL-STP). Every prompt requires a single English label.

They report accuracy, Macro-F1, per-class F1 and the distribution of predicted labels. These show that some prompts push models toward one label or make them almost never predict neutral. Contrastive prompting, which spells out all three interpretations before the model picks one, gives the most balanced and consistent behaviour. The authors also argue that well-structured zero-shot prompts can beat stronger baselines that use few-shot examples and CoT. Absolute scores stay close to chance, around 0.31–0.42 accuracy. The work matters because it treats prompt structure as an experimental variable for settings with little data or compute.

## Key points

- **Data:** The full AfriXNLI test split is used for each language: 600 examples, balanced at 200 per label, with no subsampling. Generation uses temperature 0.
- **Best results:** The highest accuracy is 0.422, from Contrastive prompting with Gemma3-4B on Swahili. The highest Macro-F1 is 0.385, from NL-STP with Gemma3-4B on Swahili.
- **Contrastive vs. baseline on Llama3.2-3B:** Contrastive prompting raises Macro-F1 for every language compared with the zero-shot baseline:
  - Swahili: 0.218 → 0.357
  - Yoruba: 0.285 → 0.294
  - Hausa: 0.309 → 0.345
- **Neutral collapse:** Language-Specific prompting yields a neutral F1 of 0.000 in several runs. Examples include Llama on Swahili, Yoruba and Hausa, where predictions are dominated by entailment.
- **Prompt families:** The Script-Aware prompt includes an Ajami (Arabic-derived script) variant. However, the experiments rely primarily on Latin-script data.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [Noida Institute of Engineering and Technology](https://md.research.elamur.ai/free/en/universities/noida-institute-of-engineering-and-technology/) — University, Greater Noida, India · 2 works

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works

🧭 Topics (1): [🧮 Reasoning](https://md.research.elamur.ai/free/en/topics/reasoning/) · 1,426 works

## Cite

Cite as: Anuj Tiwari, Terry Oko-odion and Hannah Nwokocha. 2026. From Script to Semantics: Prompting Strategies for African NLI. Proceedings of Resources for African Indigenous Languages (RAIL) 2026 @ LREC 2026.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{tiwari2026script,
  title = {{From Script to Semantics: Prompting Strategies for African NLI}},
  author = {Anuj Tiwari, Terry Oko-odion and Hannah Nwokocha},
  booktitle = {Proceedings of Resources for African Indigenous Languages (RAIL) 2026 @ LREC 2026},
  year = {2026},
  doi = {10.63317/3eydkjk4pzb7},
  url = {https://doi.org/10.63317/3eydkjk4pzb7}
}
```

- [← previous From Rules to Predictions: Federated Tabular Learning with LLM Reasoning](https://md.research.elamur.ai/free/en/papers/mahanipour-2026-rules-predictions-federated-tabular-learning/)
- [next → From Shijing to English and German: Resources and Evaluation for LLM Translation of Early Chinese Poetry](https://md.research.elamur.ai/free/en/papers/jiao-2026-shijing-english-german-resources-evaluation/)
- [↑ back to papers of 2026](https://md.research.elamur.ai/free/en/papers/2026/page/31/)

## References

8 references, 2 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. good are large language models on African languages? In Findings of the Association for Computational Linguistics: ACL 2025. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=good+are+large+language+models+on+African+languages%3F+In+Findings+of+the+Association+for+Computational+Linguistics%3A+ACL+2025%2E+Association+for+Computational+Linguistics%2E)
2. David Ifeoluwa Adelani, Marek Masiak, Israel Abebe Azime, and Others. 2023. [MasakhaNEWS: News topic classification for African languages](https://md.research.elamur.ai/free/en/papers/adelani-2023-masakhanews-news-topic-classification-african/). In Proceedings of the 13th International Joint Conference on Natural Language Processing and the 3rd Conference of the Asia-Pacific Chapter of the Association for…
3. Atnafu Lambebo Tonja, Bonaventure F. P. Dossou, Jessica Ojo, and Othes. 2024. Inkubalm: A small language model for low-resource african languages. [find](https://scholar.google.com/scholar?q=Atnafu+Lambebo+Tonja%2C+Bonaventure+F%2E+P%2E+Dossou%2C+Jessica+Ojo%2C+and+Othes%2E+2024%2E+Inkubalm%3A+A+small+language+model+for+low%2Dresource+african+languages%2E)
4. Christopher Toukmaji. 2024. Few-shot cross-lingual transfer for prompting large language models in low-resource languages. [find](https://scholar.google.com/scholar?q=Christopher+Toukmaji%2E+2024%2E+Few%2Dshot+cross%2Dlingual+transfer+for+prompting+large+language+models+in+low%2Dresource+languages%2E)
5. David Ifeoluwa Adelani, Jessica Ojo, Israel Abebe Azime, and Others. 2025. [IrokoBench: A new benchmark for African languages in the age of large language models](https://md.research.elamur.ai/free/en/papers/adelani-2025-irokobench-new-benchmark-african-languages/). In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Langu…
6. A. This section presents the exact prompt templates used for each strategy in our experiments where {lang}, {premise}, and {hypothesis} are replaced at runtime. A.1. [find](https://scholar.google.com/scholar?q=A%2E+This+section+presents+the+exact+prompt+templates+used+for+each+strategy+in+our+experiments+where+%7Blang%7D%2C+%7Bpremise%7D%2C+and+%7Bhypothesis%7D+are+replaced+at+runtime%2E+A%2E1%2E)
7. Tadesse Destaw Belay, Israel Abebe Azime, Ibrahim Said Ahmad, and Others. 2025. AfroXLMR-social: Adapting pre-trained language models for African languages social media text. In Findings of the Association for Computational Linguistics: EMNLP 2025. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Tadesse+Destaw+Belay%2C+Israel+Abebe+Azime%2C+Ibrahim+Said+Ahmad%2C+and+Others%2E+2025%2E+AfroXLMR%2Dsocial%3A+Adapting+pre%2Dtrained+language+models+for+African+languages+social+media+text%2E+In+Findings+of+the+Associ)
8. Language-Specific Prompting PROMPT = """ You are interpreting these sentences as a native {lang} speaker, using everyday {lang} understanding and cultural context. [find](https://scholar.google.com/scholar?q=Language%2DSpecific+Prompting+PROMPT+%3D+%22%22%22+You+are+interpreting+these+sentences+as+a+native+%7Blang%7D+speaker%2C+using+everyday+%7Blang%7D+understanding+and+cultural+context%2E)

*Updated 1 November 2026*
