EACI Development Journal · Safety

How Do You Inject Content Policy Into AI Companion Prompts?

Policy is assembled with identity and routing context on every request. Family-safe rules are not left behind when the user changes tabs or enters Together mode.

Safety ~8 min issue-tagged
Issue this fixes

A policy document on a web page does not constrain generation by itself. The active request must include the right rules for the selected companion, account state, context source, and route.

Prompt assembly is also a security boundary: user text must not be able to masquerade as a higher-priority policy block. The application constructs trusted instructions separately and applies family-safety filtering before the model call.

What was actually going wrong

Policy was easy to think of as static copy instead of runtime input with ordering and scope.

What I tried

What finally worked

Trusted prompt blocks are selected by companion and mode, placed outside user content, and paired with pre-generation context filters.

Why it worked

The model sees stable instruction priority and never receives disallowed context for family-safe companions.

What I learned

Prompt policy is strongest when code routing and data filtering enforce the same rule.

Where EACI uses this today

Main request assembly keeps Natalia, Atreus, and Luna permanently E-for-Everyone.

This journal covers real engineering on EACI Companion / The Veil. Companions include Caelum, Chad, Natalia, Atreus, Luna, Roxy, and Cael. Journal articles stay family-safe in content. See Privacy and Ethics.