Case study · HR & Workforce

The AI writes the letter. A C# function does the salary.

MITS was hand-typing several hundred employment contracts a year. We automated the writing, and deliberately kept the language model away from every number that lands on a payslip.

  • Client MITS
  • System HR document generator
  • Delivered 2026, in production
  • Stack .NET 9 · GPT-4o
MITS
The outcome

Forty minutes of typing became five minutes of checking

One uploaded document now produces the whole letter set for either employee group, with the compensation reconciling to the agreed CTC every time.

40 → 5 min

Per full letter set

~80%

Of the manual work, gone

8

Letter types from one file

2

Employee groups, one engine
At a glance

Project snapshot

Client
MITS (Mits Global Consulting Pvt. Ltd.)
Domain
HR & Workforce
Engagement
Custom development
Build
ASP.NET Core 9 MVC
AI
Semantic Kernel over GPT-4o
Employee groups
BNP and MITS2, own template sets
The story

What we built, and the one thing we would not let it do

The interesting decisions on this project were both about drawing a hard line around where the AI was allowed to operate.
Context

A few hundred legal documents a year, all typed by hand

MITS is a staffing firm carrying 600 to 700 people on payroll, with 300 to 350 of those changing in any given year. Every one of those changes generates a set of employment documents: an offer letter or a contract, and depending on the terms, a joining bonus letter, relocation or conveyance reimbursement letters, and a security document.

The documents were produced by hand. A recruiter’s offer details went to a member of the HR team, who read them, calculated the compensation breakdown, opened the right template, and typed the values in. Several hundred times a year, across two employee groups, BNP and MITS2, each with its own legally reviewed template family.

Constraint

You cannot A/B test a payslip

The letters are legal instruments. Notice period wording, confidentiality terms and contract language had been through legal review and had to appear identically in every letter, permanently. Anything that generated a document from scratch was out, regardless of how good the output looked.

The compensation arithmetic carried a second, sharper constraint. An error in it would not surface during testing or review. It would surface roughly three weeks after somebody started a new job, when their first payslip failed to match the letter they had signed, and the person discovering it would be a brand-new employee with no way to tell which figure was the correct one.

Decision

We gave the model a smaller job on purpose

Two rules shaped the build. First, the compensation engine is deterministic C#, not a model. It derives every component from a banded ladder and statutory rules, then balances one component as the remainder, so the letter reconciles to the agreed total exactly. Second, language generation is template-filling, never document generation. The model reads the recruiter’s document and refines the candidate-specific wording. The Word templates hold everything that is about the company. The model never sees a blank page.

What the client asked for, and why we said noMITS reasonably asked whether the language model already in the pipeline could do the arithmetic too, and save a component. We said no. An error nobody can catch until a payslip is wrong is not an error you accept a probability distribution on.

Build

Six steps, and reading is never the same call as writing

An ASP.NET Core 9 MVC application using Microsoft Semantic Kernel over GPT-4o, with OpenXML and ClosedXML for document generation. The pipeline runs six steps: server-side text extraction from the uploaded document; a structured extraction call returning a typed JSON contract; the deterministic compensation engine; two separate language calls, one refining responsibilities and one compressing them to fit the template’s physical space; template filling across both employee groups’ template families; and packaging into a single ZIP.

Reading and writing are deliberately separate model calls, so a defect in the output can be attributed to one or the other. Every run writes its extraction JSON to disk alongside the letters it produced, so any later question about why a letter says what it says has a mechanical answer rather than a reconstruction. HR can override any extracted value before generation, and the engine still does the maths on whatever it is handed. A person reviews the output before it is sent. That was a design assumption, not a limitation discovered later.

The delivered system

What it looks like in use

Stack

What it is built on

A standard .NET web application. The only unusual choice is how narrowly the AI is scoped inside it.
  • ASP.NET Core 9 MVC
  • C#
  • Microsoft Semantic Kernel
  • OpenAI GPT-4o
  • OpenXML
  • ClosedXML
  • Azure
The result

What changed

A full letter set that took a person around forty minutes now takes about five, most of which is review rather than production.

40 min → 5 min

per letter set, and the compensation reconciles every time rather than usually

The change that matters more to MITS is a category of error that has stopped occurring. Compensation figures are now computed the same way every time, from one place. During the build we found a boundary defect in the engine, fixed it in a single character, and proved the correction across every input the system had ever seen. That is not a property manual entry ever had.

Proof

In the client's words

Aditi IT Solutions understood our requirements and developed the MITS AI Letter Tool, which has significantly streamlined this process. The tool enables us to generate various HR letters with just a few clicks. It also includes a CTC calculator that helps our team work out complete salary structures quickly and accurately during candidate discussions. What we value most about working with Aditi IT Solutions is that they took the time to understand how our business and HR processes actually work before developing the solutions.
Sandeep Dhurka

Founder Director, MITS Global Consulting Pvt. Ltd.

65+ systems delivered since 2011
Named where the client has given written permission, described by sector where they have not.