حواجز الحماية المعمارية
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
place guardrails in the architecture so they hold even when the prompt is bypassed.
الموضوعات المخطط لها
- Prompt injection: untrusted text (a customer message, a web page, a document) tries to steer the model. Treat all model input as untrusted and output as untrusted.
- Data leakage: limit what the model can see by access-controlled retrieval using the end user's permissions, plus output filters.
- Excessive agency: give the assistant the minimum tools, read-only by default, with confirmation or human approval for actions like refunds.
- Put controls in code and infrastructure: input and output filtering, schema validation of tool calls, allowlists, rate limits, and scoped credentials. Prompts alone are not a control.
- Layer them: no single guardrail is relied on.
تفاصيل المخطط المبدئي
عرض عملي
a flow for the Larkspur assistant: user, input filter, retrieval with user's entitlements, model, output filter, tool gateway (allowlist, scopes, approval step for refunds), audit log.
اختبر فهمك
Why is a prompt instruction alone not a guardrail?
أظهر الإجابة
The model can be manipulated or ignore it; real controls must be enforced outside the model.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.