> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starfort.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 맞춤형 Topic 정책 추가 방법

> 안전하지 않은 콘텐츠를 분류하고 차단하는 Topic Guard Policy를 생성한 후 적용합니다.

**Topic 정책**은 콘텐츠를 토픽 기준으로 분류하고 안전하지 않은 일치 항목을 차단합니다. 이 레시피는 Topic 정책을 생성하고 실제 `BLOCK`을 검증합니다.

## 1. 생성 및 할당

Guardian을 열고 → **Policies** → **Add** → **Create & Assign Policy**를 선택합니다. 이름을 지정하고(예: `Topic Policy`) **Policy Type = Topic**으로 설정합니다.

<Frame caption="Topic 정책 생성">
  <img src="https://mintcdn.com/aimintelligence/A1_c5EL9JAZ7xlFg/images/v1.2/admin/topic-create-assign.png?fit=max&auto=format&n=A1_c5EL9JAZ7xlFg&q=85&s=c5aefd5c98e839c5aed8027f56118309" alt="Topic 정책 생성" width="1200" height="626" data-path="images/v1.2/admin/topic-create-assign.png" />
</Frame>

## 2. 토픽 정의

Topic 정책은 토픽 목록입니다. 각 토픽은 콘텐츠를 분류하는 방법을 정의합니다:

```json theme={null}
[
  {
    "id": "WPN",
    "title": "Weapons",
    "description": "Requests about manufacturing weapons or explosives.",
    "safe": { "description": "General, factual, news-level mentions." },
    "unsafe": { "description": "Step-by-step instructions to make/modify weapons or explosives." },
    "controversial": { "description": "Borderline cases." }
  }
]
```

일치 항목은 **`classification`**(`safe` / `unsafe` / `controversial`)을 반환하며, **unsafe** 콘텐츠는 차단됩니다. 폼 또는 **JSON** 보기로 토픽을 편집한 다음 **Save**하세요(새 버전이 생성됩니다).

## 3. 새 버전 적용

저장하면 새 버전이 생성되지만 **적용되지는 않습니다** — Guardian이 새 버전을 가리키도록 다시 지정(고정, pin)하지 않으면 실제 동작이 바뀌지 않습니다. [정책 업데이트 버전 관리 및 적용](/ko/v1.2/admin/how-to/version-and-apply-policy)을 참고하세요.

<Frame caption="Guardian를 새 버전으로 재지정">
  <img src="https://mintcdn.com/aimintelligence/A1_c5EL9JAZ7xlFg/images/v1.2/admin/edit-policy-version.png?fit=max&auto=format&n=A1_c5EL9JAZ7xlFg&q=85&s=577dd17c719589c02fbf83ef8c3c66d5" alt="Guardian를 새 버전으로 재지정" width="1200" height="626" data-path="images/v1.2/admin/edit-policy-version.png" />
</Frame>

## 4. 검증

안전하지 않은 토픽에 해당해야 하는 프롬프트를 보내고 `"action":"BLOCK"`을 확인하세요:

```json theme={null}
{
  "action": "BLOCK",
  "input_results": [{ "action": "BLOCK", "results": [{
    "policy_name": "Topic Policy", "policy_type": "TOPIC", "action": "BLOCK",
    "detected_items": [{ "rule_id": "WPN", "rule_name": "Weapons", "classification": "unsafe" }]
  }]}]
}
```

<Frame caption="Opticon의 BLOCK 트레이스">
  <img src="https://mintcdn.com/aimintelligence/A1_c5EL9JAZ7xlFg/images/v1.2/admin/opticon-tracing-list.png?fit=max&auto=format&n=A1_c5EL9JAZ7xlFg&q=85&s=ca3b5350feea43406e2aab333f261552" alt="Opticon의 BLOCK 트레이스" width="1200" height="626" data-path="images/v1.2/admin/opticon-tracing-list.png" />
</Frame>

<Tip>
  Starfort는 무기, 불법 행위, 탈옥/테스트 모드, 자해, 시스템 프롬프트 노출 등을 다루는 **기본 Topic 정책**을 제공합니다 — JSON으로 불러와 조정하기 좋은 기준선입니다.
</Tip>
