Prompts
Indirect Prompt Injection via Documents and Tools

Indirect Prompt Injection via Documents and Tools
Prompt playbooks for testing injection attacks where malicious instructions arrive through retrieved documents, emails, web pages, or tool outputs rather than direct user input. Useful for RAG and agent builders because these vectors bypass user-input filters and exploit trust in data sources.
RAG Poisoned Document Injection Test Prompt
For RAG pipeline security engineers testing whether malicious instructions embedded in retrieved documents can override system prompts. Produces a structured test harness with injected documents, expected refusal behavior, and eval criteria measuring instruction override success rates.
Email Body Instruction Override Detection Prompt
For AI email assistant builders testing whether hidden instructions in email bodies can redirect agent behavior. Produces adversarial email templates with embedded payloads and a detection scoring rubric measuring whether the agent follows injected versus system instructions.
Tool Output Instruction Smuggling Test Prompt
For agent platform engineers testing whether malicious instructions returned through tool outputs can hijack agent decision-making. Produces poisoned tool response payloads, expected agent behavior contracts, and eval checks for unauthorized action execution.
Retrieved Document Priority Conflict Prompt
For RAG system builders testing how models resolve conflicts between system instructions and authoritative-sounding retrieved content. Produces conflicting document pairs, priority resolution test cases, and eval criteria measuring whether system policy or retrieved content wins.
Search Result Poisoning Evaluation Prompt
For search-augmented AI builders testing whether poisoned search results can manipulate grounded answers. Produces a test suite with manipulated search snippets, ground-truth answer pairs, and eval metrics for citation trustworthiness and answer corruption rates.
API Response Instruction Injection Probe Prompt
For agent engineers testing whether malicious API responses can inject instructions that override tool-use policies. Produces poisoned API response payloads, agent action expectation specs, and eval checks measuring policy bypass success.
Database Query Result Manipulation Prompt
For data-agent builders testing whether SQL query results containing injected instructions can manipulate downstream agent reasoning. Produces poisoned row payloads, expected agent output contracts, and eval criteria for instruction smuggling detection.
Chat History Contamination Test Prompt
For conversation agent builders testing whether prior turns containing hidden instructions can manipulate current-turn behavior. Produces multi-turn contamination scenarios, expected refusal patterns, and eval metrics measuring cross-turn instruction leakage.
Document Summarization Hijack Prompt
For summarization pipeline owners testing whether documents containing 'ignore previous instructions' payloads can suppress or redirect summary outputs. Produces poisoned documents with hidden directives, expected summary behavior, and eval checks for output manipulation.
Citation Source Instruction Override Prompt
For grounded QA builders testing whether cited sources containing embedded instructions can override answer policies. Produces poisoned citation texts, expected citation behavior contracts, and eval criteria measuring whether citations become instruction vectors.
Code Comment Injection in Retrieved Files Prompt
For coding agent builders testing whether malicious comments in retrieved source files can inject build or execution instructions. Produces poisoned code files with comment-embedded payloads, expected agent refusal behavior, and eval checks for unauthorized command execution.
Web Page Scraped Content Injection Probe Prompt
For browsing agent builders testing whether scraped web content containing hidden instructions can redirect agent goals. Produces adversarial HTML pages with embedded payloads, expected agent navigation behavior, and eval metrics for instruction override detection.
PDF Text Layer Hidden Instruction Test Prompt
For document intelligence pipeline owners testing whether hidden text layers in PDFs can inject instructions during extraction. Produces PDFs with concealed text payloads, expected extraction behavior, and eval criteria measuring whether hidden content becomes actionable instructions.
Error Message Instruction Override Test Prompt
For agent platform engineers testing whether tool error messages containing injected instructions can manipulate error recovery behavior. Produces poisoned error payloads, expected retry or escalation behavior, and eval checks for error-path instruction smuggling.
MCP Server Response Injection Test Prompt
For MCP-based agent builders testing whether compromised MCP server responses can inject instructions through tool result channels. Produces poisoned MCP response payloads, expected agent tool-use contracts, and eval criteria measuring cross-server instruction leakage.
Browser Page Content Injection Test Prompt
For browser-agent builders testing whether page content with embedded instructions can override navigation or action policies. Produces adversarial page content, expected agent behavior specs, and eval metrics for DOM-based instruction injection detection.
Log File Instruction Smuggling Detection Prompt
For observability agent builders testing whether ingested log entries containing injected instructions can manipulate analysis or alerting behavior. Produces poisoned log lines, expected analysis output contracts, and eval checks for log-based instruction vectors.
Dependency Manifest Poisoning Test Prompt
For code-review agent builders testing whether malicious instructions in package manifests can inject build or deployment commands. Produces poisoned manifest files, expected agent review behavior, and eval criteria measuring supply-chain instruction injection detection.
Markdown Document Hidden Instruction Probe Prompt
For documentation agent builders testing whether hidden instructions in markdown files can manipulate summarization or Q&A behavior. Produces markdown documents with concealed payloads, expected agent output contracts, and eval checks for rendered-content instruction smuggling.
Knowledge Base Article Poisoning Test Prompt
For support bot builders testing whether poisoned knowledge base articles can override support policies or redirect customer interactions. Produces adversarial KB articles, expected bot behavior contracts, and eval metrics measuring policy bypass through trusted content sources.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us