LLM
7 articles on LLM, each a problem from production engineering work and how it was solved.
-
Warming a Langfuse prompt cache at .NET startup for cold starts
A last-known-good prompt cache only covers outages that start after a pod is warm. Resolve every prompt in a hosted service at startup and log a census.
-
LiteLLM model aliases per use case to survive OpenAI model retirements
Call a LiteLLM alias named after the use case, not a raw model id, so a retired OpenAI model is swapped on the proxy without a deploy.
-
Task.WhenAll with Result types: catch one failed LLM call of two
Derive the run status from every call's outcome, not from whether output was written, or one failed call of two reports Success.
-
OpenAI strict structured outputs can't decline: check input in code
A strict JSON schema leaves the model no way to return "not enough data", so enforce the evidence minimum before the call, not in the prompt.
-
OpenAI JSON mode needs the word json: guard prompts from Langfuse
Check a Langfuse prompt mentions JSON before sending it in json_object mode, in one shared helper, so an edit fails clearly instead of at the API.
-
Moving a .NET OpenAI SDK call to a LiteLLM proxy: three silent changes
Swapping the OpenAI ChatClient for a LiteLLM proxy client can change your timeout, reasoning effort and model access. Set all three explicitly.
-
Loading Langfuse prompts in .NET with labels and version pins
Fetch Langfuse prompts through one loader that applies a label or a pinned version and validates the prompt's shape before any model call.