AI-Powered Document Generator
AI-based solution development that automated document creation for an IT service provider
Leobit helped our customer simplify and automate the creation of critical business documents such as Statements of Work (SOW). What started as a focused automation initiative quickly evolved into a broader AI-driven document generation platform capable of producing SOWs, NDAs, MSAs, and annex agreements.
Our goal wasn’t just to automate document creation, but to make it smarter and more reliable. By combining AI with a structured workflow inside Microsoft Teams, we helped the client turn a time-consuming manual process into something fast, consistent, and easy to scale.
Customer
The client is an established IT service provider with over 40 years of experience. They specialize in supporting small and medium-sized businesses with round-the-clock service and have a strong Microsoft-focused engineering team.
Business Challenge
The company relied on a fully manual process to create SOW documents. This involved significant time spent on editing, formatting, and verifying content. As a result, the process was not only slow but also prone to human error. They needed a way to speed up document creation, ensure consistency, and reduce the risk of mistakes. The goal was to move from manual effort to a streamlined, automated workflow without sacrificing quality or control.
Why Leobit
Leobit was selected due to its strong expertise in AI development and prior experience delivering similar solutions. During initial discussions, the team quickly aligned on the product vision and proposed a practical implementation approach. Previous experience developing similar proof-of-concept solutions as part of R&D initiatives also helped accelerate decision-making and reduce uncertainty.
Project
in detail
The project began with analyzing the client’s existing document templates. This allowed the team to clearly distinguish between static sections and dynamic inputs. Based on this structure, Leobit designed an adaptive and user-friendly input flow. Instead of using standard tools like Microsoft Forms or Google Forms, the team chose to build a Microsoft Teams bot for a more integrated and seamless user experience.
The solution was built as a Microsoft Teams bot that interacts with users through adaptive cards. These cards guide users step by step through the process of entering project information. Each message sent in Teams is processed by a back-end Azure application, which handles logic, validation, and AI interactions before returning responses to the user in real time.
Every piece of user input is validated using AI. The system checks whether the provided information aligns with a professional project context. For example, if irrelevant or incorrect data is entered in a company field, the bot flags it and prompts the user to correct it. This validation is implemented through carefully designed prompts that enforce structured and standardized outputs. It also helps mitigate risks such as prompt injection.Before generating the final document, the system presents a review step where users can adjust or refine the information.
Generated documents are automatically stored and managed within the client’s SharePoint environment. We used Microsoft Graph and REST APIs to securely transfer and organize files.
The client gained a scalable and flexible document generation platform that continues to evolve with their needs. What was once a time-consuming manual process is now a fast, reliable, and intelligent workflow. The solution not only improved operational efficiency but also provided a foundation for further AI-driven automation across the organization.
Use of .NET Bot Framework
The core of the solution is built on the .NET Bot Framework, which enabled the team to create a scalable and responsive conversational interface within Microsoft Teams. Instead of relying on traditional forms, the bot provides a guided, interactive experience that feels natural for users already working in the Microsoft ecosystem.
Each user interaction in Teams is sent to a back-end application hosted in Azure, where it is processed and enriched with AI capabilities. The bot manages conversation state, handles validation flows, and dynamically updates adaptive cards based on user input. This approach allows the system to remain flexible while maintaining a structured data collection process.
Using .NET also ensured seamless integration with other Microsoft services such as SharePoint, Microsoft Graph, and Azure infrastructure. It gave the team full control over performance, security, and extensibility, making it easier to evolve the product beyond its initial scope.
Document generation and expansion
Although the initial focus was on SOW documents, the platform was later expanded to support additional document types, including NDAs, MSAs, and amendments. Document generation relies on multiple specialized AI prompts, each responsible for a specific section. This modular approach improves accuracy and ensures better control over the final output. In addition, AI agents can calculate pricing based on the provided inputs, automatically estimating service costs within the document.
Security and access control
Given the sensitive nature of the data, the solution includes strict role-based access control. Only authorized users or departments, such as sales teams, can access the bot. User permissions are verified against a whitelist. If a user is not authorized, they are prompted to contact administrators.
The bot is deployed within the client’s Microsoft tenant and is only accessible to internal users via Microsoft Entra ID.
Secrets, configurations, prompts, and access lists are securely managed through Azure Key Vault. This setup allows administrators to update prompts or configurations without redeploying the application.
Technology Solutions
- Used Microsoft Bot Framework to create a conversational interface in Microsoft Teams and manage structured user interactions and workflows.
- Employed Adaptive Cards (Microsoft Teams) to collect user input in a guided, interactive format, replacing traditional static forms.
- Applied Azure Application Insights to monitor system performance, track user interactions, and quickly detect and resolve issues.
- Used SharePoint API and Microsoft Graph to automatically upload, store, and manage generated documents within the client’s SharePoint environment.
- Used Open XML to programmatically generate and format documents in line with predefined templates and standards.
Value Delivered
- The first working version of the solution was delivered in just two weeks.
- A fully functional production-ready system was completed within six weeks.
- The solution significantly reduced the time required to create documents while improving their overall quality and consistency.
- The AI-assisted validation ensured that all generated documents met professional standards.