Model: Xirui1208/selective-readtwice-7b-early-evaluated-20260928 Source: Original Platform
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
"""Gate-only additions for the v22 selective-read protocol.
|
|
|
|
Skim, memory update, and final-answer behavior remain the v7 read-all
|
|
protocol. The only new learned action is a focused READ/SKIP decision.
|
|
"""
|
|
|
|
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_FOCUSED_BINARY_READ_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 whether the focused section should be read in full during the second
|
|
pass. Output READ 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. Output SKIP
|
|
when the section is unrelated or would not add useful evidence. Use the whole
|
|
outline to interpret the focused entry. Do not enforce a fixed number or
|
|
fraction of READ decisions; classify this section independently.
|
|
|
|
Classify this section:
|
|
<focus_section>
|
|
{focus_section}
|
|
</focus_section>
|
|
<focused_outline_entry>
|
|
{focused_entry}
|
|
</focused_outline_entry>
|
|
|
|
Output exactly READ or SKIP and nothing else.
|
|
"""
|