AI Authoring Assistant for VS Code
Fine-Tuned GPT-2 for Technical Writing and Code
My Role
- Train on translation-memory technical English (~11.5M lines)
- In-house fine-tuned GPT-2, no external LLM API
- Optional custom-rules mode for style and terminology
Approach at a Glance
Details- 1Training Data from Translation Memories
- 2Fine-Tuned GPT-2
- 3Custom-Rules Mode
- 4Code and Documentation Generation
- 5VS Code Extension and Backend
- 6From Extension to Authoring Assistant
Executive Summary
A Visual Studio Code extension that helps technical writers and developers write faster. As the user types, it continues their text in the style of technical documentation, generates code, and drafts docstrings and README sections. It can generate freely or follow custom rules, such as a style guide or required terminology.
It ran on our own GPT-2 model, fine-tuned in-house on about 11.5 million lines of real technical-documentation text: software help, UI strings and product documentation. This was late 2021, a year before ChatGPT, when a model that wrote like a technical author had to be trained rather than prompted.
The extension made writing technical texts, documentation and code 20% faster. It started as a tool for internal technical writers and was piloted with customers. The project later grew into a standalone Authoring Assistant, a technical-documents helper for teams across the company, built on the same fine-tuned model.
I built it end to end, from model training to backend, extension and deployment on Azure. I was an NLP engineer in the R&D department of a global language-services company, working through an outstaff model.
Client Profile
The company produces and localizes technical content at large scale: software documentation, help pages and UI text, written in English and then translated into many languages. Its R&D department built AI tools for its own linguists and writers and for its customers. The team had ML and software engineers, linguists, QA, a product manager and a VP of Innovation. Each engineer usually owned a project on their own.
Technical writing is repetitive but strict:
- Same patterns, written again and again: procedures like "Press F5, or select the Preview button" follow the same structures across thousands of pages.
- Style and terminology rules: wording must follow style guides and approved terms. That matters even more because every sentence will be translated, so inconsistent source text multiplies the cost downstream.
- No ready-made tool in 2021: general text generators didn't write like a technical author or respect a company's rules, and they weren't available inside the editor writers and developers already used.
Technical Approach
-
Training Data from Translation Memories – The company's translation memories hold millions of real sentences from software documentation and UI. We used about 11.5 million lines of this technical English as the training corpus. It taught the model exactly the register, structures and vocabulary of the content its users write.
-
Fine-Tuned GPT-2 – We fine-tuned a GPT-2 decoder model with Hugging Face Transformers. Given the text the user has already written, the model generates a continuation that reads like the rest of the document. Keeping the model in-house meant no customer content was sent to an external API.
-
Custom-Rules Mode – Generation can run freely or with custom rules, such as a style guide or required terminology, so suggestions follow the conventions a document has to meet.
-
Code and Documentation Generation – Besides prose, the extension generates code and drafts docstrings and README sections, covering both technical writers and developers.
-
VS Code Extension and Backend – The extension sends the current context to a Flask API that serves the model, with a React interface. The service is containerized with Docker and deployed on Kubernetes with Azure ML. Linguists on the team tested the output quality.
-
From Extension to Authoring Assistant – The fine-tuned model was then reused in a standalone Authoring Assistant, a technical-documents helper for the internal sandbox and teams across the company.
Business Outcome
Technical writers and developers got an assistant inside their editor that writes like a technical author and follows the house rules. Writing technical texts, documentation and code became 20% faster. The tool was used internally and piloted with customers, and its model became the basis of the company-wide Authoring Assistant.
For me, the project was the start of a longer path in the same R&D team, where I later became technical lead.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks