County counsel fears long ordinance pastes could inflate cost and enable context-stuffing attacks on a legal AI assistant. Which control best addresses that concern?
Select an answer to reveal the explanation.
Short Explanation
Endless ordinance pastes are a budget and security tax. Capping tokens per request keeps cost predictable and shrinks context-stuffing room. Caching frequent prompts might trim repeat cost, but it won't limit a single oversized paste, so you'll still risk spiking cost and enabling context stuffing.
Full Explanation
Token limits are both a cost-governance and security control for municipal legal assistants. County counsel concerns about long ordinance pastes inflating spend and enabling context-stuffing attacks are addressed by capping maximum tokens per request. Caps keep inference cost predictable, reduce the room for oversized malicious or accidental contexts that drown out system instructions, and force users to submit focused excerpts rather than entire code compilations in one call. Caching frequent ordinance prompts to limit cost growth and oversized context attacks does not work because caching only helps with repeated prompts and does nothing to cap the size of a single oversized paste, so it cannot stop cost spikes or context-stuffing attacks from one giant request. Filtering output tokens per reply to limit cost growth and oversized context attacks does not work because it only limits cost from oversized replies and does not limit the number of tokens in an incoming ordinance paste, so it leaves both cost growth and context stuffing from inputs unchecked. Enforcing per-user rate limits to limit cost growth and oversized context attacks does not work because it only limits high-volume requests and does not cap the tokens in any one request, so a single long ordinance paste can still inflate spend and enable context stuffing. Exam caveat: maximum tokens per request simultaneously bound cost and oversized-context abuse on legal AI assistants. Operational check: configure a hard token ceiling at the gateway or API, reject or truncate over-limit ordinance pastes with a clear user message, monitor token-use outliers, and review whether caps still meet legitimate counsel workflows.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.