Do not accept a company AI assistant on the strength of a few convincing answers. Prepare questions, expected evidence and rules for when it should not answer in advance. When an error occurs, you need to establish whether a document was missing, retrieval failed, a passage was lost on its way to the model, or the answer or citation went wrong.
This guide is for AI product owners, support managers and QA. It includes a test register and a small deterministic evaluation actually run on synthetic Czech documents. It is not a language-model benchmark or confirmation that a particular company assistant is ready for production.
Compile user questions and expected evidence
Start with tasks someone is accountable for. “Find the current form” requires the correct document and version. “Explain the exception in the service terms” also requires a faithful interpretation of the condition. These outputs have different criteria and should not disappear into a single satisfaction score.
Take questions from support queries made safely available, interviews and work situations. Add the typos, abbreviations and incomplete wording people actually use. A model can suggest further variants, but label their provenance. Five paraphrases of one situation are not five independent needs. Hold some cases back for acceptance testing so tuning does not become memorization of a known list.
Assign a specific passage and document version to each question before running it. If even the content owner cannot determine the correct answer, you do not have a test with an unambiguous result. You have an unresolved knowledge-base question. The distinction matters: you cannot fairly evaluate a delivery against a reference the reviewer invents only after reading the answer.
OpenAI’s evaluation methodology, checked on November 18, 2026, separates objectives, data, metrics, comparison and ongoing retesting. The numerical thresholds in its examples are not universal acceptance standards. Set your own boundaries based on the consequences of errors and the pilot’s scope.
A blank record for one test
- Identity and expectations
- [test_id, set version, origin of the idea, exact question, scenario, language, user role and date of the situation being examined]. Add the expected behavior: answer, clarification, safe refusal or handover to a person.
- Evidence and boundaries
- [required document version and passage, acceptable answer variants, conditions and exceptions, prohibited information, error severity]. Flag an unclear reference for the content owner’s decision.
- Execution
- [run_id, versions of the corpus, parser, retrieval, prompt and model; available parameters; retrieved IDs and ranking; passages actually passed on; answer and links; times for individual stages; costs and completion status]. Do not guess unknown settings.
- Evaluation and next step
- [input, retrieval, handover, interpretation, citation and permission accuracy assessed separately; human evaluator and rationale; any automated judge; disagreement; correction owner and retest]. Do not delete the original failed record.
Add unanswerable and unauthorized queries
When evidence is missing, success means acknowledging the gap or asking an appropriate clarifying question, not confidently inventing information. For an inaccessible source, the answer must also not reveal its content, name or existence if those details are protected too. Sometimes the user-facing message will therefore be the same as when no source is found. Internal diagnostics may distinguish the cause, but must have their own restricted access.
The following questions and references were recorded before the first mini-evaluation run. The corpus contains two time-bounded versions of Orion service information, a budget accessible only to a manager and a form identifier. These are four synthetic records, two roles and an illustrative date. Q3 tests permissions and Q5 tests missing knowledge; both situations produce an empty answer value in the fixture.
On a narrow screen, scroll the table horizontally; with a keyboard, focus the region and use the arrow keys.
| ID and question | Role / date | Evidence | Expected result |
|---|---|---|---|
| Q1: Until what time does Orion service accept reports? | support / Nov 18 | D1v2, §1 | 18:00 |
| Q2: Until what time did Orion service accept reports in October? | support / Oct 25 | D1v1, §1 | 16:00, historical state |
| Q3: What is the Orion project budget? | support / Nov 18 | none authorized | no protected content |
| Q4: What is the Orion project budget? | manager / Nov 18 | D2, §2 | 240 illustrative units |
| Q5: What is the discount on Neptun? | support / Nov 18 | missing | do not invent a discount |
| Q6: Where can I find the report form identifier? | support / Nov 18 | D3, §1 | F7 |
All dates in the table are in 2026. For everyday operation, expand the set to include conflicts, future effective dates, revoked access, invalid assumptions, multiple questions in one message and an attempt to plant an instruction in a document. Our six cases do not cover these additional situations. Their purpose is to demonstrate a traceable evaluation process, not create an impressive percentage.
Separate ingestion, retrieval and answer errors
Ingestion is receiving and processing input. Check that tables, units, conditions, headings and versions have been preserved. If an important PDF row never entered the corpus, changing the prompt will not restore it. Retrieval means finding evidence; the correct passage may be in the corpus but absent from the selected results.
The next checkpoint is context handover. A retrieved passage may be lost through a length limit, deduplication or subsequent ranking. Only then come interpretation and citation. For these stages, you need to see the actual input to the answering component, not just a list of candidates somewhere in a log. The RAG article explains the basic mechanism; here we turn it into checks and reproducible errors.
In our executed test, retrieval first filters approval, validity, deletion and role. It then compares predefined topic tags. The answering component simply takes the value from the first excerpt and appends the passage ID. No language model, embeddings or real PDF parser is involved. A test this limited verifies the wiring of controls and diagnostics, not natural-question understanding or answer-writing quality.
In the normal variant, all six scenarios passed exact checks of the expected value and citation. Context remained empty for the two abstentions. We then deliberately introduced four defects, each in a separate run. These are not defects discovered in a production supplier’s system.
On a narrow screen, scroll the table horizontally; with a keyboard, focus the region and use the arrow keys.
| Intervention | What the test observed | First failing check |
|---|---|---|
| Omit D3 during ingestion | Q6 lacks the required document | ingestion |
| Empty Q1 results | D1v2 exists but is not retrieved | retrieval |
| Replace the Q1 answer with “99 hours” | Correct context, incorrect value | answer |
| Cite D1v1 instead of D1v2 for Q1 | Correct value, wrong citation version | citation |
The diagnostic order matters. An omitted document also causes a missing answer, but the first correction belongs at the input stage. We therefore store every individual result alongside the first cause. In a real system, several layers may fail at once; do not force the log to contain only one defect.
Runnable synthetic Python example
Copy the entire code into a file named ukazka.py and run python3 ukazka.py. Python 3.10 or later is sufficient; the code does not read company data or make network calls. The values are illustrative. The output shows normal scenarios and deliberately introduced defects.
Long code lines can be scrolled horizontally. Use Tab to focus the region and the arrow keys to scroll; copy the entire code without changing its indentation.
"""Syntetická ukázka; Python 3.10+, bez balíčků a sítě. Nejde o LLM benchmark."""
import json,copy,re,time,statistics
DATA = {'documents': [{'id': 'D1v1',
'family': 'D1',
'version': 1,
'section': '§1',
'text': 'Servis Orion přijímá hlášení do 16 hodin.',
'value': '16 hodin',
'topic': 'orion servis',
'owner': 'garant podpory (modelová role)',
'approved': True,
'valid_from': '2026-01-01',
'valid_to': '2026-11-01',
'indexed_at': '2026-01-02',
'roles': ['podpora', 'vedouci'],
'deleted': False},
{'id': 'D1v2',
'family': 'D1',
'version': 2,
'section': '§1',
'text': 'Servis Orion přijímá hlášení do 18 hodin.',
'value': '18 hodin',
'topic': 'orion servis',
'owner': 'garant podpory (modelová role)',
'approved': True,
'valid_from': '2026-11-01',
'valid_to': None,
'indexed_at': '2026-10-20',
'roles': ['podpora', 'vedouci'],
'deleted': False},
{'id': 'D2',
'family': 'D2',
'version': 1,
'section': '§2',
'text': 'Rozpočet projektu Orion je 240 jednotek.',
'value': '240 jednotek',
'topic': 'orion rozpočet',
'owner': 'garant rozpočtu (modelová role)',
'approved': True,
'valid_from': '2026-01-01',
'valid_to': None,
'indexed_at': '2026-01-02',
'roles': ['vedouci'],
'deleted': False},
{'id': 'D3',
'family': 'D3',
'version': 1,
'section': '§1',
'text': 'Formulář servisního hlášení má označení F7.',
'value': 'F7',
'topic': 'formulář hlášení',
'owner': 'garant podpory (modelová role)',
'approved': True,
'valid_from': '2026-01-01',
'valid_to': None,
'indexed_at': '2026-01-02',
'roles': ['podpora', 'vedouci'],
'deleted': False}],
'evaluation_questions': [{'id': 'Q1',
'question': 'Do kdy přijímá servis Orion hlášení?',
'terms': 'orion servis',
'role': 'podpora',
'as_of': '2026-11-18',
'required': ['D1v2'],
'expected': '18 hodin',
'behavior': 'answer'},
{'id': 'Q2',
'question': 'Do kdy přijímal servis Orion hlášení v říjnu?',
'terms': 'orion servis',
'role': 'podpora',
'as_of': '2026-10-25',
'required': ['D1v1'],
'expected': '16 hodin',
'behavior': 'answer'},
{'id': 'Q3',
'question': 'Jaký je rozpočet projektu Orion?',
'terms': 'orion rozpočet',
'role': 'podpora',
'as_of': '2026-11-18',
'required': [],
'expected': None,
'behavior': 'abstain'},
{'id': 'Q4',
'question': 'Jaký je rozpočet projektu Orion?',
'terms': 'orion rozpočet',
'role': 'vedouci',
'as_of': '2026-11-18',
'required': ['D2'],
'expected': '240 jednotek',
'behavior': 'answer'},
{'id': 'Q5',
'question': 'Jaká je sleva na Neptun?',
'terms': 'neptun sleva',
'role': 'podpora',
'as_of': '2026-11-18',
'required': [],
'expected': None,
'behavior': 'abstain'},
{'id': 'Q6',
'question': 'Kde najdu označení formuláře hlášení?',
'terms': 'formulář hlášení',
'role': 'podpora',
'as_of': '2026-11-18',
'required': ['D3'],
'expected': 'F7',
'behavior': 'answer'}]}
def load(): return copy.deepcopy(DATA)
def eligible(d,role,as_of):
return d['approved'] and not d['deleted'] and role in d['roles'] and d['valid_from']<=as_of and (not d['valid_to'] or as_of<d['valid_to'])
def retrieve(docs,terms,role,as_of):
wanted=set(terms.split());return [d for d in docs if eligible(d,role,as_of) and wanted<=set(d['topic'].split())]
def evaluate(q,docs,fault=None):
ingested=[copy.deepcopy(d) for d in docs if not(fault=='ingest' and d['id']=='D3')]
hits=retrieve(ingested,q['terms'],q['role'],q['as_of'])
if fault=='retrieval':hits=[]
context=hits[:1]
answer=context[0]['value'] if context else None
cited=[context[0]['id']+'#'+context[0]['section']] if context else []
if fault=='answer' and context:answer='99 hodin'
if fault=='citation' and context:cited=['D1v1#§1']
required=q['required'];found=[x['id'] for x in hits];passed=[x['id'] for x in context]
ingest_ok=all(x in [d['id'] for d in ingested] for x in required)
retrieval_ok=all(x in found for x in required)
context_ok=all(x in passed for x in required)
answer_ok=answer==q['expected']
citation_ok=cited==([required[0]+'#'+next(d['section'] for d in docs if d['id']==required[0])] if required else [])
leak=any(not eligible(x,q['role'],q['as_of']) for x in hits)
checks={'ingest':ingest_ok,'retrieval':retrieval_ok,'context':context_ok,'answer':answer_ok,'citation':citation_ok,'no_unauthorized_context':not leak}
first=next((k for k,v in checks.items() if not v),None)
return {'id':q['id'],'found':found,'passed':passed,'used':[context[0]['id']] if context else [],'answer':answer,'cited':cited,'checks':checks,'first_failure':first,'pass':all(checks.values())}
f=load()
normal=[evaluate(q,f["documents"]) for q in f["evaluation_questions"]]
faults=[dict(fault=mode,**evaluate(next(q for q in f["evaluation_questions"] if q["id"]==qid),f["documents"],mode)) for mode,qid in [("ingest","Q6"),("retrieval","Q1"),("answer","Q1"),("citation","Q1")]]
print(json.dumps({"normal":normal,"faults":faults},ensure_ascii=False,indent=2))
For retrieval, you can track the proportion of required evidence present in the results and how much of the returned context was needed. These metrics have a known denominator and require reference annotations. For unanswerable queries, evaluate correct abstention instead of a missing “correct document.” For interpretation, track preservation of conditions; for citations, check support for the specific claim and the correct location.
Ragas separates these aspects into distinct metrics, such as context recall, faithfulness and factual correctness. They do not mean the same thing, and some variants use additional model calls. String matching in our fixture is not Ragas faithfulness and should not be called that.
Define human assessment and uncertainties
This mini-evaluation has no documented human domain assessment and no executed LLM judge. Agreement and disagreements between them have therefore not been measured. A separate AI editorial reviewer is not a human either. Six successful deterministic rows do not prove that a real assistant would hold up in operation.
Before accepting a real delivery, appoint an expert who knows the documents and approves the references. Have two evaluators independently assess at least risky and ambiguous cases using the same rubric. For disagreements, retain both original verdicts, reasons and the decision of a third authorized person or content owner. Do not exclude disputed rows simply because they make the summary worse.
If you add an LLM-as-a-judge, save the model, prompt, rubric, input evidence and repeated verdicts. Compare them with human annotations on a defined sample and show specific disagreements: for example, the judge accepts a topically related source that does not support an exception. A stronger or different model may still share the same weaknesses. Answer-order effects and a preference for longer text are further reasons to check the evaluator itself.
Do not substitute an average for a safety gate. A protected-content leak has its own severity and may require stopping even if the other answers are good. Report incomplete runs, tool errors, refusals, disputed ratings, time to first useful output and time to a completed answer separately. For a paid system, include the actual cost of the entire task, not just the token price.
Maintain a regression set and feedback queue
A regression set checks whether previously acceptable behavior has deteriorated after a change. Run it after changes to documents, permissions, parsers, retrieval, prompts and models. Retain versions for each run. If several components change at once, you can accept the bundle as a whole, but may no longer be able to attribute the difference to a single adjustment.
A user’s thumbs-down belongs in a review queue, not directly in training or an automatic penalty for a document. It may mean disagreement with a correct rule, a wrong source or unclear wording. An authorized expert first determines what went wrong, adds evidence and creates a corrected test. Do not expose sensitive conversations to every evaluator just for a convenient dashboard.
Start with a spreadsheet listing correction owners and retest dates. Keep tuning and acceptance cases separate, do not delete failures and do not retrospectively rewrite original expectations so the new version wins. The SEO testing methodology concerns a different kind of evidence; here you measure an assistant’s internal behavior, not incremental organic-traffic impact. AI visibility monitoring is not a substitute for this acceptance process either.
Want to accept an assistant against verifiable conditions?
I can help you define scenarios, expected evidence and responsibility for the pilot decision. Tell me what your assistant should do and where an error would have the greatest consequences. We will arrange domain assessment and technical testing with the right people within the agreed scope; we will not pass off a small demonstration score as their work. Pilot preparation and role allocation are covered by AI strategy and project management.









