NeMo Guardrails 0.24

Last reviewed Oct 28, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Python 3155 lines · 3.8K tokens
  2. NeMo Guardrails 0.2478 lines · 3.7K tokens
Total233 lines · 7.5K tokens

CWE Coverage

  • 20
  • 23
  • 36
  • 59
  • 78
  • 89
  • 95
  • 117
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 306
  • 319
  • 328
  • 338
  • 347
  • 362
  • 367
  • 379
  • 409
  • 416
  • 426
  • 427
  • 470
  • 488
  • 502
  • 522
  • 532
  • 611
  • 639
  • 674
  • 732
  • 770
  • 772
  • 776
  • 799
  • 807
  • 829
  • 862
  • 916
  • 918
  • 922
  • 923
  • 942
  • 1104
  • 1333
  • 1395
  • 1426
  • 1427

Prompt Preview

Apply the Python 3 prompt first. These rules target the NeMo Guardrails 0.24 line as implemented by nemoguardrails 0.24.1 on Python 3.10–3.13, including LLMRails, IORails, Colang, custom actions, and the library's API servers.

Trusted configuration and runtime

  • Load RailsConfig.from_path() and import_paths only from reviewed application-controlled directories. Treat YAML, Colang, prompt templates, config.py, actions.py, and actions/ as executable policy; initialization imports Python code, including config.py from combined configurations in 0.24.1.
  • Set colang_version deliberately and initialize every production configuration combination before accepting traffic. Exercise each mandatory rail during readiness checks: successful configuration parsing does not prove that lazily imported detectors, credentials, models, or custom actions work.
  • Use Python 3.10–3.12 when relying on the sdd or all extra to install Presidio; those extras omit Presidio on Python 3.13. Verify the required spaCy model and recognizers are installed before enabling sensitive-data rails.

Engine selection and rail decisions

  • Use LLMRails for dialog, retrieval, custom execution actions, or Colang 2.x. When relying on IORails-specific tool validation, construct Guardrails(config, require_iorails=True) and verify compatibility with IORails.unsupported_reason(). Automatic fallback to LLMRails must not silently remove required controls.
  • Populate the required rails.input.flows, rails.output.flows, retrieval flows, and tool flows explicitly. Empty flow lists provide