How to Test an Arabic AI Assistant Before Rolling It Out to Staff

A specialist testing a digital assistant on a laptop in an office
Nevada Academic Team 7 min read
Key takeaways
  • Test the assistant with questions that reflect real work, in the language, dialects and date formats staff actually use, each with a reference answer, a source and an expected behaviour.
  • Score each answer on separate dimensions: correctness, grounding in the source, handling of ambiguity, respect for the user's permissions, and resistance to instructions hidden in documents.
  • Do not decide on the average alone: permission and safety errors are counted and fixed separately, and the tests are rerun whenever the model, documents or permissions change.

Why a few trial questions are not enough

Most internal assistants are tried before launch with questions written by the project team, so the answers look convincing. Real employees, however, ask in their own dialect, abbreviate, write dates in different formats and ask about documents they are not entitled to see.

NIST’s Generative AI Profile, published in 2024, warns against extrapolating system performance from narrow, non-systematic assessments, and calls for performance to be demonstrated in conditions similar to the deployment setting, with the expected context of use documented. [1] The profile also notes that language models may perform less well in non-English languages or certain dialects, and that they can present false information with complete confidence. [1] Both are direct risks for any assistant that answers in Arabic.

What goes into the test set?

Start by gathering real questions: service desk logs, staff emails to HR, and recurring queries about policies. Then add what a casual trial never surfaces.

What goes into the test set?
Everyday work questions
  • The most frequent real questions
  • In Modern Standard Arabic and local dialects
  • Using each department's terms
  • Questions spanning two documents
Formats and language
  • Arabic-Indic and Western digits
  • Hijri and Gregorian dates
  • Different currencies and units
  • Mixed Arabic and English
Edge cases
  • Incomplete question needing clarification
  • Out-of-scope question
  • Old and current policy
  • Question the documents cannot answer
Permissions and security
  • User without access to an attachment
  • Document carrying hidden instructions
  • Request for a sensitive action
  • Attempt to extract personal data
A suggested checklist prepared for this article, to be adapted to how the assistant is used.

For each question, write down three things: the reference answer approved by a specialist, the document and paragraph it rests on, and the expected behaviour if an answer is not possible, such as asking for clarification or referring the user to the right team. Evaluators such as response completeness measure whether a reply contains the key information compared with the reference answer, so completeness cannot be judged without a reference answer written in advance. [4]

The questions and reference answers should be written by specialists from the departments that own the policies, not by the technical team alone, because they know which questions staff usually get wrong. Weight the categories by the impact of an error, so that allowances, leave and permissions get a larger share than general information.

Keep the acceptance set separate from the examples used to tune prompts or configure the assistant. If the team adjusts settings until the acceptance questions themselves pass, it has measured its ability to memorise the questions, not the quality of the assistant.

A team reviewing test results on a whiteboard
The test set should be written by people who know the actual work, not by the technical team alone.

How should each answer be scored?

Do not give each answer a single score. Split the evaluation into independent dimensions, because an answer can be correct in substance but drawn from a document the user may not see, or grounded in the right source but incomplete.

Acceptance dimensions and the evidence for each
DimensionAcceptance evidenceHow to check
CorrectnessMatches the approved reference answerSpecialist review
GroundingEvery statement traces to the documentOpen the source and match the paragraph
AmbiguityAsks for clarification when key details are missingDeliberately incomplete cases
PermissionsNo content beyond the user's accessAccounts with different roles
Injected inputIgnores instructions inside the documentPrepared test documents
A suggested work tool; the organisation sets the acceptance threshold for each dimension according to the impact of an error.

Evaluation platforms offer automated metrics that help with triage, including groundedness, which estimates how well the retrieved context supports the answer, and relevance to the question. [4] These save time on large sets but do not replace a specialist’s judgement. NIST recommends comparing outputs with reference answers using both human oversight and automated evaluation, and reviewing the sources and citations the system provides. [1]

Attribution is tested by hand: open the cited document, match the paragraph and confirm it is from the current version. A link in the answer does not mean the information is actually there.

Can the user see what they should not?

An assistant that answers from organisational documents retrieves passages and sends them to the model. If document permissions are not enforced at retrieval, the answer may surface information from a file the user is not allowed to open. [3] Microsoft notes that trimming results by permission inside the search pipeline itself removes the need for custom permission code in the application, and is faster than loading larger result sets and trimming them there. [3]

Create test accounts that represent different roles: an ordinary employee, a department head and an employee from another department. Ask each account the same question and check that the answer reveals nothing beyond its access, not even as a summary or a hint. Also test what happens after access is withdrawn, because permission changes appear in search results only once the permission metadata has synced to the index. [3]

Testing untrusted input

