16
How would you handle prompt injection in a model-backed product?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceI would assume that both user input and retrieved content may be adversarial. My design would separate trusted instructions from untrusted content and apply strict boundaries when passing information to the model. The reason I choose this approach is that prompt injection is often a trust-boundary problem, not just a model problem. I would also think about tool access control, content filtering, and logging suspicious prompts for review. If the interviewer wants more depth, I would mention red-team testing.