Abstract:
One of the key automation challenges for government agencies is the preparation of official response letters. This article presents an empirical comparison of two approaches to the automatic generation of official response letters: one based on templates defining the letter structure and one based on relevant letter examples selected using RAG. The original GovLetter dataset, which includes real-life business correspondence from government agencies in the Khanty-Mansi Autonomous Okrug – Yugra, was used as a basis. Generation was performed using a locally deployed open-source language model. The quality of the results was assessed according to 12 criteria using the Schema-Guided Reasoning (SGR) framework and the LLM-as-a-Judge methodology. The experimental results demonstrate that the example-based approach outperforms the template-based approach in most metrics, particularly in the accuracy of arguments, formal tone, and correct formatting. The obtained results confirm the potential of solutions based on document history for the effective automation of official response letter preparation.