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

BUG: Inferred objective is empty when tool calls come between the request and the answer

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

Maintainer thường phản hồi trong vòng 2 ngày

@Shizoqua đang làm issue này rồi.

Từ ngày 26/10/2026.

  • #3517 của @Shizoqua — đang mở

Đá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
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
ai, backend

Hướng nghiên cứu

Read extract_objective_from_previous_turn_async and compare its lookup with MemoryInterface.get_request_from_response_async and WildGuardScorer, which the issue cites. Reproduce with the described sequence of user, function call, tool output, and answer turns; done means the inferred objective is the original user question. Pull request #3517 is already open for this issue.

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

Mô tả

Describe the bug

extract_objective_from_previous_turn_async (used when a scorer infers the objective from the request) only reads the turn at sequence - 1. When a target runs a tool loop, memory stores the user request, the function_call, the function_call_output and then the answer, so the turn before the answer is the tool output. It has no user text, and the scorer ends up with an empty objective.

#3410 fixed the same problem in MemoryInterface.get_request_from_response_async, and WildGuardScorer already looks back to the latest earlier user turn.

Steps to Reproduce

Store a conversation of user question (seq 2), assistant function_call (seq 3), tool function_call_output (seq 4) and assistant answer (seq 5), then call extract_objective_from_previous_turn_async on the answer.

Expected Results

The objective is the user question from seq 2.

Actual Results

An empty string.

Versions

Linux, Python 3.13.16, PyRIT 1.2.0.dev0 from main (96de757e)

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

Mở trong Codespaces

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

  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/PyRIT

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

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.