Elamur Research⌕
☰
home / papers / 2023 / Al-Jawaab at Qur'an QA 2023 Shared Task: Exploring Embeddings and GPT Models for Passage Retrieval and Reading Comprehension

Al-Jawaab at Qur'an QA 2023 Shared Task: Exploring Embeddings and GPT Models for Passage Retrieval and Reading Comprehension

Paper · 2023 · Abdulrezzak Zekiye and Fadi Amroush

Summary

The paper describes a system entered in the Qur'an QA 2023 Shared Task, which has two parts: ranking Qur'anic passages for a Modern Standard Arabic question (Task A) and extracting every answer span from a given passage (Task B). Both tasks include questions with no answer in the text. For Task A, the authors embedded questions and passages with OpenAI's "text-embedding-ada-002" and ranked passages by cosine similarity. A similarity threshold tuned on the dev set decides when to return "no answer." This approach scored below the BM25 baseline. For Task B, they gave GPT-4 a handcrafted Arabic prompt at temperature zero, cleaned the raw output, and kept only answers that could be located verbatim in the passage. This clearly beat a naive whole-passage baseline. The work shows that prompting a strong LLM, combined with strict grounding of its output, can be competitive for span extraction. It also shows that off-the-shelf dense embeddings may lose to lexical retrieval on specialised Arabic text.

Key points

  • Task A data: the Qur'anic passage collection (QPC) has 1,266 thematic passages drawn from the 114 chapters. AyaTEC supplies 199 questions, and QRels lists 1,132 relevant passage-ids. Task B uses QRCD v1.2, which has 1,399 question–passage–answer triplets, about 15% of them unanswerable.
  • Task A: the 1536-dimension ada-002 embeddings with a 0.85 threshold reached MAP 0.109 on dev and 0.064 on test. BM25 scored 0.170 and 0.090 on the same sets. On test, MRR was 0.161 against BM25's 0.226.
  • Translating questions and passages into English with Google Translate and rerunning retrieval performed noticeably worse than working on the Arabic directly.
  • Task B with GPT-4 reached pAP 0.470 on dev and 0.539 on test, compared with 0.255 and 0.327 for the NWPR baseline. Extra post-processing raised the test score to 0.546, roughly a 67% gain. GPT-3.5 did so poorly on dev that it was dropped, falling even below the naive baseline.
  • The authors observed prompt-injection-like behaviour, where a question's wording made GPT-4 ignore the instructions. They also name API cost and lack of explainability as limitations.

Interesting ideas

  • I1. Every answer the LLM generates is mapped back to start and end offsets in the passage, and any answer that cannot be found verbatim is thrown away as out-of-passage. This turns a free-form generator into a grounded span extractor.
  • I2. "No answer" is produced in two ways: either the model abstains explicitly, or every proposed answer fails the grounding check. This gives a cheap, principled abstention rule.
  • I3. The authors report honestly that the dense embedding retriever lost to BM25, and they compare against a trivial whole-passage baseline. Weak, simple baselines thus act as sanity floors for the method.
  • I4. Output from a nondeterministic generator arrives in shifting formats, such as quoted text or bulleted lists, so it is normalised before matching. Only after that is it checked against the source.
  • I5. Instructions placed in the prompt could be overridden by the content of the question itself. This argues for keeping task instructions and user-supplied text clearly separated.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (answer): readers answering fable or test questions could keep only answers anchored to a concrete span or node in the text, which makes each answer traceable.
  • I2 (learn): LLM teacher labels could be accepted only when they align with the source text, with "nothing survives alignment" recorded as a distinct abstain signal instead of being forced into silver data.
  • I3 (learn): every evaluation could include such a negative control, for example returning the whole sentence or a lexical-overlap pick, so that gains are measured against a dumb floor.
  • I4 (learn): teacher-tier outputs could go through a fixed normalisation step before agreement checks with witness parsers, so that formatting noise does not count as disagreement.
  • I5 (learn): when prompting LLM teachers on raw sentences, the data could be delimited strictly and outputs that drift off-task could be flagged, so that injected text does not contaminate silver labels.

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

 Fields, topics and concepts

Cite

