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.
- It shows a procedure for reading a sample of the documents that could not be processed, sorting them into types, and writing rules for each type.
- It shows, with counts from a control group, the result of choosing rules on the condition that they not change existing output.
- It shows a regression in which the process that joins headings erased the opening of a different document, and a regression in which overlapping rule conditions left body text out of the conclusion.
- It estimates, from 16 sections, the quality of the parts newly made into conclusions by rules that decide the conclusion by position, and includes code that recomputes the interval.
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.
The rest of this article is paid
You can read the rest by buying this article on its own, or with a subscription that covers every paid article.
The paid part is about 18,400 characters, roughly a 37-minute read.
Read just this article
From 300 JPY
Buy this article on its own. The exact price is shown at checkout. Purchased articles stay readable whenever you sign in with the email used at purchase.
Read every paid article
Standard is 490 JPY / month
Four new paid articles ship every month. For yearly billing and the full comparison, see the plans.
Add dialogue and columns
Premium is 980 JPY / month
Premium adds the subscriber-only columns and dialogue with matsumotory-kun on top of every paid article. See the plans for details.
Prices include tax. Purchases and subscriptions start after you sign in. Subscribers and readers who already bought this article can sign in and read the full article; for the plans, see the plans page.
Sales are available in supported regions only; the Terms list where we sell. All charges are in Japanese yen.