DSPy: Moving from String Hacks to Code
DSPy replaces brittle string-concatenated prompts with declarative modules and signatures. Teleprompter optimizers (BootstrapFewShot, MIPRO) automatically generate, test, and tune optimal prompts against evaluation metrics.
Prompt Injection & Delimiter Sanitization
Untrusted user inputs and web scrapes must be isolated using strict XML tags (`<user_data>...</user_data>`) and verified by semantic safety guardrails. System instructions must never trust payload content as actionable commands.