.NET API
ContentGuardSource
Tracon.Abstractions.dllWhere the text handed to an IContentGuard came from.
public enum ContentGuardSourceFields
Section titled “Fields”Document = 3
Text extracted from a document (for example, retrieved for RAG).
ModelOutput = 4
Text the model itself generated.
SkillResource = 5
Text loaded from a skill’s own resource file.
ToolResult = 2
The result of a tool call. See ContentGuardContext.ToolName.
Unknown = 0
The source could not be determined. This is never a reason to relax a security decision — treat it at least as strictly as the most sensitive known source.
UserMessage = 1
Text a user typed.
Remarks
Section titled “Remarks”The trust level behind these values is not uniform: a user message can only
poison the sender’s own session, while a tool result can carry text another
tenant’s data wrote into a shared system (prompt injection). A guard that
wants to apply different rules per source reads this value; the built-in
PatternContentGuard deliberately does not — it applies the same
patterns regardless of source.