Sensitivity and privacy
Since 0.7.0 the easy layer applies the sensitivity policy
end to end (ADR-005 §6). Declare your corpus level in
karajan.config.json:
{ "easy": { "sensitivity": "internal", "sensitivityRules": [ { "prefix": "docs/public/", "level": "public" }, { "prefix": "finance/", "level": "confidential" } ] }}- Levels:
public|internal|confidential. With nothing declared, everything counts asinternal(safe default: nothing is ever assumed public). Prefix rules are exceptions; the first match wins. - At index time, every document is tagged with its level and the chunks inherit it in the store.
- In
query --answer, the effective level is the maximum of the retrieved chunks: a singleconfidentialchunk in the context makes the whole answer confidential. The default policy allows:confidential → ollama(local),internal → ollama and private clouds,public → any provider.- An explicit
--adapternot allowed for the level → error with the allowed list (what you asked for is never silently downgraded). - Config/default adapter not allowed → it routes to the first allowed provider, warning on stderr.
- An explicit
- In
eval --judges, declare the level with--sensitivity(defaultinternal); disallowed judges are rejected before anything is sent. - Defense in depth: everything leaving towards an LLM additionally
goes through
redactPII(emails, phone numbers, national IDs, cards, IBAN). - Indexes created before 0.7.0 carry no tag: their chunks count as
internal. Reindex to apply your rules.