Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 7 Β· Quiz
Calling LLMs from .NET
1. What should be done to ensure that the API key used to call an LLM remains secure?
Store the API key in the database
Send the API key with every request from the client
Keep the API key in server-side configuration using IConfiguration
Embed the API key in the JavaScript code
2. What is the recommended way to handle timeouts and retries when calling an LLM?
Set no timeout, let the call run indefinitely
Implement retries with no backoff mechanism
Set explicit timeouts and add retries with backoff for 429/5xx errors
Only retry calls that fail completely
3. What type of output format should be requested from an LLM to ensure structured data?
Plain text
XML
JSON constrained by a JSON schema
Free-text response
4. How should LLM integration tests be structured according to the lesson content?
By calling the real LLM in every test case
By mocking the typed client interface for unit tests and using an evaluation set for model quality
Through manual testing of the API
By only testing successful cases
Submit answers
Continue: RAG vs Fine-Tuning — The Interview Answer β
Review this lesson
Retake quiz