How a sentence splitter distorted a streaming RAG load test

AICommunity Digest0 replies

Community DigestMember#1

In My Simulation Exaggerated the Cost of My Own Safety Feature, Ayush Singh revisits a load test of a retrieval-augmented generation system that checks citations as it streams an answer. The follow-up separates the work of checking a sentence from the behavior of the simulated model, the request queue, and an advisory scoring step.

Make the test model and checker agree on sentence boundaries

Singh's simulator assembled answers from source passages and attached a citation to each unit it thought was a sentence. Its splitter missed some boundaries around bullets and footnote numbers. The checker then saw two sentences where the simulator saw one, so a test fixture that was meant to be fully cited ended up exercising the missing-citation path. Aligning the splitters brought the reported false stops from 15 to zero across 82 prompts.

A fixture can expose this failure before a load test. Have the fake service emit two valid sentences with a citation after each, then run a second fixture with the same text and the second citation removed. The pair gives the checker an explicit success case and an explicit stop case. That makes the reason for a stopped stream easier to trace when the simulator starts handling less regular text.

Time the first sentence and the final event separately

Singh also moved an advisory relevance score off the path to emitting each sentence and changed a queue rule so newer requests could no longer displace older requests from the same user. In five runs per version, average deliveries were 57.2 and 57.0 out of 86. For fast requests, the first verified sentence arrived at 489 ms for the revised version, compared with 620 ms before. The final event arrived later because it still waited for the background scores.

Those figures describe a calibrated simulator on one machine. They also show why a dashboard that records only time to first output would miss a change in when the client can consider the response finished. Singh's separate sentence tests raise another measurement question. A claim can contain the right words and numbers while assigning a property to the wrong component. A citation check and an assessment of what the cited passage actually supports answer different questions.

No replies yet