Cite as Abdulrezzak Zekiye and Fadi Amroush. 2023. Al-Jawaab at Qur'an QA 2023 Shared Task: Exploring Embeddings and GPT Models for Passage Retrieval and Reading Comprehension. Proceedings of ArabicNLP 2023.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2023.arabicnlp-1.82

@inproceedings{zekiye2023al,
  title = {{Al-Jawaab at Qur'an QA 2023 Shared Task: Exploring Embeddings and GPT Models for Passage Retrieval and Reading Comprehension}},
  author = {Abdulrezzak Zekiye and Fadi Amroush},
  booktitle = {Proceedings of ArabicNLP 2023},
  year = {2023},
  doi = {10.18653/v1/2023.arabicnlp-1.82},
  url = {https://doi.org/10.18653/v1/2023.arabicnlp-1.82}
}

References

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

  1. Giambattista Amati. 2009. BM25, pages 257–260. Springer US, Boston, MA. find
  2. Rana Malhas and Tamer Elsayed. 2022. Arabic machine reading comprehension on the holy qur’an using cl-arabert. Information Processing Management, 59(6):103068. ↗
  3. Rana Malhas, Watheq Mansour, and Tamer Elsayed. 2022. find
  4. Qur’an QA 2022: Overview of the First Shared Task on Question Answering over the Holy Qur’an. In Proceedings of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT5) at the 13th Language Resources and Evaluation Conference (LREC 2022), pages 79–87.
  5. Rana Malhas, Watheq Mansour, and Tamer Elsayed. 2023. find
  6. Qur’an QA 2023 Shared Task: Overview of Passage Retrieval and Reading Comprehension Tasks over the Holy Qur’an. In Proceedings of the First Arabic Natural Language Processing Conference (ArabicNLP 2023), Singapore.
  7. Rana R Malhas. 2023. ARABIC QUESTION ANSWER-ING ON THE HOLY QUR’AN. Ph.D. thesis. find
  8. OpenAI. 2023a. Embeddings - openai api. September 12, 2023. find
  9. OpenAI. 2023b. New and improved embedding model. September 12, 2023. find
  10. Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532–1543. ↗
  11. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901.
  12. Faisal Rahutomo, Teruaki Kitasuka, and Masayoshi Aritsugi. 2012. Semantic cosine similarity. In The 7th international student conference on advanced science and technology ICAST, volume 4, page 1. find
  13. Kenneth Ward Church. 2017. Word2vec. Natural Language Engineering, 23(1):155–162. find
  14. Mihai Surdeanu, Massimiliano Ciaramita, and Hugo Zaragoza. 2011. Learning to rank answers to non-factoid questions from web collections. Computational linguistics, 37(2):351–383. ↗
  15. Maximilian Schreiner. 2023. Gpt-4 architecture, datasets, costs and more leaked. September 12, 2023. find
  16. Alexis Conneau and Douwe Kiela. 2018. Senteval: An evaluation toolkit for universal sentence representations. arXiv preprint arXiv:1803.05449. ↗
  17. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. ↗
  18. Kazuaki Kishida. 2005. Property of average precision and its generalization: An examination of evaluation indicator for information retrieval experiments. National Institute of Informatics Tokyo, Japan. find
  19. Rana Malhas and Tamer Elsayed. 2020. AyaTEC: Building a Reusable Verse-based Test Collection for Arabic Question Answering on the Holy Qur’an. ACM Transactions on Asian and Low-Resource Language Information Processing, 19(6):1–21. find
  20. Marwan N. Swar. 2007. Mushaf Al-Tafseel Al-Mawdoo’ee. Dar Al-Fajr Al-Islami, Damascus. find
  21. GPT-4 Research Team. 2023. Gpt-4 technical report. Technical report.
  22. Ellen M Voorhees. 2001. Evaluation by highly relevant documents. In Proceedings of the 24th annual international ACM SIGIR conference on Research and development in information retrieval, pages 74–82. find
  23. Abdul Razak Zakieh and Adil Alpkocak. 2021. Classification of medical transcriptions with explanations. Technical report, EasyChair. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/zekiye-2023-al-jawaab-qur-qa-2023/