.NET
Dependency Injection Is Now Complete In .NET 8! (via Nick Chapsas)
- If you register multiple interface implementations using .AddSingleton(), the most recently added is the one you’ll get back.
- Keyed services are introduced in .NET 8 with .AddKeyedSingleton<interface, concreteClass>(keyObject). Note you can use integers, strings, etc.
- On the API side, use [FromKeyedServices(keyObject)].
Making Your APIs Blazingly Fast in .NET 8! (via Nick Chapsas)
- If your API is calling out to a service where what’s returned is the same for a period of time, caching can boost performance. In .NET 7 you can use .Services.AddOutputCache() and .UseOutputCache(). However, this is in memory per instance and may not be performance when scaling out the application.
- There’s a NuGet package Microsoft.Extensions.Caching.StackExchangeRedis. You’ll also need to have Redis running (e.g., in a local Docker container). You’ll also likely need a tool to provide a UI for Redis so you can see what’s in the cache.
- Keys can be tagged so that you can do specific cache invalidation.
AI
Generative AI-nxiety (via HBR)
- Hallucinations are a problem. Checking veracity can’t be automated, automation bias (people trust the outputs of software), people want quick answers, everyone has access to it, LLMs can confidently state false claims.
- LLMs appear to deliberate (reasoning that looks like thinking), but they’re only generating probable responses based on word order. It doesn’t truly understand what you mean.
- Just like sleazy car salespeople can be trained to press emotional buttons, LLMs have access to that same training.
- Who’s responsible if things go ethically sideways?
- Banning/ignoring doesn’t work either (it’s just like telling teens to be abstinent and providing no sex ed training).
What is Generative AI? (via LinkedIn Learning)
“Learn about the basics of generative A.I., including its history, popular models, how it works, ethical implications, and much more.”
Generative AI: The Evolution of Thoughtful Online Search (via LinkedIn Learning)
“For years, we’ve relied on search engines like Google and Bing to help us navigate the ever-evolving internet. But now that reasoning engines like Chat-GPT have come onto the scene, how can you prepare for the future of online search? In this course, instructor Ashley Kennedy shows you how to get up to speed with the key distinctions and best practices of using reasoning engines that leverage generative AI. Learn more about the core concepts of generative AI-driven reasoning engines and how they differ from search engine strategy. Along the way, Ashley interviews subject matter experts and offers easy-to-follow advice on how to harness the power of prompt engineering with thoughtful search strategies that help account for the nuances of language, tone, qualifiers, and more.”