Simulating GPT Prompts in C# — A Console App with Real-World Intent
Simulating GPT Prompts
Every cloud-native solution starts with a foundation. In this case, it’s a C# console application — intentionally simple, but architecturally aligned with the broader goal: building a full-stack, AI-enabled assistant powered by Azure OpenAI and deployed to Azure Kubernetes Service (AKS).
This console app simulates GPT-style prompts and responses. But more importantly, it sets the tone for the rest of the system — clean architecture, async-first design, and modular components that scale from local dev to production-grade cloud.
Why Start with a Console App?
Before deploying to AKS or wiring up Azure OpenAI, I wanted to isolate the core logic: prompt handling, response simulation, and structured logging. This CLI tool provides a focused environment to build and test that logic — without distractions.
It’s not a prototype. It’s a foundational component.
What It Does
The copilot-console-simulator
:
- Accepts user input from the terminal
- Simulates a GPT-4 Turbo-style response
- Logs prompt/response pairs to an in-memory list or JSON file
- Uses interfaces and dependency injection for clean separation of concerns
- Is structured to plug directly into the backend API layer
Built with the Right Tools
This project was developed entirely in Visual Studio Code, using:
.NET 9
ILogger<T>
for structured loggingasync/await
for non-blocking I/O- Clean architecture patterns (interfaces, DI, separation of concerns)
To accelerate development and stay in flow, I used GitHub Copilot Chat and Agent Mode. This combination allowed me to:
- Scaffold services and interfaces quickly
- Ask contextual questions directly in the IDE
- Stay focused on architecture and flow, not boilerplate
Strategic Fit
This app is the first of several purpose-built repositories that make up the full solution:
gpt-api-backend
: ASP.NET Core Web API that connects to Azure OpenAI and SQL Servergpt-web-client
: Razor/Blazor frontend for chat interactiongpt-db-schema
: SQL schema + EF Core scaffoldingiac-terraform
andiac-bicep
: Infrastructure-as-code for AKS, ACR, Key Vault, and more
Each repo is modular, version-controlled, and aligned with cloud-native best practices.
Example Interaction
Welcome to the Copilot Console Simulator!
Session ID: abc123de
Type your questions or commands. Type 'exit' to quit.
Special commands: 'history' to view conversation history, 'clear' to clear history
----------------------------------------------------------------------
You: Hello, how are you?
Copilot: Great question! I think the key thing to consider is: When it comes to coding, I always recommend following best practices and writing clean, maintainable code.
You: Can you help me with a programming problem?
Copilot: I'm here to help! That's an interesting question! Let me think about that for a moment. Feel free to ask me anything you'd like assistance with.
You: history
--- Conversation History (Session: abc123de) ---
[14:30:15] You: Hello, how are you?
[14:30:16] Copilot: Great question! I think the key thing to consider is: When it comes to coding, I always recommend following best practices and writing clean, maintainable code.
[14:30:45] You: Can you help me with a programming problem?
[14:30:46] Copilot: I'm here to help! That's an interesting question! Let me think about that for a moment. Feel free to ask me anything you'd like assistance with.
--- End of History ---
You: exit
Thank you for using the Copilot Console Simulator!
What’s Next
With the simulator complete, the next step is designing the database schema and scaffolding EF Core models. From there, I’ll move into the API layer, frontend, containerization, and infrastructure deployment.
This is a journey — and this console app is the first real checkpoint.
TL;DR
📁 Repo: copilot-console-simulator
🧠 Built with: GitHub Copilot Chat + Agent Mode
🛠️ Editor: Visual Studio Code
🧱 Runtime: .NET 9
Let’s keep building.