---
title: "Building Technical Customer support model using .net"  
description: "This blog gives the practical knowledge that how can you create your own customized CLI based AI customer support model using .NET programming."  
author: "Yash Srivastava"  
published: 2026-06-10  
updated: 2026-06-10  
canonical: https://answers.mindstick.com/blog/385/building-technical-customer-support-model-using-dot-net  
category: "technology"  
tags: ["ollama", ".net programming", "llm"]  
reading_time: 4 minutes  

---

# Building Technical Customer support model using .net

## Introduction

This blog is to provide the [practical](https://answers.mindstick.com/blog/54/minimal-apis-in-dot-net-a-practical-guide) [knowledge](https://www.mindstick.com/forum/156160/what-is-google-knowledge-graph) about how you can create your own customized CLI based AI customer support model according to your [requirement](https://yourviews.mindstick.com/view/85169/becoming-an-influencer-requirement-of-skills-and-knowledge) using .NET [programming](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) language. Basically there are few easy steps by using these steps you will be able to create your own Customized [AI model](https://www.mindstick.com/news/4386/tencent-unveils-new-ai-model-claims-it-responds-faster-than-deepseek-r1).

### STEP 1: Download the AI Model

Pull the AI model which you want to use for customization and model creation. here we will use “[*Mistral*](https://answers.mindstick.com/blog/344/understanding-ollama-models)”. Run this command in your terminal:

```plaintext
ollama run mistral
```

this command will find is this already present in your system or not, if it is not found then it will download the model and then execute.

### STEP 2: Create a .NET console application

Open the terminal on desktop or any folder suppose we are creating the folder of desktop use the command:

```plaintext
cd ..
cd desktop\Project
```

Now use the command to create the templet of console app, use comand:

```plaintext
dotnet new console -n CliBot
```

As output in the project folder on desktop Clibot named file will be created:

```plaintext
CliBot
│
├── Program.cs
├── CliBot.csproj
```

### STEP 3:

Now enter in the project folder using command:

```plaintext
cd CliBot
```

And open [VS code](https://www.mindstick.com/articles/327191/visual-studio-code-live-sharing-debug-or-edit-code-with-your-colleagues-via-vs-code-live-sharing) to edit the [program.cs](https://www.mindstick.com/forum/160454/how-to-run-migration-automatically-in-program-cs-in-dot-net-core-6) file and replace the code of Program.cs files:

```cs
using System.Text;
using System.Text.Json;
var httpClient = new HttpClient();
string ollamaUrl = "http://localhost:11434/api/chat";
string systemPrompt = """
You are a professional customer support assistant for a tech company.
Rules:
- Be polite and helpful
- Give short and clear answers
- Help users solve technical issues
""";
var messages = new List<object>
{
   new
   {
       role = "system",
       content = systemPrompt
   }
};
Console.WriteLine("Bot Started (type 'exit' to stop)\n");
while (true)
{
   Console.Write("You: ");
   string? userInput = Console.ReadLine();
   if (string.IsNullOrWhiteSpace(userInput))
       continue;
   if (userInput.ToLower() == "exit")
   {
       Console.WriteLine("Bot: Goodbye!");
       break;
   }
   messages.Add(new
   {
       role = "user",
       content = userInput
   });
   var requestBody = new
   {
       model = "mistral",
       messages = messages,
       stream = false
   };
   string jsonData = JsonSerializer.Serialize(requestBody);
   var response = await httpClient.PostAsync(
       ollamaUrl,
       new StringContent(jsonData, Encoding.UTF8, "application/json")
   );
   if (!response.IsSuccessStatusCode)
   {
       Console.WriteLine("Bot: Unable to connect to Ollama.");
       continue;
   }
   string responseJson = await response.Content.ReadAsStringAsync();
   using JsonDocument doc = JsonDocument.Parse(responseJson);
   string reply =
       doc.RootElement
          .GetProperty("message")
          .GetProperty("content")
          .GetString() ?? "";
   Console.WriteLine($"\nBot: {reply}\n");
   messages.Add(new
   {
       role = "assistant",
       content = reply
   });
}
```

### STEP 4:

Now again open the terminal and use the command to run the model in terminal:

```plaintext
cd ..
```

```plaintext
cd desktop\project\Clibot
```

```plaintext
dotnet run
```

### Test the model:

```plaintext
You: hey, Do you know my internet is important to access browser

Bot:  Hello! Yes, I understand that your internet connection is essential to browse the web. If you're experiencing issues with your internet, here are a few steps you can take to troubleshoot:
1. Check your router and modem: Ensure both devices are powered on and connected properly. If possible, try restarting them by unplugging the power cord, waiting for about 30 seconds, then plugging it back in.
2. Verify your internet connection: Check if other devices on your network can connect to the internet. If not, there might be an issue with your internet service provider (ISP).
3. Test your speed: Use a speed test tool like fast.com or speedtest.net to measure your internet speed and see if it's within the range you should be getting according to your subscription plan.
4. Check your browser: Try using a different browser to see if the issue persists. If it does, the problem might be related to your network rather than your browser.
5. Antivirus software or firewall: Ensure that your antivirus software is not blocking your internet access and check if any firewall settings are interfering with your connection.
If none of these steps help resolve your issue, I recommend reaching out to your ISP for further assistance as they can provide more targeted solutions based on your specific service plan and location.
```

*note:-the response of this model is according to the prompt I used in my system.*

read more about ollama:

previous topic: [Building Technical Customer support model using ollama](https://answers.mindstick.com/blog/377/building-technical-customer-support-model-using-ollama)\
next topic: [Understanding Embeddings in Ollama](https://answers.mindstick.com/blog/386/understanding-embeddings-in-ollama)

---

Original Source: https://answers.mindstick.com/blog/385/building-technical-customer-support-model-using-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
