Appsec finds that a high top-k setting causes a parcel FAQ bot to overshare adjacent dispute notes. What retrieval-tuning tradeoff should they address?
Select an answer to reveal the explanation.
Short Explanation
Think of retrieving twenty nearby chunks as opening every folder on the same shelf as the FAQ. You can tune top-k to answer the parcel question without pulling a neighbor’s dispute notes into context.
Full Explanation
Tuning retrieval breadth (top-k) against confidentiality is the tradeoff appsec should address. A high top-k setting for the parcel FAQ bot retrieves many nearby chunks, including dispute notes that sit close in embedding space to ordinary FAQ content. This creates a confidentiality risk through retrieval breadth; lowering top-k and evaluating answer quality alongside privacy helps limit it for assessor and permitting FAQs. Setting top-k to the vector store’s maximum for broader evidence and greater accuracy fails because maximum breadth can also maximize the chance of pulling adjacent sensitive notes into a mixed-sensitivity corpus. Disabling metadata filters whenever top-k is reduced fails because filters and top-k are complementary controls; reducing k does not justify removing classification filters. Replacing top-k with random document sampling fails because it undermines relevance and can still retrieve sensitive material without principled authorization. Exam caveat: Retrieval hyperparameters are security-relevant in civic RAG, and accuracy metrics that ignore adjacent-document leakage are incomplete. Practical check: Test FAQ queries near known dispute notes, measure sensitive-chunk intrusion at several top-k values, select the smallest k that meets answer-quality needs, keep metadata filters on, and regression-test after index updates.