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 trainset parameter in HaystackDSPyOptimizer.optimize() and the compiled_module in HaystackDSPyOptimizer.build_optimized_pipeline() (examples/haystack-dspy-optimizer.py), as well as the extract_dspy_prompt function (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 Pipeline instances 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, or demo.answer before it is joined into the final optimized_prompt string.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 6, 2026, 09:04 PM