Adding heading rules cut the long public documents with no extractable conclusion by 822

日本語

Contents of this article

Summary

A service I develop at my own company has a rule-based program that splits long public documents into sections at heading lines and assigns a type to each section. The type given to the part where the issuing institution itself wrote its conclusion is called the conclusion section. There were 1,172 documents that received no conclusion section at all, and the AI agent first read 60 documents drawn from them by stratified sampling, then wrote rules for each type of heading style.

The rules were chosen on the condition that they not change the output for documents whose conclusion section was already extracted, and they were added in two rounds. After the first round of rules was added, a conclusion section was extracted for 822 of the 1,172 documents. In a control group of 2,992 documents drawn at random from those that already had a conclusion section, 0 documents lost their conclusion section.

Even in the control group, the length of the conclusion section changed by 20% or more for some documents, and the second round of rules caused a regression in which the rules broke each other’s conditions and body text was left out of the conclusion. Most of the documents that still had no conclusion were documents with short body text.

What you can take away

This article is for developers who add rules to rule-based document processing, and for developers who hand that work to an AI agent.

This article is a development note about the program that splits documents at headings in a service I develop at my own company. It rests on commit messages, a plan document that recorded the work plan and the measurement results, and the program’s code.