Enterprise Software Engineering with C# and .NET: Architecture, Design Patterns, and AI-Enabled Systems · HIT

Week 12   Part V · Integration and AI-Enabled Systems

AI API Integration and Enterprise Best Practices

Instructor lesson plan: lecture (2 h) and practice (2 h).

Learning objectives

Tools this week

Microsoft.Extensions.AISemantic KernelOpenAI .NET SDKAzure.AI.OpenAI

🎓Lecture · 2 hours

0:00-0:2020 minAI as an enterprise subsystemUse cases where AI supports workflow without replacing architecture.
0:20-0:4525 min.NET AI library landscapeMicrosoft.Extensions.AI, Semantic Kernel, provider SDKs, and Azure integration.
0:45-1:1025 minBoundaries and adaptersTyped clients, prompt ownership, retries, rate limits, logging, and secrets.
1:10-1:2010 minBreak
1:20-1:4525 minEmbeddings and tool callingSemantic search, structured outputs, function calls, and safety constraints.
1:45-2:0015 minEvaluationTest sets, review samples, regression checks, and documentation of AI behavior.
Common misconception to confront.

Students often think: an AI call can sit directly in a controller.
Set it straight: AI calls need boundaries for retry, policy, logging, prompt versioning, and replacement.

Check for understanding
Why wrap an AI provider SDK?
To keep provider details, retries, policy checks, and prompt construction outside business workflows and controllers.
What should an AI evaluation include?
Representative inputs, expected properties, failure cases, and a repeatable way to compare behavior after changes.
Key takeaways.

📚Reading & resources

💻Practice · 2 hours

0:00-0:2525 minAI use-case selectionChoose one optional feature or document why AI is not appropriate for the project.
0:25-0:5530 minClient boundaryDefine an interface and adapter for an AI operation.
0:55-1:1015 minPrompt and response modelMake inputs, outputs, and failure cases explicit.
1:10-1:2010 minBreak
1:20-1:5030 minEvaluation sketchCreate a small evaluation set and decide what counts as acceptable behavior.
1:50-2:0010 minProject-integration briefSubmit AI implementation or integration design.

Project integration (this week)

PreviousWeek 11: Enterprise IntegrationNextWeek 13: Final Presentations