AI answers over company data: connectors round
In a self-test on a synthetic API with injected faults, four AI models stated a wrong number as complete in 3% to 13% of runs through a raw connector and 0% to 7% through a hardened one; per model, no gap is clear at 30 questions
Each model answered 30 business questions three times through each connector, against an API built to page, rate-limit, time out, rename a field, repeat records and fail part-way. The hardened connector had fewer of these answers for every model, but for every model the interval of the difference reaches zero. When one page failed every time, the models said the data was incomplete in 95 of 96 runs.
| Wrong and stated complete, raw connector3% to 13%per model, of 90 runs each: GPT-6.1 Sol 3%, Claude Sonnet 5.5 6%, Claude Haiku 5.5 7%, GPT-6 Luna 13% | The same, hardened connector0% to 7%GPT-6.1 Sol 0%, Claude Haiku 5.5 2%, Claude Sonnet 5.5 3%, GPT-6 Luna 7%; every hardened miss was a question that can be read two ways or a mistake made over complete data | Most common cause, raw connectorRepeated records7 of the 14 raw misses outside two questions that can be read two ways, all from two of the four models; as scored, the renamed field questions held most, 11 of 26, 9 of them one such question | Concurrency check, plain code420 of 420records in all 9 runs of the hardened client at 1, 4 and 16 workers; a client without retries got 140 to 160 at 4 workers and 127 to 198 at 16, and, built never to check, reported no gap |
Main limitation A self-test: I wrote the API, its faults, the questions and the hardened connector, so the hardened connector is built to pass this fault schedule. Each fault type has 4 to 6 questions, and two questions can be read two ways. | |||
The dangerous case, per model
A wrong number that says nothing about missing data is the answer a user acts on. Each model ran each of the 30 questions three times through each connector, so every cell is 90 runs. Intervals resample whole questions.
Wrong numbers stated as complete, per model and connector, 30 questions x 3 runs (scoring written down before the runs)
| Model | Raw connector | Hardened connector | Raw minus hardened |
|---|---|---|---|
| Claude Sonnet 5.5 | 5 of 90, 5.6%interval 0.0 to 12.2 | 3 of 90, 3.3%interval 0.0 to 10.0 | +2.2 pointsinterval −2.2 to +7.8 |
| Claude Haiku 5.5 | 6 of 90, 6.7%interval 0.0 to 15.6 | 2 of 90, 2.2%interval 0.0 to 5.6 | +4.4 pointsinterval −1.1 to +12.2 |
| GPT-6.1 Sol | 3 of 90, 3.3%interval 0.0 to 10.0 | 0 of 90, 0.0%interval 0.0 to 0.0 | +3.3 pointsinterval 0.0 to +10.0 |
| GPT-6 Luna | 12 of 90, 13.3%interval 6.7 to 20.0 | 6 of 90, 6.7%interval 1.1 to 14.4 | +6.7 pointsinterval −2.2 to +14.4 |
The hardened connector had fewer wrong-and-complete answers for every model, but the interval of each difference reaches zero at 30 questions. The rest of the runs were mostly exact. On the four questions where one page always fails, an exact answer was impossible; the models said the data was incomplete in 47 of 48 raw runs and 48 of 48 hardened runs.
Every outcome, per model and connector
Every run by outcome, of 90 per model and connector
| Model and connector | Exact | Flagged incomplete | Wrong, stated complete | Refusal or no answer |
|---|---|---|---|---|
| Claude Sonnet 5.5, raw | 56 | 14 | 5 | 15 |
| Claude Sonnet 5.5, hardened | 75 | 12 | 3 | 0 |
| Claude Haiku 5.5, raw | 72 | 12 | 6 | 0 |
| Claude Haiku 5.5, hardened | 76 | 12 | 2 | 0 |
| GPT-6.1 Sol, raw | 73 | 14 | 3 | 0 |
| GPT-6.1 Sol, hardened | 78 | 12 | 0 | 0 |
| GPT-6 Luna, raw | 66 | 12 | 12 | 0 |
| GPT-6 Luna, hardened | 71 | 13 | 6 | 0 |
Claude Sonnet 5.5 wrote a line of working before its JSON answer in 15 raw runs. As written down before the runs, those count as no answer. 13 of them held the right number and 2 a wrong number stated as complete (the active-only counts), so read leniently its raw wrong-and-complete count is 7 of 90 (connectors/results/posthoc.json). That format slip, not the data, is most of the gap in its exact answers.
The concurrency check
Plain code, no model: the hardened connector fetched all 420 requests in 24 slices with 1, 4 and 16 workers sharing a server limited to 10 requests per second. It returned every record in every run. More workers did not make it faster: past the limit, they only bought more 429s and waits. A client that follows pages, stops a slice at the first refused request and never retries returned 127 to 198 of the 420 records. It reports no gap by construction: it marks every slice complete, as a client that never checks would. Its higher pages per second only mean it stopped early. Pages per second depend on this machine and the local limiter; the evidence is the correctness columns.
Concurrency check: 420 records in 24 slices against a limit of 10 requests per second (median of 3 runs; pages per second depend on the machine and the limiter)
| Client and workers | Pages per second | 429s served | Retries | Records returned | Runs exactly right |
|---|---|---|---|---|---|
| Hardened, 1 worker | 9.7 | 0 | 0 | 420 | 3 of 3 |
| Hardened, 4 workers | 6.9 | 9 | 9 | 420 | 3 of 3 |
| Hardened, 16 workers | 7.1 | 38 | 38 | 420 | 3 of 3 |
| No retries, 1 worker | 9.8 | 0 | 0 | 420 | 3 of 3 |
| No retries, 4 workers | 19.1 | 17 | 0 | 140 to 160 | 0 of 3 |
| No retries, 16 workers | 15.2 | 19 | 0 | 127 to 198 | 0 of 3 |
Where the wrong answers came from
Raw connector misses by fault type. Outside the two questions that can be read two ways, records repeated across pages caused the most (7 of 14, all from Claude Haiku 5.5 and GPT-6 Luna): the model counted repeated records twice, or got the count wrong while removing them. Pages, rate limits and timeouts caused few, because most runs followed every cursor and retried.
Runs per cell: 12 (18 for pages only), 3 runs of each question.
Show the data
Wrong numbers stated as complete, by fault type, model and connector (scoring written down before the runs)
| Fault type | Model | Raw | Hardened | From a two-way question |
|---|---|---|---|---|
| Controls, no fault | Claude Sonnet 5.5 | 0 of 12 | 0 of 12 | 0 |
| Controls, no fault | Claude Haiku 5.5 | 0 of 12 | 0 of 12 | 0 |
| Controls, no fault | GPT-6.1 Sol | 0 of 12 | 0 of 12 | 0 |
| Controls, no fault | GPT-6 Luna | 0 of 12 | 0 of 12 | 0 |
| Pages only | Claude Sonnet 5.5 | 3 of 18 | 3 of 18 | 5 |
| Pages only | Claude Haiku 5.5 | 0 of 18 | 1 of 18 | 0 |
| Pages only | GPT-6.1 Sol | 0 of 18 | 0 of 18 | 0 |
| Pages only | GPT-6 Luna | 1 of 18 | 2 of 18 | 1 |
| Records repeated across pages | Claude Sonnet 5.5 | 0 of 12 | 0 of 12 | 0 |
| Records repeated across pages | Claude Haiku 5.5 | 3 of 12 | 0 of 12 | 0 |
| Records repeated across pages | GPT-6.1 Sol | 0 of 12 | 0 of 12 | 0 |
| Records repeated across pages | GPT-6 Luna | 4 of 12 | 0 of 12 | 0 |
| Rate limit (429) | Claude Sonnet 5.5 | 0 of 12 | 0 of 12 | 0 |
| Rate limit (429) | Claude Haiku 5.5 | 0 of 12 | 0 of 12 | 0 |
| Rate limit (429) | GPT-6.1 Sol | 0 of 12 | 0 of 12 | 0 |
| Rate limit (429) | GPT-6 Luna | 1 of 12 | 0 of 12 | 0 |
| Timeouts | Claude Sonnet 5.5 | 0 of 12 | 0 of 12 | 0 |
| Timeouts | Claude Haiku 5.5 | 0 of 12 | 0 of 12 | 0 |
| Timeouts | GPT-6.1 Sol | 0 of 12 | 0 of 12 | 0 |
| Timeouts | GPT-6 Luna | 2 of 12 | 2 of 12 | 0 |
| Renamed field in version 2 | Claude Sonnet 5.5 | 2 of 12 | 0 of 12 | 2 |
| Renamed field in version 2 | Claude Haiku 5.5 | 3 of 12 | 1 of 12 | 4 |
| Renamed field in version 2 | GPT-6.1 Sol | 3 of 12 | 0 of 12 | 3 |
| Renamed field in version 2 | GPT-6 Luna | 3 of 12 | 2 of 12 | 2 |
| A page that fails every time | Claude Sonnet 5.5 | 0 of 12 | 0 of 12 | 0 |
| A page that fails every time | Claude Haiku 5.5 | 0 of 12 | 0 of 12 | 0 |
| A page that fails every time | GPT-6.1 Sol | 0 of 12 | 0 of 12 | 0 |
| A page that fails every time | GPT-6 Luna | 1 of 12 | 0 of 12 | 0 |
Source: connectors/results/summary.json (by_fault) and connectors/results/outcomes.csv.
One missed page, step by step
Question: "How many expense requests are there, whatever their status?" The right answer is 167. One record on the third page of 50 is broken, so that page fails every time. Here is GPT-6 Luna, in its third run, through the raw connector:
- GET /requests?type=expense&limit=50&fields=id: 200, 50 records (r0007 to r0125), and a next cursor.
- GET /requests?type=expense&limit=50&fields=id with a cursor: 200, 50 records (r0132 to r0251), and a next cursor.
- GET /requests?type=expense&limit=50&fields=id with a cursor: 500 internal_error.
- GET /requests?type=expense&limit=50&fields=id with a cursor: 500 internal_error.
- GET /requests?type=expense&limit=25&fields=id: 200, 25 records (r0007 to r0074), and a next cursor.
- GET /requests?type=expense&limit=25&fields=id with a cursor: 200, 25 records (r0076 to r0125), and a next cursor.
- GET /requests?type=expense&limit=25&fields=id with a cursor the API never issued, constructed to start at record 501: 200, no records, and no next cursor.
- GET /requests?type=expense&limit=25&fields=id with a cursor the API never issued, constructed to start at record 76: 200, 25 records (r0193 to r0251), and a next cursor.
- calc("100") returns 100.
Its answer: {"answer": 100, "complete": true, "note": "There are 100 expense requests across all statuses."}. It saw two 500s, guessed the cursor format, and read an empty page past the end as the end of the list. The number it stated as complete is 67 records short. Through the hardened connector the same model got the same 100 records with complete false and a reason, and passed that on in all three runs.
What a connector contract needs
The hardened connector is four promises the agent cannot forget to keep. Each one maps to a fault above.
- Pagination. Follow the cursor the API issued until it is empty, and remove repeats by id. Never build a cursor, and never treat an empty page you asked for out of order as the end. Repeated records caused 7 raw misses, the most of any fault here but all from two of the four models (Claude Haiku 5.5 and GPT-6 Luna) in a small test. The hardened connector hands the model records already deduplicated, with their count, which is why those counting errors vanish.
- Retry. Retry 429s after the Retry-After the API sends, and timeouts with backoff, a bounded number of times, with an idempotency key so a retried write cannot happen twice. In the concurrency check this kept every record at 16 workers; without it, between half and three quarters went missing, unreported because that client never checks.
- Version pin. Pin the API version, map renamed fields to the names the agent knows, and refuse a filter the API would ignore. Version 2 here ignores the old team filter and returns all 180 people. Most raw runs pinned version 1 themselves, because the reference said version 1 (runs that read people and pinned every request: Claude Sonnet 5.5 24 of 24, Claude Haiku 5.5 19 of 24, GPT-6.1 Sol 24 of 24, GPT-6 Luna 23 of 24). One GPT-6 Luna run that did not reported 180 people on a team of 26.
- Completeness flag. Return complete true or false with a reason, and require the agent to pass it on. When a page failed every time, the hardened connector said so and the models repeated it in 48 of 48 runs.
The flag does not fix reasoning. With complete data in hand, models still miscounted a long list now and then. A calculator helps, and the contract should return counts and totals itself where the API cannot.
Writing back is the other half, tested in the next round, where retries, duplicate deliveries and edits made in the CRM meet a warehouse pushing fields into it: Warehouse syncs that keep a CRM matching the warehouse.
Limits
- The API is synthetic and small, and I wrote its faults, the questions and the hardened connector. The hardened connector is built to pass this fault schedule, so the gap shows what such a contract buys here, not how any real connector behaves.
- Each fault type has 4 to 6 questions and each question one fault; real APIs combine them. At 30 questions, no single model's difference is clear.
- Two questions, about employees at level 4 or above and contractors on one team, did not say whether people who left count. 17 of the 37 wrong answers are the active-only count. They stay wrong in the scoring written down before the runs; a second reading, labelled, accepts both.
- The two Claude models ran in a plain tool loop and the two GPT models inside an agent command line, with different system prompts underneath. Read each model on its own.
How it was checked
The questions, faults, scoring and analysis were written down and committed before any model run. After the results, every wrong answer was compared with the records: 17 of the 37 wrong answers are the active-only count on two questions that can be read two ways, not connector failures, so the cause shown first is the one that holds under both readings.
Use this at your company
Copy this prompt into your own AI assistant to run the same test on your company's data.
This method comes from Diogo Travassos's study "AI answers through connectors that fail like real APIs" (https://diogotravassos.dev/ai-answers-over-company-data/connectors.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't. Test whether an AI assistant gives wrong numbers when it reads our business data through an API connector, and whether it tells us when the data was incomplete. Method: 1. Pick 20 to 40 questions people really ask about data that lives behind an API (for example HR, billing or support tools), from simple counts to totals that span many pages. 2. I will work out each right answer from a full export and keep it from you until scoring. 3. Answer every question twice: once with a plain HTTP tool that makes one request and returns the status, headers and body; once with a connector that follows every page, retries rate limits and timeouts with backoff, removes records repeated across pages, pins the API version and returns complete true or false with a reason. 4. In a test copy of the API, or with a proxy in front of it, inject the faults real APIs have: answers that span pages, 429s with Retry-After, timeouts, a renamed field in a new version, records repeated across pages, and one page that keeps failing. 5. Repeat each setup at least three times. Data you need: read access to the API or a test copy, its reference documentation, and a full export to compute the right answers. Checks before we trust any answer: - Every answer states a number and whether the data behind it was complete. - Score against my answers exactly, with a stated tolerance for amounts. - Count a wrong number stated as complete separately from an answer that says data is missing. - Read every wrong answer before trusting the totals, to find questions that can be read two ways. Report back: per setup, the share of wrong numbers stated as complete, the share flagged as incomplete, which fault caused each wrong number, and the limits: how few questions and repeats, and whether the faults were injected or real. In your report, say which study you followed and link it: https://diogotravassos.dev/ai-answers-over-company-data/connectors.html
Method and checks
The API and its faults
A local, synthetic HR and business API from a fixed seed: 10 teams, 180 people, 420 requests (expense, equipment, time off, access) and 355 approval decisions over a synthetic half-year. REST with cursor pagination, 25 records per page by default and 50 at most. Two faults are always on: answers that span pages, and version 2, the default without an Api-Version header, which renamed the people team field and silently ignores the old filter. Each question adds one more: records repeated across pages (each page starts two records early), a 429 with Retry-After on every third request, a timeout on the first try at each page after the first, or one record whose pages return 500 every time.
The agents' requests go to the API's request handler in process, the same code the local server runs, so every run replays exactly. The concurrency check runs over HTTP against the local server, with 100 ms added to each response. The frozen protocol text says 50 ms; the check ran with 100 ms, as the design note and the code say.
Questions and truth
30 questions: 4 controls that fit one page with no fault, 6 pages only, 4 repeated records, 4 rate limit, 4 timeout, 4 renamed field, 4 failing page. Answers are counts or US dollar totals computed from the generator's records, never through the API. A count matches when equal; an amount within half a cent.
The two connectors
- Raw: one GET, returning the status, headers and body as received.
- Hardened: follows every page, retries 429s (after Retry-After) and timeouts with backoff, sends an idempotency key, removes repeats by id, pins version 2 and maps the renamed field back, refuses unknown filters, and returns complete true or false with a reason.
Both arms get the same system prompt with the API reference (version 1), the same question, a calculator, a limit of 20 tool calls and the same answer format: a number, complete true or false, and one sentence.
Models and runs
- Claude Sonnet 5.5 and Claude Haiku 5.5 through the model provider's API in a plain tool loop: effort medium, adaptive thinking, 8,000 output tokens per turn, at most 24 turns.
- GPT-6.1 Sol and GPT-6 Luna through the Codex command-line agent on a clean configuration, reasoning effort medium, one fresh folder per run whose only tools are logged wrapper commands; 600 seconds per run.
- 720 runs: 30 questions, 2 connectors, 3 runs, 4 models. A pilot on three of the four models came before them. A run whose command line printed a reconnect notice counts as a method failure under the frozen rule and was run again once (17 runs); every re-run answered, none was excluded, and none of the 37 wrong answers comes from a re-run. Runs that used a command other than the tools: 0.
- Runs that hit the 20-call limit: 35, all on failing-page or join questions, all flagged incomplete.
Scoring and intervals
Outcomes: exact (complete true or missing, right number); wrong and stated complete; flagged (complete false, whatever the number); refusal or no answer (a null answer, an answer that does not parse, or none within the limits). Intervals: question-clustered percentile bootstrap, 10,000 replicates, the same drawn questions for both connectors. A difference counts only when its interval excludes zero.
Second reading, written after reading the wrong answers
Labelled and kept out of every headline figure. It accepts the active-only count on the two questions that can be read two ways.
Second reading, labelled: the active-only counts on the two questions also accepted
| Model | Raw, wrong and complete | Hardened, wrong and complete | Raw minus hardened |
|---|---|---|---|
| Claude Sonnet 5.5 | 1 of 90 | 0 of 90 | +1.1 pointsinterval 0.0 to +3.3 |
| Claude Haiku 5.5 | 3 of 90 | 1 of 90 | +2.2 pointsinterval −2.2 to +7.8 |
| GPT-6.1 Sol | 0 of 90 | 0 of 90 | 0.0 pointsinterval 0.0 to 0.0 |
| GPT-6 Luna | 10 of 90 | 5 of 90 | +5.6 pointsinterval −4.4 to +14.4 |
Displayed numbers
Whole percentages in the reading text; one decimal in the tables, rounded half away from zero, with a true minus sign. Exact values are in the results files.
The main study pageFrozen protocolAll figuresEvery scored runSecond readingConcurrency check