Salar Saeedi

Applied AI · Analysis

Persian AI search starts with a Unicode test

Evaluate Persian retrieval on character variants, spacing and real queries before attributing a failed search to the model.

Salar Saeedi2 min read
Three-stage illustration — Persian AI search starts with a Unicode test

A policy page uses Persian ی and the search query contains Arabic ي. To many readers the pair looks interchangeable in context. To a string comparison the values differ. This small gap can distort an entire assessment of a Persian assistant.

Preserve the document and normalize a search view

Unicode distinguishes Persian and Arabic letter forms, and zero-width characters also affect the representation of a word. Keep the original content and build a separate normalized view for retrieval. Apply a documented mapping for letter variants to both queries and index text, while retaining identifiers and verbatim snippets.

Source · The Unicode Standard — Arabic script

Make a pairwise test using the same intent

Take native Persian questions and create variants in script, spacing and zero-width non-joiner use. Include tokens whose exact form matters, such as product codes. Record whether a correct passage arrives in the first five results. MIRACL provides a multilingual retrieval benchmark including Persian, and can inform methods beyond local policy wording.

Source · Zhang et al. — MIRACL multilingual retrieval

Audit the result the user sees

For a retrieved passage, check whether the answer links to the original and whether normalization introduced a collision between different values. Re-run the original and variant inputs after changes to tokenization or indexing.

Source · Zhang et al. — MIRACL multilingual retrieval · The Unicode Standard — Arabic script

What to take away

Keep four representative query variants in your regression set so typography drift remains a measured problem.

References

Related work in the portfolio