Code generation is one of the most promising applications of large language models (LLMs), offering substantial productivity boosts for developers. However, this benefit is tempered by serious concerns surrounding the correctness and security of the generated code - especially outside the happy path.

Code generation is one of the most promising applications of large language models (LLMs), offering substantial productivity boosts for developers. However, this benefit is tempered by serious concerns surrounding the correctness and security of the generated code - especially outside the happy path.
Several solutions have been put forward to mitigate this, ranging from agentic code review to exhaustive test generation to formal verification.
In this talk, I present evidence from our research that these approaches are not currently sufficient to mitigate those concerns and instead suggest an alternative, more viable path forward based on the Scala type system.
I conclude by offering an insight from the perspective of LLM developers on why this approach is working and how even more secure coding LLMs can be developed, thanks to Scala features.
Learn how to accelerate Scala code by orders of magnitude with Cyfra.
We'll explore type classes in Scala 3, using its new rules for givens, extension methods, and mechanisms for automatic derivation via mirrors or macros.
In this talk, I’ll guide you through the crossroads where Scala intersects with AI, some applications aimed at boosting developer productivity, others focused on integrating your code with LLMs.
Do you like it when compiler generates the boring code for you? Fast, mundane, boring-but-error-prone code? Do you need to implement such a code generator yourself? Have you found out that Shapeless/Mirrors bend your brain a bit too much?
In this talk, we will refactor a real-world service using Extensions, Union Types, and Context Functions, demonstrating how to achieve a strictly typed, decoupled architecture that remains easy to read and evolve.