dspy-haystack-integration
Pass
Audited by Gen Agent Trust Hub on Oct 6, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill implements a workflow where training examples (
trainset) are used to optimize a DSPy module, and the resulting few-shot demonstrations are then directly interpolated into a Haystack prompt template. - Ingestion points: The
trainsetparameter inHaystackDSPyOptimizer.optimize()and thecompiled_moduleinHaystackDSPyOptimizer.build_optimized_pipeline()(examples/haystack-dspy-optimizer.py), as well as theextract_dspy_promptfunction (references/prompt-extraction.md). - Boundary markers: The skill uses standard few-shot prefixes (e.g.,
Context:,Question:,Answer:) but lacks explicit instructions for the model to ignore instructions embedded within the training data or provided context. - Capability inventory: The skill constructs and executes Haystack
Pipelineinstances which include retrieval and generation components. - Sanitization: There is no evidence of sanitization, filtering, or escaping for the data extracted from
demo.context,demo.question, ordemo.answerbefore it is joined into the finaloptimized_promptstring.
Audit Metadata