A C# / .NET companion project to Ed Donner's LLM Engineering course (originally taught in Python).
The goal of this repo is to re-implement each exercise from the course in C#, comparing multiple LLM providers side by side — starting with OpenAI and Anthropic (Claude) — while practicing clean, extensible design patterns along the way.
The original course is built around Python and the OpenAI API. This repo exists to:
- Practice applying the same LLM engineering concepts in C# / .NET
- Compare OpenAI and Anthropic (and potentially other providers) using a consistent, swappable interface
- Reinforce good software design (e.g. the Strategy pattern) while working with real LLM APIs
- .NET 8+
OpenAI— official OpenAI .NET SDKAnthropic— official Anthropic .NET SDK (currently in beta)- Ollama — runs local open-weight models (e.g.
llama3.2) behind Ollama's OpenAI-compatible endpoint, reusing theOpenAISDK with alocalhostbase URL - Environment variables (
OPENAI_API_KEY,ANTHROPIC_API_KEY) for API key management; Ollama needs no real key since it runs locally
- Visual Studio 2022 (or any .NET 8+ compatible IDE)
- An OpenAI API key (platform.openai.com)
- An Anthropic API key (console.anthropic.com)
- Ollama installed locally with a model pulled, e.g.:
ollama pull llama3.2
-
Clone the repo:
git clone https://github.com/RizwanRumi/llm_engineering_with_c_sharp.git
-
Set your API keys as environment variables (PowerShell):
setx OPENAI_API_KEY "your_openai_key_here" setx ANTHROPIC_API_KEY "your_anthropic_key_here"
Restart Visual Studio after running
setx— environment variables set this way only apply to new processes.Ollama doesn't check the API key, so no
ANTHROPIC/OPENAI-style setup is needed for it — just haveollama serverunning with a model pulled. -
Open the solution in Visual Studio 2022 and restore NuGet packages.
-
Run the console app (
Ctrl+F5).
| Week | Exercise | Description | Status |
|---|---|---|---|
| Week 1, Day 1 | Meeting Notes Summarizer | Turns raw, informal meeting notes into a structured markdown summary (Key Decisions / Action Items / Open Questions). Implemented for OpenAI and Claude using the Strategy pattern, letting the user pick a provider at runtime. | ✅ |
| Week 1, Day 2 | Meeting Notes Summarizer + Ollama provider | Same summarizer as Day 1, with Ollama added as a third interchangeable provider alongside OpenAI and Claude. | ✅ |
- Python version of the course exercises: week1/community-contributions/rizwan_rumi (PR-based contributions to the original course repo, organized per week)
- Original course repo: ed-donner/llm_engineering
For personal learning purposes.