In the last years' digitalization process, the creation and management of documents in various domains, particularly in Public Administration (PA), have become increasingly complex and diverse. This complexity arises from the need to handle a wide range of document types, often characterized by semi-structured forms. Semi-structured documents present a fixed set of data without a fixed format. As a consequence, a template-based solution cannot be used, as understanding a document requires the extraction of the data structure. The recent introduction of Large Language Models (LLMs) has enabled the creation of customized text output satisfying user requests. In this work, we propose a novel approach that combines the LLMs with prompt engineering and multi-agent systems for generating new documents compliant with a desired structure. The main contribution of this work concerns replacing the commonly used manual prompting with a task description generated by semantic retrieval from an LLM. The potential of this approach is demonstrated through a series of experiments and case studies, showcasing its effectiveness in real-world PA scenarios.
翻译:在近年的数字化进程中,各领域(尤其是公共管理领域)文档的创建与管理日益复杂多样。这种复杂性源于需要处理大量具有半结构化特征的文档类型。半结构化文档虽包含固定数据集,但缺乏固定格式,因此无法直接采用基于模板的解决方案——理解这类文档需要先提取其数据结构。近期大语言模型的出现使得按用户需求生成定制化文本输出成为可能。本研究提出了一种创新方法,将大语言模型与提示工程及多智能体系统相结合,用于生成符合预期结构的新文档。本工作的主要贡献在于:用基于语义检索的大语言模型任务描述替代了常用的手动提示方法。通过系列实验和案例研究,我们展示了该方法在真实公共管理场景中的有效性。