Files
ModelHub XC c1ce9811bb 初始化项目,由ModelHub XC社区提供模型
Model: Xirui1208/selective-readtwice-7b-early-evaluated-20260928
Source: Original Platform
2026-11-17 05:18:17 +08:00

40 lines
1.6 KiB
Python

"""One-shot counted-mask gate for the v26 selective-read protocol.
Skim, selected memory updates, and final-answer prompts remain byte-identical
to v7/v22. Only the gate action changes from T independent READ/SKIP turns to
one strict ``MASK[T]`` turn over the complete outline.
"""
try:
from .protocol_v5 import TEMPLATE_FINAL, TEMPLATE_SKIM, TEMPLATE_UPDATE_READALL
except ImportError: # Script execution with selective/ on PYTHONPATH.
from protocol_v5 import TEMPLATE_FINAL, TEMPLATE_SKIM, TEMPLATE_UPDATE_READALL
TEMPLATE_UTILITY_COUNTED_MASK_POST_OUTLINE = """Below is a global outline of a long document, one gist per section:
<section_count>
{total_sections}
</section_count>
<outline>
{outline}
</outline>
A user will ask the following question about the document:
<question>
{prompt}
</question>
Decide independently for every section whether it should be read in full
during the second pass. Mark 1 when the section contains, or is likely to
contain, factual evidence useful for answering the question, including direct
answer evidence, entity identity, aliases, attributes, and multi-step bridge
facts. Mark 0 when the section is unrelated or would not add useful evidence.
Use the whole outline to interpret every section. Do not enforce a fixed number
or fraction of 1 values; classify each section independently.
Output exactly {total_sections} binary values, one per section in outline order.
The number in MASK brackets and the number of values must both match
<section_count>. Output one line only, in this exact form:
MASK[{total_sections}]: 0, 1, 0, 1
"""