Training table:

CREATE TABLE SupportTicketTrainingData
(
Id INT PRIMARY KEY,
TicketText NVARCHAR(2000) NOT NULL,
CorrectCategory NVARCHAR(50) NOT NULL
);

Records:

INSERT INTO SupportTicketTrainingData
(Id, TicketText, CorrectCategory)
VALUES
(1, 'My card was charged twice', 'Billing'),
(2, 'There is a duplicate debit', 'Billing'),
(3, 'Password reset link expired', 'Technical'),
(4, 'Close my account immediately', 'Retention');

The mapping becomes:

AI term Ticket example
Training example One SQL row
Feature TicketText
Label CorrectCategory
Model Learned text-to-category pattern
Inference input A new ticket
Prediction Billing
Confidence For example, 0.87

The future ML.NET application would roughly do this:

var prediction = predictionEngine.Predict(
new TicketInput { TicketText = newTicket });

Console.WriteLine(prediction.PredictedCategory);

But before reaching that line, we must learn:

  • How text becomes numeric features
  • Training and test datasets
  • Algorithms
  • Metrics
  • Overfitting
  • Model evaluation

We will cover those progressively. Today, do not install ML.NET yet.

When should you choose each approach?

Situation Better starting approach
GST rate calculation C# business rule
User permissions Role/policy rules
Unknown fraudulent behavior ML/anomaly detection
Predict customer churn ML classification
Generate an email draft Generative AI
Answer from company documents RAG plus LLM
Exact database total SQL, not an LLM
Decide whether a legal deadline passed Verified data plus deterministic logic
Read invoice fields from scans Document AI/computer vision

A mature system often combines all three:

Deterministic code + Predictive ML + Generative AI