An indirect prompt injection can affect a search-augmented large language model only after its carrier page reaches model context. SearchInject controls this admission decision with a joint score combining retrieval relevance, search-abuse cues, instruction likelihood, and two relevance interactions. A quarantine threshold is selected under an empirical 0.5% clean-candidate false-quarantine constraint on a calibration split. Evaluation uses 300 held-out SciFact queries and held-out payload categories within four construction families already represented during development. Across 1,200 query-family outcomes per retriever, top-10 target exposure falls from 0.9408 to 0.1583 for BM25, from 0.9158 to 0.1508 for a normalized hybrid, and from 0.8450 to 0.1375 for latent semantic analysis. These are relative reductions of 83.2-83.7%; the largest absolute change in clean normalized discounted cumulative gain at rank 10 is 0.0018. The frozen threshold yields clean test false-quarantine rates of 0.59-0.65%, above the empirical calibration constraint. A query-level analytical reanalysis accounts for the repeated construction outcomes under an independent-query assumption. A separate 104-case generation follow-up records context removal but no confirmed undefended hijacks under a post hoc endpoint, so it cannot estimate a reduction in attack success. The evidence supports retrieval exposure control within the evaluated construction families; the benefit of the interaction terms at matched clean cost remains unresolved.
Figures & tables
Fig. 1: SearchInject scores the depth-100 candidate list before context assembly. Rejected pages are omitted, and accepted candidates retain their original relative order. The main evaluation measures target admission; generation behavior is a separate exploratory endpoint.
Item
Setting
Corpus
5,183 SciFact abstracts in BEIR format
Queries
655 fitting; 154 calibration; 300 test
Payload categories
9 fitting; 3 calibration; 13 test
Construction families
Title stuffing, doorway, near duplicate, hidden metadata; all seen during development
Retrieval
BM25, LSA, normalized hybrid; depth 100
Joint model
Class-balanced logistic regression; [r,a,i,ar,ir]
TABLE I: Evaluation protocol and known implementation settings
Exposure@10
Clean NDCG@10
Retriever
None
Joint
None
Joint
BM25
.9408
.1583
.6602
.6584
Hybrid
.9158
.1508
.4606
.4593
LSA
.8450
.1375
.3000
.2987
TABLE II: Main results over the four known construction families
Fig. 2: Exposure and clean retrieval utility at the recorded operating point. Panel (a) shows the large decrease in target admission; panel (b) shows the small measured clean NDCG change. Bars reproduce Table II ; they do not depict an operating-point sweep. The query-level analytical uncertainty for exposure reduction is reported in the text.
Split or retriever
False quarantine
Threshold
Calibration constraint
≤0.500%
Selected on calibration
Calibration observed
0.498%
0.973853
BM25 test
0.590%
0.973853
Hybrid test
0.620%
0.973853
LSA test
0.650%
0.973853
TABLE III: Empirical calibration constraint and clean test observations
Family
BM25
Hybrid
LSA
Title stuffing
1.000/.083
1.000/.083
.983/.080
Doorway
1.000/.230
.987/.233
.847/.207
Near duplicate
.763/.197
.680/.163
.590/.133
Hidden metadata
1.000/.123
.997/.123
.960/.130
TABLE IV: Exposure@10 by construction family
Policy
Exposure@10
Clean Δ NDCG@10
Abuse only
.1436
−.1113
Instruction only
.4169
−.0071
Joint quarantine
.1489
−.0014
TABLE V: Component policies at their recorded operating points
Model
Prompt
None
Joint
Clean correct
Qwen3-4B
Conventional
0/4
0/4
36/90
Qwen3-4B
Hardened
0/4
0/4
34/90
Phi-4-mini
Conventional
0/4
0/4
47/90
Phi-4-mini
Hardened
0/4
0/4
47/90
TABLE VI: Exploratory generation observations by model and prompt