Skip to content

docs(guardrails): expand guardrails page with all validators and examples [AL-290]#1570

Merged
apetraru-uipath merged 1 commit intomainfrom
feat/guardrails_documentation
Apr 17, 2026
Merged

docs(guardrails): expand guardrails page with all validators and examples [AL-290]#1570
apetraru-uipath merged 1 commit intomainfrom
feat/guardrails_documentation

Conversation

@apetraru-uipath
Copy link
Copy Markdown
Contributor

What changed?

Rewrote packages/uipath/docs/core/guardrails.md from a single-line mkdocstrings stub into a comprehensive reference page.

  • Added prose introduction and quick-start usage example for the @guardrail decorator
  • Added execution stages table (PRE / POST / PRE_AND_POST) with supported-validator matrix
  • Added dedicated sections for all five built-in (Azure Content Safety-backed) validators with code examples:
    • PII Detection (PIIValidator) — 18 entity types, per-entity confidence thresholds
    • Harmful Content (HarmfulContentValidator) — 4 categories, severity thresholds 0–6
    • Prompt Injection (PromptInjectionValidator) — PRE stage only
    • User Prompt Attacks (UserPromptAttacksValidator) — PRE stage only, no params
    • Intellectual Property (IntellectualPropertyValidator) — POST stage only
  • Added Actions section (LogAction, BlockAction, custom GuardrailAction)
  • Added Custom Validators section (CustomValidator with 1-arg and 2-arg rule functions)
  • Added GuardrailExclude usage and stacking guardrails examples
  • Added Low-level API section for direct sdk.guardrails.evaluate_guardrail() usage
  • Added full API Reference section with 13 targeted mkdocstrings directives covering all public classes

How has this been tested?

Verified locally with uv run mkdocs serve — all sections render correctly, all mkdocstrings references resolve without warnings.

Are there any breaking changes?

  • Under Feature Flag
  • None
  • DB migrations required
  • API removals / deprecations
  • Other

@apetraru-uipath
Copy link
Copy Markdown
Contributor Author

How to view locally the docs:

cd /uipath-python/packages/uipath
uv run mkdocs serve

Then open http://127.0.0.1:8000/uipath-python/core/guardrails/ in your browser.

Comment thread packages/uipath/docs/core/guardrails.md Outdated
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_documentation branch 2 times, most recently from 6774300 to 9ca372d Compare April 17, 2026 09:28
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_documentation branch from 9ca372d to b756797 Compare April 17, 2026 14:03
@apetraru-uipath apetraru-uipath enabled auto-merge (squash) April 17, 2026 14:03
@apetraru-uipath apetraru-uipath merged commit b8dba25 into main Apr 17, 2026
80 checks passed
@apetraru-uipath apetraru-uipath deleted the feat/guardrails_documentation branch April 17, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants