Engrain by ByteRush

AIF.02.02 Mid-level

Code blocks, citations and rich content

Comes up in: Frontend system design, AI system design

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • syntax highlighting off the main thread
  • copy buttons
  • never auto-run generated code
  • running code only in a sandboxed iframe on a separate origin
  • rendering citations and source links
  • math and tables

Words you will know

sandboxed iframecitation

What you will practise

  • citation UI that links each claim to its source

Interview questions this answers

  • How would you safely let users run code generated by a model?
  • How do you display citations so users can verify answers?