Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

section_present rejects numbered or annotated headings, and the optimizer 'fixes' it by forbidding the skill's own heading format

Đang mở
#175 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu tại judges._section_present và tái hiện sự không khớp qua score_rule_judge với hai tiêu đề được hiển thị trong issue. Xem lại các Judge-Test và Task-Set hiện có để xác định ngữ nghĩa tiêu đề dự kiến và khả năng tương thích của scoring; công việc được xem là hoàn tất khi hành vi được chọn được bao phủ bằng các kiểm thử hồi quy mà không làm hỏng các kiểm tra Strict-Form hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

judges._section_present anchors \s*$ immediately after the section name:

pat = re.compile(r"(?im)^\s{0,3}(#{1,6}\s*.*%s|\*\*.*%s.*\*\*\s*:?)\s*$" % (name, name))

So a heading passes only when the name is the last thing on the line:

1  ## Key Risks
1  **Key Risks:**
0  ### 1. Key Risks (Риски) — обзор     ← numbered + translated + subtitle
0  ### Key Risks (Risks)

Numbered headings, bilingual headings, and Heading — subtitle are all common in real skill documents, and none of them survive.

Why this is more than cosmetic

My skill's own body demonstrates headings in exactly the rejected style, in its "structure" section:

### 1. Пратигья (Pratijñā) — Тезис
### 2. Хету (Hetu) — Причина

The model faithfully reproduced that format, so all five section_present checks failed on an otherwise correct answer (soft 0.55 with every content check passing). The optimizer then read those failures and proposed:

OVERRIDE: You MUST use EXACTLY these section titles […]. Do NOT append numbers, Latin transliterations, or descriptive text to the headings (e.g. output ### Пратигья, NOT ### 1. Пратигья (Pratijñā) — Тезис).

The gate accepted it: 0.682 → 0.852. So a judge artifact produced a rule that forbids the format the skill itself teaches, and it would have been written into the skill permanently had I not read the per-task diff. As a side effect the same rule made the model drop a required citation from another task, which the mean hid (filed separately as the no-regression issue).

This is a concrete instance of the Goodhart pattern discussed in #154, arising purely from a strictness mismatch in one operator.

Possible directions

I did not send a patch because any change here alters scoring for existing task sets, so it seems like a maintainer call:

  1. Relax the anchor — allow trailing text after the name (^#{1,6}[^\n]*<name>). Most faithful to what "section present" means, but existing sets that relied on the strict form would start passing more.
  2. Add a section_contains op and leave section_present untouched. No behaviour change; authors opt in.
  3. Document the strictness in the operator list, so authors know a numbered heading will not match.

My own workaround was replacing every section_present with (?im)^\s{0,3}(?:#{1,6}|\*\*)[^\n]*<name>, which behaves as I expected the built-in to.

Repro

from skillopt_sleep.judges import score_rule_judge
j = {"kind": "rule", "checks": [{"op": "section_present", "arg": "Key Risks"}]}
score_rule_judge(j, "## Key Risks")[0]                     # 1.0
score_rule_judge(j, "### 1. Key Risks (Риски) — обзор")[0]  # 0.0

main @ fdeebaf, Python 3.11.

Ngôn ngữ chính
Python
Star
17.3k
Fork
1.6k
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/SkillOpt

Tất cả issue của microsoft/SkillOpt

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.