Designing an AI Service Layer
How to place model access, prompts, retrieval, tools, and application policy behind a maintainable use-case boundary in a .NET application.
How to place model access, prompts, retrieval, tools, and application policy behind a maintainable use-case boundary in a .NET application.
How to keep model proposals separate from trusted application behavior with authorization, approval policy, current-state checks, and least privilege.
Why application knowledge does not belong in model weights, what retrieval contributes, and when a prompt, database query, or deterministic tool is simpler.
How to map the execution, prerequisite, and operational dependencies around an AI feature and give each interaction a usable failure contract.
How Microsoft.Extensions.AI keeps provider SDKs at the edge of .NET applications through shared abstractions, dependency injection, and middleware.
Why a successful model call says little about whether an AI feature is reliable, secure, observable, affordable, and ready to operate in production.
How to host a Microsoft Agent Framework agent in Foundry while keeping authorization, conversation ownership, identity, and governance boundaries explicit.
How to decide when a .NET AI request should stay synchronous, stream its response, or move to a durable background job with HTTP 202 and a status resource.
How to test Microsoft Agent Framework applications with fake model clients, tool contract tests, structured output tests, routing tests, workflow tests, and eval-style regression checks.
How to use the Bogus library to generate realistic, repeatable, and domain-shaped test data in .NET, including faker rules, related objects, seeds, and practical boundaries.