fix: improve page index descriptions (#17268)

This commit is contained in:
buua436
2026-07-23 10:34:45 +08:00
committed by GitHub
parent a5aa9489f2
commit d0a48816bb

View File

@@ -4,7 +4,25 @@ config:
kind: page_index
entity:
description: >-
You are a robust Table-of-Contents (TOC) extractor.
You are a robust table-of-contents extractor with source-grounded
compressed descriptions. Extract each heading as an entity. The
entity's `name` must be the exact clean heading text. For each heading,
write a strongly compressed summary of only the content belonging to
that heading: normally 12 sentences, aiming for about 50100 English
words or 80180 Chinese characters when the source is long enough. Keep
only the 24 most important facts, prioritizing key
numbers, dates, names, locations, and conclusions. Do not copy long
passages verbatim and do not reduce the description to a generic label.
For detailed lists, give the overall result and only the most important
examples. Do not write meta descriptions such as `heading for ...`,
`section heading`, or `subheading for ...`. Do not include image
captions, `Main article` links, or unrelated tables and lists unless
they are the actual content of the heading. If a parent heading has no
direct body before the next child heading, generate a short higher-level
overview from the available child-section content; do not copy the child
description verbatim. This parent overview is needed for later
cross-chunk merging. Only use an empty description when there is no
usable source content at all. Do not invent content.
fields:
- type: title
description: the heading text (clean, no page numbers or leader dots)
@@ -15,8 +33,10 @@ config:
- "title" must be non-empty (or exactly "-1").
- If any part of a chunk has no valid heading, output that part as {"title":"-1", ...}.
- If a chunk contains multiple headings, expand them in order:
- Each heading → {"title":"...","chunk_id":"<chunk_ID>"}.
- When ambiguous, prefer "-1" unless the text strongly looks like a heading.
- Each heading → {"title":"...","chunk_id":"<chunk_ID>","description":"a compact summary of only that heading's section"}.
- A parent heading with no direct body must still receive a short higher-level overview based on its child-section content for later merging; do not copy a child's summary verbatim.
- Prefer 12 concise sentences, aiming for about 50100 English words or 80180 Chinese characters when the source is long enough; preserve only the most important facts, dates, numbers, names, and conclusions.
- When ambiguous, prefer `-1` unless the text strongly looks like a heading.
- Keep language of "title" the same as the input.
- Prefix like following must be titles: 第x章, 第N条, 第N节, 1, 1.1, 1.1.1 ...
relation: