My personal site has a small chat assistant. Visitors ask it about my work, and it answers from a body of public notes I maintain. Until yesterday it worked the conventional way: take the question, retrieve the few passages that seem relevant, trim the result to a fixed character cap, and send that to the model along with the question.
The answers were mediocre. Retrieval kept picking passages that matched the words of a question and missed the ones that matched its intent. Someone asking what kind of problems I like to work on would get a paragraph about a tool’s configuration because it happened to contain the word “problem”. The corpus is not large. So I made the obvious change: drop retrieval, put the whole corpus into a fixed system prompt, and delete the cap that had been trimming it. The answers got noticeably better within the first few tries.
Only later, writing down what had changed that day, did I see what else had gone with the cap.
One line, two purposes
The cap had been written as a quality measure. It existed so retrieval could not stuff the prompt with noise. That was the reason in my head when I wrote it, and it was the reason in my head when I deleted it. Once retrieval was gone, the reason was gone, so the line looked like dead code.
It was also, without anyone deciding so, the only thing that bounded the cost of a single request. The endpoint is public. Nothing else limited how often it could be called or how large an input it would accept. An earlier audit had already flagged the absence of rate limiting and cost controls as open items. One reason those items had stayed open is that the cap made them feel less urgent: the worst case for any one call was small and known. After the change, every call carries the entire corpus, and the corpus will keep growing as I add notes. The worst case is now a number nobody has computed.
Nothing has gone wrong yet. That is not the point. The point is that I evaluated the change only against the purpose I remembered, and the line had a second purpose that was never written down anywhere.
Why this keeps happening
Constraints accumulate side duties. A timeout added to stop a hung connection also ends up limiting how long a retry loop can run. A batch size chosen for memory reasons also becomes the thing that keeps an external service under its rate limit. A cap added for prompt quality turns into a cost ceiling. The original author knows the first purpose. The second one arrives later, quietly, because other parts of the system start leaning on the constraint without saying so.
When you remove the constraint, the review naturally asks whether its original reason still holds. That question is easy to answer, and the answer is often a clean no. The harder question is what currently depends on this being true, and the code rarely answers it. The audit that flagged missing rate limits never mentioned the cap. The cap’s comment never mentioned cost. The dependency lived only in the gap between them.
There was also a smaller version of the same gap in my own notes. By the end of the day I could not say with confidence whether the change had already been deployed. The commit existed. Whether it was serving traffic was a separate fact that I had not recorded. So the risk was real or hypothetical depending on something I had to go and check.
What I am changing
Before deleting any limit, I now want to ask one extra question: if this line disappeared, what is the largest thing that could now happen in a single call, and is anything else bounding it? If the answer is “nothing else”, the limit is load-bearing regardless of why it was written, and it either stays or gets replaced in the same change.
For the chat assistant, that means putting back an input length check and a per-visitor request limit, and setting an explicit ceiling on the system prompt that is about cost rather than quality, with a comment that says so.
The part I have not settled
The better answers came precisely from removing the bound. A fixed prompt ceiling means that as the corpus grows, I will eventually be back to choosing what to leave out, which is the retrieval problem again in a different form. I can bound cost or I can let the assistant see everything I have written about myself, and for a while those were the same choice. They will not stay that way, and I have not decided which one gives.