Foxley Quality Intelligence · Research Brief

Test position and context in AI document comparison

The same substantive change can receive different similarity scores depending on its location and surrounding text. Controlled document pairs expose this sensitivity.

Inspection processesAI & automationValidierungPrüfplanungQualitätsnachweis
4 min read
Three steps define an important change, vary position, context and length, and assess incorrect decisions. Similarity scores do not replace technical judgment.Open full-size graphic
FQI original illustration: One change under different text conditions. FQI inspection proposal based on the original study; not study measurements.
View:

Executive summary

Artificial intelligence (AI) can rate two documents as highly similar while assigning inconsistent weight to a decisive change in meaning. A study changes one sentence at a time and varies its position, surrounding text and document length. Seven language models show different scoring patterns. Quality managers therefore need more than an average similarity score: automated comparison must reliably reveal changes that matter for approval, change control or inspection. Controlled document pairs offer a practical way to assess this suitability.

FQI takeaway

  • Isolate one change: Alter a known substantive detail and define the expected inspection decision beforehand.
  • Vary position and context: Test the same type of change near the beginning, middle and end of comparable documents.
  • Assess scales separately: Compare different models’ numerical scores only after technical calibration.

The principle at a glance

In pairwise document comparison, a language model rates how similar two texts are in meaning. The study uses nearly identical documents. One sentence gains a negation, a connector such as “and” becomes “or”, or a named entity is replaced.

Different amounts of text surround that sentence. The surrounding material comes either from the original article or from another, unrelated article. This separates the influence of the change itself from the influence of its embedding on the score.

The comparison remains a test of the scoring procedure. A high similarity value does not establish that the texts are technically interchangeable. One altered condition can matter more for an inspection task than many unchanged paragraphs.

Deep dive

The investigation uses English Wikipedia text. Cleaning and length filtering leave a prepared corpus of 40,003 documents. Many document pairs are generated from it across combinations of modification, position and context. Seven language models are tested; later variations in the scoring instruction are compared on only one model.

For some models, changes near the beginning affect similarity scores more strongly than changes farther into a document. This concerns position inside a document. It differs from the order in which the two documents are presented to the judge.

Unrelated surrounding text increases similarity scores in almost all tested settings. The authors suggest that original context may expose additional contradictions. That interpretation is compatible with the observations but is not an established internal model mechanism.

Models rank the three modification types similarly but use different portions of their scoring scales. A fixed numerical threshold therefore cannot simply be transferred between models. Changes to the scoring instruction can also shift the magnitude of the observed effects.

A hypothetical FQI example compares two work instructions. One changes “inspection before release” to “inspection after release”. This temporal modification was not tested in the study. It illustrates why an operational team must define its own decision-relevant changes instead of adopting the three researched categories without checking their suitability.

For a local inspection plan, an expert creates valid document pairs and marks the changed passage. Harmless rewordings and unchanged pairs extend the collection. The team then assesses both missed changes and unnecessary warnings. Technically incorrect decisions remain visible separately from the average similarity score.

When the model changes, the same cases are evaluated again. A new scoring range or shifted average is not itself an improvement. What matters is reliable identification and explanation of important changes across positions and text lengths.

Limitations and risks

The source examines English encyclopedic articles, not German quality documents. Temporal conditions, quantities and many other meaning changes are absent. The investigation does not explain the observed differences mechanistically. Generation settings, model version and scoring instruction can affect results.

The work includes researchers from Pacific Northwest National Laboratory and discloses government funding. This review contains no independent replication. The additional normative source supports the inspection approach, not the individual experimental effects.

FQI conclusion

Automated document comparison should demonstrate which substantive changes it detects under which textual conditions. Controlled pairs expose sensitivity and support targeted improvement. FQI recommends treating position and context as inspection conditions and calibrating decisions against confirmed reference cases. The similarity score remains an aid. Responsible approval depends on whether a change affects requirements, risks or procedures. That judgment must remain explainable even when the documents are highly similar overall, and changes to the model or scoring procedure require renewed assessment.

Sources & transparency

Primary source: Semantic Needles in Document Haystacks: Sensitivity Testing of LLM-as-a-Judge Similarity Scoring; original full text reviewed. Preliminary research; no independent reproduction. Methods, relevant results and limitations were assessed for this review.

Additional normative guidance: NIST AI RMF 1.0, Core, MEASURE 1.2, 1.3 and 2.3. This voluntary framework supports assessment of measurement procedures and use conditions; it confirms no performance figure from the study.

Operational examples and inspection proposals are FQI interpretations. AI-assisted article, approved for publication by Johann Fischer on 2026-10-27.