Tiếp theoHướng dẫn tiếp theo
The Sandwich Defense for Prompts
kỹ thuật
HƯỚNG DẪN KỸ THUẬT
Spotlighting marks or transforms untrusted text so a model has a cue that it is data to process rather than an instruction to follow.
Nghe hướng dẫn nàyAI thuật lại · ~3 min
Research describes delimiting, datamarking, and encoding variants, but results are tied to tested models and attacks; no formatting trick creates a guaranteed security boundary.
Spotlighting is a family of prompt transformations intended to make the provenance of untrusted content more visible in a model’s text context. A 2024 Microsoft-affiliated research paper describes three variants. Delimiting brackets a document with selected markers. Datamarking inserts a marker throughout the text, in the paper’s example replacing whitespace between words. Encoding transforms the document, for example using base64, and instructs the model to interpret the encoded block as data for the assigned task. Each variant also relies on a system instruction that explains how the marked text should be treated. The paper evaluated these methods on a synthetic indirect-injection corpus and older GPT-family model versions. It reported substantially lower attack success in its experiments, including a decrease from above 50% to below 2% for selected settings. Those numbers describe the paper’s particular tasks, attacks, and models; they are not expected production rates or guarantees for current systems. The paper also found encoding could impair underlying tasks for models less capable of decoding the text. This makes per-model utility evaluation important, not optional. Microsoft Foundry documents its Spotlighting preview as a document-attack control that uses base64 transformation and is supported only for models through the Chat Completions API. The docs say this increases document tokens and can cause long inputs to exceed limits, and note a possible user-visible encoding reference. That specific service behavior differs from a generic hand-built technique. In every case, marking helps signal provenance inside a shared text channel; it does not isolate data at a hardware or permission boundary. Test attacks that know the marker, preserve ordinary task quality, and restrict tool permissions so a successful injection has limited consequences.
A summarizer places a retrieved document between delimiters and states that instructions inside the passage are content to summarize, not commands.
A pipeline inserts a marker between words in a document, following a datamarking approach, then tests whether normal summarization still works.
A system transforms a passage using an encoding and tells a capable model how to interpret it as reference content, then measures task accuracy and attack success.
A security team pairs data marking with restricted tools and tests for attacks that copy, omit, or imitate the chosen marker.
Provenance cues may become more native to model interfaces, but prompt-level markings still share the same context channel as the text they label. The research and product implementations will evolve, and their effects will vary with model versions and attack designs. Teams should retest task quality and adversarial cases after any change, while retaining independent permission checks and monitoring. Dynamic markers could make some simple spoofing attempts harder, but they do not create a separate trusted channel. Review new attack patterns as retrieval sources change.
Bản tin miễn phí
Ba câu chuyện AI đã được xác minh vào mỗi buổi sáng các ngày trong tuần, được viết bằng tiếng Anh đơn giản. Miễn phí mãi mãi, không có quảng cáo.
Một email mỗi ngày trong tuần. Hủy đăng ký trong một cú nhấp chuột. Chúng tôi không bao giờ bán hoặc chia sẻ địa chỉ của bạn.
Tự kiểm tra
Phản hồi tức thì về mọi câu trả lời và chứng chỉ có thể chia sẻ với ID có thể xác minh sau khi bạn vượt qua khóa học.
Hỗ trợ giáo dục AI miễn phí. AI Understanding là tổ chức phi lợi nhuận 501(c)(3) — không bao giờ có quảng cáo, không có tường phí. Hãy quyên góp
Spotlighting marks or transforms untrusted text so a model has a cue that it is data to process rather than an instruction to follow. Research describes delimiting, datamarking, and encoding variants, but results are tied to tested models and attacks; no formatting trick creates a guaranteed security boundary.
Spotlighting sử dụng các phép biến đổi và hướng dẫn để xác định nguồn gốc của nội dung không đáng tin cậy.
Ví dụ về đánh dấu dữ liệu của bài báo xen kẽ một ký tự đã chọn ở ranh giới từ bằng cách thay thế khoảng trắng.
Hướng dẫn giới hạn số lượng được báo cáo đối với các mô hình, cuộc tấn công và nhiệm vụ đã được thử nghiệm trên báo.
Bài viết báo cáo rằng một số mô hình được thử nghiệm, bao gồm GPT-3.5-Turbo, gặp khó khăn với đầu vào được mã hóa và chất lượng tác vụ.
Các tài liệu hiện tại của Microsoft mô tả nội dung tài liệu được chuyển đổi base64 cho bản xem trước Spotlighting của nó.
Tiếp tục học hỏi
Đã chọn thêm hướng dẫn cho chủ đề này
Tiếp theoHướng dẫn tiếp theo
The Sandwich Defense for Prompts
kỹ thuật