~/talk

Prompting Safely: Building Secure LLM Prompts with a Scala DSL

Talkat Lambda World 2025 · 2025-10-23..10-24· [security, scala]
links:none on file
name:Isaias B.
links:none on file
slides:none on file

Scala DSL that composes prompts via a typelevel interpolator and contravariant templates, implemented in about 300 lines, built over three months and flagged not production ready. It uses Cats IO monad for validation which runs on the final rendered prompt and can call databases or a secondary LLM to block prompt injection. Templates are a contravariant Template typeclass and the library can request structured JSON outputs using serializers like Circe / Play / ZIO Schema to model case classes.

AI-written summary · about

  1. 0:00Prompt safety introduction
  2. 1:25Why prompt safety matters
  3. 2:52Scala DSL design
  4. 7:55Prompt library goals
  5. 13:09Library implementation basics
  6. 18:25Advanced combinators
  7. 23:06Prompt interpolator
  8. 27:22Validating prompts
  9. 30:12Prompt formatting
  10. 31:59Summary and future work
  11. 34:13Trade-offs and injection protection
  12. 35:42Closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.