Elamur Research⌕
☰
home / papers / 2026 / From Script to Semantics: Prompting Strategies for African NLI

From Script to Semantics: Prompting Strategies for African NLI

Paper · 2026 · Anuj Tiwari, Terry Oko-odion and Hannah Nwokocha

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

 Fields, topics and concepts

📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 works

🧭 Topics 1Research subjects and languages the work is about.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. DOI 10.63317/3eydkjk4pzb7

@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}
}

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
  2. David Ifeoluwa Adelani, Marek Masiak, Israel Abebe Azime, and Others. 2023. MasakhaNEWS: News topic classification for African languages. 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
  4. Christopher Toukmaji. 2024. Few-shot cross-lingual transfer for prompting large language models in low-resource languages. find
  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. 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
  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
  8. Language-Specific Prompting PROMPT = """ You are interpreting these sentences as a native {lang} speaker, using everyday {lang} understanding and cultural context. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/tiwari-2026-script-semantics-prompting-strategies-african/