# 第七章 上下文隔离与结构化

前面三章讨论了如何写入、选择和压缩信息。本章转向另一个关键问题：**如何组织这些信息**？良好的结构能够提升模型对上下文的理解和利用效率。

**隔离策略** 关注的是上下文的结构化设计，包括如何清晰地区分不同类型的信息、如何分层组织指令、以及如何在复杂场景中隔离不同任务的上下文。

## 本章内容

* [7.1 结构化上下文设计](/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate/7.1_structured_context.md)
* [7.2 XML 标签与指令分层](/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate/7.2_xml_tags.md)
* [7.3 系统提示词设计](/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate/7.3_system_prompts.md)
* [7.4 多任务上下文隔离](/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate/7.4_task_isolation.md)
* [7.5 隔离策略案例分析](/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate/7.5_isolation_cases.md)
* [本章小结](/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate/summary.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/context_engineering_guide/di-er-bu-fen-he-xin-ji-shu-yu-ce-le/07_isolate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
