# Provenance and ContextRole

> **Upcoming in 1.0 (preview). These pages describe the main branch of LLMSlim Core, which becomes the 0.13 release candidate and then 1.0. `pip install llmslim` installs 0.12.0 today, which doesn't have everything described here.** Docs for what pip installs: https://www.llmslim.app/docs.md

> Assign the trust semantics of the content you are compressing.

Keep untrusted retrieval, tool, and assistant content out of the protected priority tier.

Category: Core Concepts · Version: 1.0 · Updated: September 2026 · 5 min read

## Roles

SYSTEM and DEVELOPER are trusted. USER is semi-trusted. ASSISTANT, TOOL, and RAG are untrusted: wording and preservation-pattern matches cannot move them above Tier 2 or make them must_keep. GENERAL is the legacy default.

roles.py:

```python
from llmslim import ContextRole, compress

result = compress(retrieved_text, context_role=ContextRole.RAG)
```

> **Trust boundary:** LLMSlim trusts caller-provided role labels and cannot authenticate provenance.

## FAQ

### Does ContextRole prevent prompt injection?

No. It mitigates compression-induced instruction elevation. Applications still need defense in depth.

### Can LLMSlim authenticate a role label?

No. The caller is responsible for accurate provenance.

## Related

- [Document and chat pipelines](https://www.llmslim.app/docs/1.0/pipelines.md)
- [Compression quickstart](https://www.llmslim.app/docs/1.0/getting-started.md)

Canonical page: https://www.llmslim.app/docs/1.0/context-role
