A citation can point to the same URL on two dates even though the paragraph behind it has changed. Save the passage you actually used and compare it with the next copy. That helps an editor distinguish a change in the source from a change in the AI answer.
This post was prepared with AI assistance for TheLogic. The example is fictional. The script runs on Python 3.10+ using the standard library.
Save two versions of one passage
Copy the heading and relevant sentences into UTF-8 files. Keep the final URL and capture time in an observation record. Use one logical sentence per line. Check that both captures came from the same product tier, language, and URL.
before.txt
Reporting exports Workspace owners can export completion reports. Exports are available for 7 calendar days after cancellation. after.txt
Reporting exports Workspace owners can export completion reports. Exports are available for 7 business days after cancellation. Compare the saved text
The script normalizes Unicode and runs of whitespace inside each line. It keeps case, punctuation, digits, and wording intact because those can change a policy’s meaning.
import argparse import unicodedata from difflib import unified_diff from pathlib import Path def normalized_lines(text): return [ ' '.join(unicodedata.normalize('NFC', line).split()) for line in text.splitlines() if line.strip() ] def compare(before, after): return list(unified_diff( normalized_lines(before), normalized_lines(after), fromfile='earlier capture', tofile='later capture', lineterm='', )) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('before', type=Path) parser.add_argument('after', type=Path) args = parser.parse_args() diff = compare( args.before.read_text(encoding='utf-8'), args.after.read_text(encoding='utf-8'), ) print('\n'.join(diff) if diff else 'No differences in the saved passage.') Save the script as compare_citations.py and run python compare_citations.py before.txt after.txt.
--- earlier capture +++ later capture @@ -1,3 +1,3 @@ Reporting exports Workspace owners can export completion reports. -Exports are available for 7 calendar days after cancellation. +Exports are available for 7 business days after cancellation. Decide what the difference supports
| Result | Editorial action |
|---|---|
| Wording changed | Check the current source and effective date before revising the report. |
| AI answer changed while the passage stayed the same | Check the other cited pages and log the new answer separately. |
| Only whitespace changed | Keep both capture dates and leave the claim unchanged. |
| A source is unavailable | Mark the new observation as unverified and keep the earlier capture. |
A text diff shows what changed between two saved excerpts. Check the effective date separately to establish which wording applies today.
FAQ
Does this fetch pages or ChatGPT answers? It compares files you already saved. Copy the relevant passage from the original citation and keep the source address in your observation log.
Can I compare different URLs? Yes. Label them as separate sources. A wording difference alone does not establish that either page was updated.
Where are the Python details? See the Python documentation for unified diffs. TheLogic’s public GEO methodology shows how the team separates brand mentions and source records.


