Work

Inverse-RAG Synthetic Test Generation for Agentic AI Assistants in Intelligent Environments: A Mutation-Based Evaluation of Fault-Detection Effectiveness

Year: 2026
Type: preprint
Abstract: Conversational agents that retrieve documents and call tools are being deployed to operate buildings, campuses and other intelligent environments, yet engineering teams rarely have labelled data with which to test them before real users arrive. Synthetic test generation is widely offered as a remedy, but there is little evidence on whether synthetic suites detect faults, which generation strategies matter, and whether automatically produced ground truth can be trusted. We present an inverse retrieval-augmented generation pipeline that turns knowledge-base context into persona-conditioned questions with verifiable answers, expands them along multi-hop, linguistic, edge-case, adversarial and privacy dimensions, and filters them with a claim-level critic. In a controlled study with a deterministic tool-using agent and a grammar-based teacher, synthetic suites of 100 tests detected 93% of fifteen design faults, against 29% for a rule-based suite and at most 40% for re-implemented Ragas- and PyRIT-style generators. On faults independent of the generator design the advantage was smaller: 92% versus 75-77% of 312 automatically generated code mutants, and 70% versus 54-62% of twelve faults from external taxonomies. Fault-level hypothesis tests confirmed the advantage on design faults and code mutants (Holm-adjusted ≤ 0.022), but not on the underpowered held-out set, and the code-mutant advantage lost significance when mutants were aggregated by function. A claim-level critic removed injected label errors in the structured corpus, but on paraphrased, outdated and cross-referenced documents it had to route 41% of items to human review to stay error-free. With a local 7B-parameter LLM agent on realistic facility documentation, a variant with an LLM teacher and critic detected 8 of 12 configuration faults against 4-5 for the other suites, although no difference among the pipeline's suites was statistically significant with 12 faults, while natively generated Ragas tests carried stale reference answers and garak/PyRIT probes detected none. Synthetic generation was therefore an effective bootstrap under the conditions studied, provided that its oracles are verified and its fault coverage is checked against independent faults.
Language: English
Subfield: Software
Open Access status: green
OpenAlex ID: W7226007092
Cites: 34
Cited by:
Related to: 10