Build a ChatGPT vs Claude Email Test in 12 Steps
The invoice scenario begins with a trap: an original $4,800 amount remains in the thread after a duplicate line is corrected and the reissued invoice becomes $4,350. A polished reply that repeats the old figure is still unsafe to send. That is the practical problem this comparison is built to expose.
The tutorial sets up its test against a fast-moving model race. It says Anthropic shipped Claude Fable 5.2 and OpenAI answered with GPT-6.2 Astra and GPT-6.2 Sol; 9to5Google described the move as a bid to regain the lead. Yet the model table later lists GPT-6 Sol and GPT-6 Luna. That mismatch makes it worth recording pinned API IDs instead of assuming a product label tells you which model answered.
A prose leaderboard cannot tell you whether a model will use the corrected invoice amount or disclose a competitor's quote. The harness sends both vendors identical threads and tasks, then checks whether replies contain required facts or forbidden details. It also tracks invented numbers and whether a draft stays within its word cap.
The distinction matters because fluent language is not proof of reliable recall. A language prediction explainer describes how conversational systems can produce helpful text while still making confident errors. The harness focuses on one measurable risk: whether an email is grounded in its thread.
What the harness scores
The project uses about 400 lines of Python and the standard library. Six scenarios contain planted traps, and the scorer assigns up to 100 points to each reply. Three runs across two providers produce 36 scored emails. Setup and verification take roughly 75 minutes; the tutorial says a live run should cost well under one dollar at its listed November 2026 API prices, though actual spending depends on usage.
| Check | Scoring rule | Points |
|---|---|---|
| Required current facts | Share of required regex patterns found | 40 |
| Stale or forbidden content | Minus 10 per hit with a zero-point floor | 20 |
| Invented numbers | Minus 5 for each digit string absent from the thread or task | 10 |
| Word cap | Full credit when the reply stays within the limit | 10 |
| Ask placement | 10 points when an ask appears in the first 60% of words; 5 later; 0 if missing. Scenarios without an ask receive 10. | 10 |
| Filler opener | Zero if a stock opener appears in the first 30 words | 5 |
| Hedge density | 5 points at one hedge or fewer per 100 words; 2.5 up to 2.5; otherwise 0 | 5 |
The scorer also logs stock closers, em-dash counts and raw word counts without changing the grade. It does not attempt to rate warmth, humor or brand voice. Those judgments remain for human review.
Regexes make the checks repeatable, not infallible. The scorer normalizes curly quotes and commas in numbers, then flags digit strings that do not appear in the thread or task. A pattern that is too narrow may miss a correct answer; one that is too broad may let a wrong answer through. Review actual replies before trusting a score.
Set up the comparison and choose models
Use Python 3.11 or newer, a terminal and API keys for OpenAI and Anthropic. The harness uses modules including urllib, json, csv, difflib and unittest, so there is no pip install step. Keep keys in environment variables for the current shell session rather than saving them in a project file. Offline mode uses fake providers, so the first nine steps can be completed without API keys.
The tutorial recommends Opus 5.5 against GPT-6 Sol as an initial pairing. It lists Opus 5.5 at $4 per million input tokens and $20 per million output tokens. Claude Fable 5.2 is listed at $8 and $40, while GPT-6 Sol is listed at $2 and $10. GPT-6 Luna is listed at $0.10 and $0.50. These are API charges, separate from ChatGPT or Claude chat subscriptions. Anthropic's November 18, 2026 newsroom announcement says Opus 5.5 costs 40% less to run than Opus 5 on typical workloads; the company also reports that Sonnet 5.5 runs more than 30% faster than Sonnet 5 and costs up to 30% less for most work. These are Anthropic's product comparisons, not results from this email test, so the harness should record the exact model ID, endpoint, service channel, token usage and billing date. See Anthropic's newsroom for its dated product announcements.
Model availability and consumer-plan labels are presented as inconsistent across OpenAI's own pages in the source material. The tutorial also says Anthropic recommends Opus 5.5 for documents, research and finished files, while Fable 5.2 is a premium option that generally sits outside standard subscriber usage limits except during launch offers. Treat those details as the tutorial's reported lineup and pricing, then check provider dashboards before a live run.
For ChatGPT, the article lists Plus at $20 per month in the United States and Pro tiers at $100, $200 and $500 per month. It says OpenAI announced price cuts on November 17 and documents gpt-6-sol and gpt-6-luna for API use. The tutorial also identifies o3 as retired from ChatGPT on August 26, 2026, and says GPT-4.5 has been retired. Pin the API model ID in environment variables and store it in each CSV row; do not infer it from a subscription page.
Create an emailtest folder, check the Python version and set OPENAI_API_KEY plus ANTHROPIC_API_KEY in the shell. In providers.py, the tutorial puts all network calls behind one layer using urllib. That file sends both vendors the same system and user prompts, retries rate-limit or overload errors, and removes a leading subject line when one appears. OpenAI receives no temperature or token-limit parameter because some current models reject those fields; Anthropic's request includes its required max_tokens field.
The model-listing command helps identify IDs available to the keys. Copy the chosen IDs and record the date because an alias may change without warning. Keep those values in OPENAI_MODEL and ANTHROPIC_MODEL so the runner can log exactly what it called. Anthropic's supported-regions policy lists where its products and services are available, and the company distinguishes Claude.ai, its API, cloud-platform offerings and other channels; record whether a run uses a direct API, hosted cloud service or consumer application. See Anthropic's supported-regions policy when documenting service availability.
Six scenarios reveal different failure modes
Each entry in scenarios.json contains a source thread, a task, a word cap, required and forbidden regex patterns, and two fixed replies for offline testing. The invoice chase tests whether the model uses invoice 1182-R for $4,350 after a $450 credit and the approved November 20 payment date rather than the stale $4,800 amount or the original October 15 due date.
The meeting scenario moves a design review from Tuesday at 2:00 pm in Room 4B to Thursday at 10:30 am in Room 7A. The vendor decline tests whether a reply keeps Northwind's $9,500 quote out of a message to Harbor Cloud, whose analytics add-on costs $14,500 per year, while explaining that the budget is frozen until Q2.
The outage apology scenario distinguishes an early estimate of up to two hours from the final 41-minute resolution. It also checks for the expired certificate on the login service and the correct 15% credit on the November invoice; the 20% credit applied to a different August incident. The raise request checks Sam's three years at the company, a billing migration that cut cloud spend by $38,000 a year, and a request for a 20-minute conversation before the December 5 salary-band review closes.
Cold outreach completes the set. Imani Brooks leads finance operations at Calder Freight, which launched Atlas Reports last month. Tally Lens reduced report generation from 14 minutes to 3 minutes in a customer pilot, and a 15-minute demo slot is open Wednesday, November 25. The scenario checks that the reply does not invent proof points such as claims of thousands of customers.
Do not tell the models where the traps are. The task text must be identical for both vendors; otherwise the test measures prompt differences as well as model behavior. The tutorial's prompts ask for a business email body beginning with a greeting, with no subject line or commentary.
In score.py, evaluate normalizes curly quotes before comparing patterns. Its ask check recognizes a question mark and phrases such as please, could you, can you, would you, let me know and confirm. Scenarios requiring no request receive the ask points automatically. Hedge density and filler openers are also scored, so inspect those rules before treating a small point difference as meaningful.
Seven unit tests are reported in the tutorial. They check that ideal offline replies beat deliberately bad ones by more than 40 points in every scenario, and cover stale amounts, invented numbers, word caps, curly apostrophes, comma-formatted numbers and subject-line stripping. Rerun the tests after changing a regex or weight.
Run the test and interpret the evidence
The runner provides models, run, rescore and report commands. It saves replies in provider-specific folders, records the pinned model in model.txt and writes results.csv. The rescore command processes saved replies without another API call, which is useful after a partial run or a scoring change.
In offline mode, fake providers return fixed replies instantly. The tutorial's three-run example produces 36 rows: fake-bad averages 30.0 with a 25.0 minimum across 18 replies, while fake-good averages 97.5 with a 95.0 minimum. By scenario, fake-bad scores 25.0 on cold outreach, 30.0 on invoice chase, 30.0 on the meeting move, 35.0 on the outage apology, 25.0 on the raise request and 35.0 on vendor decline. Fake-good scores 95.0, 100.0, 95.0, 100.0, 95.0 and 100.0 in the same order.
Those results show that the pipeline separates the supplied fake replies. They say nothing about ChatGPT or Claude: offline mode does not call either service, and the samples are not live benchmark results. Some fake-good replies lose points because their request appears late, a reminder that the scoring weights reflect the author's preferences rather than a universal measure of email quality.
For the live run, set both model variables and make three passes per scenario. The report shows each provider's mean and minimum, plus a scenario-by-provider grid. Start with the minimum. A high average can hide an occasional serious miss. Open the saved reply when a forbidden pattern fires or a required-fact ratio falls below 1; the pattern may be wrong, or the model may have missed the detail.
The tutorial's decision rules are explicitly a rule of thumb for a 36-email sample, not an industry standard. Scores within five points across at least three passes count as a practical tie for this test. Any forbidden hit on the vendor-decline or raise scenario calls for human review or a revised prompt and retest. An invented number in cold outreach calls for fact review before sending. A minimum below 60 suggests testing more passes and longer threads.
To measure edit rate, save the version you would actually send in an edits folder that mirrors the output paths. The tutorial uses Python's difflib to compare original and edited words; its offline example reports a 0.18 edit rate for one bad invoice email after removing a filler opener and hedged request. Edit only what you would genuinely change, since polishing every comma can obscure the difference between vendors.
Common sources of misleading results include using different prompts, running each scenario only once, trusting plan labels instead of logged model IDs and comparing an API call with an app that adds its own instructions or tools. Read several replies to check regex behavior, avoid hints about planted traps and redact customer names, amounts and account numbers before sending real threads to a third-party API.
The project's six hand-written files are providers.py, scenarios.json, score.py, test_score.py, run.py and edit_rate.py. Keep out/ out of version control if it contains sensitive replies, and record the pinned model IDs alongside the committed scenarios.json.