The document itself can carry risk. Indirect prompt injection happens when the model reads external content, such as a file or web page, containing instructions that alter its behaviour. [2] OWASP stresses that retrieval-augmented generation and fine-tuning do not fully remove this risk, and that attackers may use multiple languages or encodings to slip past filters. [2]

Include documents prepared for this purpose in the test environment, containing text in Arabic and English that tells the assistant to abandon its task or reveal other content. The expected result is that the assistant carries on with its original task and the application blocks any action or disclosure beyond the user’s permissions. NIST lists red-teaming against attacks such as prompt injection among its measurement actions. [1]

An employee signing in to an internal system with their own account
Test the assistant with accounts that represent different roles, not only the developer's account.

Hypothetical example: a travel allowance question

A hypothetical organisation has built an assistant that answers questions on HR policies, and has approved a new travel policy taking effect at the start of next month. The team designed three cases:

  • A question with a clear date for a trip after the effective date: the expected answer applies the new policy and states when it takes effect.
  • A question with no date: the assistant should ask when the trip is, or set out both the old and new rules with the changeover date, rather than silently choosing one.
  • A question from an employee without access to the senior management allowance table: neither the attachment nor its figures should appear in the answer.

An HR specialist reviewed all three answers, and the results were logged with the model version and documents used, so that the same cases can be rerun after every update.

How to read the results and decide on launch

Do not base the launch decision on the average pass rate alone. Divide errors into two categories:

  1. Critical errors: disclosing content beyond the user’s permissions, following injected instructions, or giving a wrong answer on a financial or regulatory matter. These are fixed before launch, however rare they are.
  2. Quality errors: an incomplete answer, weak wording or an imprecise referral. These are measured against a threshold the service owner sets in advance.

Record the limits of acceptable use in the launch decision: which topics the assistant answers, and which it refers to a member of staff.

To make results comparable from one round to the next, log for each test case: the question ID, the model version and settings, the version of the indexed documents, the role of the account that asked, the result on each dimension, and the reviewer’s name and review date. Without this log, after an update you cannot tell whether the assistant improved or the questions changed.

When should you retest?

Keep the same test set as a regression suite and rerun it when the model or its settings change, when documents are updated or new sources added, and when permissions are modified. NIST recommends re-evaluating risks when a model is adapted to a new domain and checking regularly that security measures remain effective. [1]

Applying this in Gulf workplaces

Involve specialists from different sites to cover local terminology, since the name of an allowance or type of leave may differ from one organisation to another. Include the Hijri and Gregorian date formats and the currencies your organisation deals in.

Arabic has features that affect retrieval before they affect the answer: variant spellings of the hamza, taa marbuta written as haa, alif maqsura written as yaa, and English terms transliterated into Arabic script. Write the same question in more than one spelling and check that the assistant reaches the right document each time. If retrieval fails, no amount of model quality will rescue the answer.

Do not put real employee data in test examples unless the environment is approved for it and appropriate controls are in place, and comply with the personal data protection law in force in your country, such as Saudi Arabia’s Personal Data Protection Law or the UAE’s Federal Decree-Law No. 45 of 2021 on the Protection of Personal Data.

Conclusion

Testing an Arabic assistant is a project in its own right: questions from real work, reference answers, separate scoring dimensions, and tests for permissions and injected input. Anything tested once needs testing again whenever the model, the documents or the users change.

Frequently asked questions

How many questions does the test set need?

There is no fixed number. What matters is that it covers every type of real task and the edge cases, and that confidence is not built on a handful of scattered trials, which NIST explicitly warns against. [1]

Does a link in the answer prove it is correct?

No. Open the cited document, check that the paragraph says what is attributed to it, and confirm it comes from the current version of the policy.

Can an automated evaluator score the answers?

Automated evaluators such as groundedness scoring help triage at scale, [4] but answers with financial or regulatory impact need review by a human specialist, and NIST recommends combining human oversight with automated evaluation. [1]

When should the tests be rerun?

When the model or its settings change, documents are updated, permissions are modified, or use extends to a new domain. [1, 3]

Is a high overall pass rate enough?

No. A single error that exposes a document to an unauthorised user can be more serious than dozens of incomplete answers, so permission and safety errors are kept in a separate log.

Recommended programmes

Applied Artificial Intelligence & Generative AI
Applied Artificial Intelligence & Generative AI
Professional certificate from Twintech International University College of Technology
◷ 15 Nov 2027 ● Manama
$3,600.00
Programme details
IIBA Endorsed Certificate in AI Enabled Innovation
IIBA Endorsed Certificate in AI Enabled Innovation
Professional certificate from Alzette University
◷ 4 Jan 2027 ● Dubai
$3,600.00
Programme details

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *