Manuscript Offprint

arXiv:2610.31821

What the Query Remembers: Query Abstraction Governs Lexical and Dense Retrieval of Classical Arabic Poetry

Omar Farouk Zouak, Selma Mani, Larbi Said Chikh, Raid Abderrezak Ouahioune

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

How well a poetry archive can be searched depends on what the user still remembers, not only on what the model understands. We show this for Classical Arabic poetry, benchmarking nine dense encoders and BM25 over two corpora, three indexing modes and two evaluation protocols. Which retriever wins is governed by how much of a poem's wording the query still carries. On tip-of-the-tongue queries BM25 leads every dense encoder, including an 8B state-of-the-art model (0.746 vs. 0.717 Recall@5); on abstract queries it falls to eighth out of ten (0.392 vs. 0.748). Editing the wording of the same queries shows that this ranking largely reflects query composition: adding one remembered half-verse raises BM25 by 38 points, rewriting the quoted words by hand leaves BM25 level with the 8B encoder, and BM25's sensitivity to remembered wording is significantly steeper than that of the strongest dense encoder. The same axis controls explanation augmentation, whose effect swings from +37 to -39 points. The mechanism splits by system type: lexical containment predicts BM25's behaviour, while embedding proximity predicts dense encoders. Finally, the field's two standard protocols, known-item retrieval and thematic relevance, dissociate on the same systems, a result reproduced by two blind human annotators and by two open-weights judges, one of them under a rubric with no literal-match criterion. A benchmark that reports one protocol, or one query register, can give a materially wrong picture. Code and data are available at https://github.com/Ellzo/what-the-query-remembers.

1 Introduction

Classical Arabic poetry, from the pre-Islamic odes to the Abbasid and Andalusian eras, is a central pillar of Arab cultural heritage and a uniquely rich linguistic archive. It also poses distinctive problems for retrieval. Root-and-pattern morphology yields dense variation; diacritics are usually omitted; and rhetorical devices such as tawriya (double meaning) and jinās (paronomasia) fuse literal and symbolic meaning inside the rigid bayt (verse) structure. The surface form of a verse is a poor guide to its meaning, which makes poetry an attractive stress test for embedding models that claim to retrieve by meaning rather than wording.

Arabic NLP has advanced quickly, including poetry, but prior work centres on classification and generation: meter classification, authorship attribution, and poem composition. Retrieval is largely unstudied for Arabic poetry, despite underpinning digital archives, education, and literary scholarship. We set out to answer a practical question, how well modern embedding models search Classical Arabic poetry by meaning, and found that the question as usually posed lacks a single answer.

The finding. Results on this task are governed largely by a property of the queries. Users arrive with different amounts of remembered text: some half-remember a hemistich, others recall only a theme. Where a query sits on this query-abstraction spectrum determines which retriever wins, by how much, and whether a standard improvement technique helps or hurts.

Concretely, on tip-of-the-tongue queries a plain BM25 index beats all nine dense encoders, including Qwen3-Embedding-8B, a state-of-the-art multilingual retriever (0.746 vs. 0.717 Recall@5); on abstract queries over another corpus, BM25 falls to eighth of ten and the same 8B encoder leads by 36 points (0.748 vs. 0.392, p<10−20p < 10^{-20}). Because corpus and query register change together in that comparison, we test the register directly within one corpus. Stratifying one query set by whether the query shares a verbatim three-token span with its target poem, BM25 retrieves the gold poem within the top five for all 80 quoting queries, while on the

∗^{*} Primary contributor to this work.

164 queries that do not quote it is statistically indistinguishable from the 8B encoder. We then edit the same queries. Appending one verbatim half-verse of the target poem to each non-quoting query raises BM25 by 37.8 points, against 12.8 to 23.2 for the 8B encoder; rewriting the quoted words of the quoting queries by hand, at equal length, brings BM25 down from 1.000 to 0.646, level with the 8B encoder.

The same axis governs explanation augmentation, the natural remedy for figurative text: indexing a short interpretive gloss of each verse instead of the verse. Its effect ranges from +37 points where queries are abstract to -39 points where they carry remembered wording, and a purely lexical retriever shows the largest swing in both directions.

Finally, we show that the field’s two standard evaluation protocols disagree systematically on the same systems, and that blind human relevance judgments reproduce the disagreement rather than resolving it in favour of either protocol.

References (31)