BUG: within word punctuation insertion can never land at the last two positions of the prompt
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách đọc InsertPunctuationConverter._insert_within_words và docstring của nó, sau đó xem các bài kiểm thử của InsertPunctuationConverter. Tái hiện hành vi được báo cáo với prompt gồm ba ký tự abc và các seed từ 0 đến 299. Hoàn thành khi có thể đạt đến mọi vị trí chèn, bao gồm ngay trước ký tự cuối cùng và sau ký tự cuối cùng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
InsertPunctuationConverter._insert_within_words samples insertion indices from range(len(prompt_list) minus 1), so for a prompt of n characters only positions 0 through n minus 2 are ever chosen. Of the n plus 1 possible insertion points, a punctuation mark can never land immediately before the last character or after the final character, no matter the seed.
For the three character prompt abc, 300 different seeds produce only prefixes at offsets 0 and 1: outputs like ab!c or abc! are unreachable, while the method docstring says punctuation is inserted at any indices in the prompt.
Expected Behavior
Every insertion point of the prompt, before the first character through after the last, should be reachable.
Reproduction Steps
- Run
InsertPunctuationConverter(between_words=False, word_swap_ratio=1.0, seed=s).convert_async(prompt="abc", ...)for seeds 0 through 299. - Collect the offset of the inserted punctuation.
- Only offsets 0 and 1 ever appear on main.
Minimal Reproduction
offsets = set()
for seed in range(300):
out = await InsertPunctuationConverter(between_words=False, word_swap_ratio=1.0, seed=seed).convert_async(prompt="abc", input_type="text")
offsets |= {i for i, ch in enumerate(out.output_text) if not ch.isalnum()}
# {0, 1} on main
Environment
PyRIT main. Python 3.11.
- Ngôn ngữ chính
- Python
- Star
- 4.7k
- Fork
- 980
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 422
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
Conversation drawer shows the previous attack's conversations after switching attacksCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: case insensitive keyword selection returns a shifted range when lowercasing expands a characterĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
query rewriting: prompt says "Language for `query` field: None" when language detection failsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ocr_data_to_elements() raises AttributeError when a layout element is a ListCó thể đã có người làm @Eapp1e đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Unstructured-IO/unstructured#4616 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:codegen backend:metal bug direction:output
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày