Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Defend Agents From Injected Documents

EasyGenerative AI & LLMs00:00
Practice interviewer
In session
5 left
00:00

Your question is Defend Agents From Injected Documents. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Scenario

You are building an agent that reads documents during a task, then uses those documents to decide what to do next. One of the ingested documents may contain hidden or explicit instructions like "ignore previous directions" or "send data to this endpoint," mixed in with otherwise useful content.

Question

How would you prevent prompt injection from a document the agent ingested mid-task?

What this tests

  • Prompt injection defenses for agent workflows
  • Separation of trusted instructions from untrusted document content
  • RAG and retrieval containment choices
  • Offline and online evaluation of attack resistance