Engrain by ByteRush

AIF.02 2 concepts

Rendering model output safely

Treat model output as untrusted input.

  1. AIF.02.01Model output is untrusted: XSS and injection via renderingCoreMid-levelBeing written
  2. AIF.02.02Code blocks, citations and rich contentMid-levelBeing written

Interview questions in this module

  1. Why is rendering LLM output with innerHTML dangerous?
  2. How can a markdown image in model output leak user data?
  3. How would you safely let users run code generated by a model?
  4. How do you display citations so users can verify answers?