Created
June 24, 2026 01:29
-
-
Save quantra-go-algo/ad5479a3ee3bd219bcea7ea1f41e8f5b to your computer and use it in GitHub Desktop.
guardrailed-llm-agent — Step 7: Hard Guardrails: When the LLM Isn't Enough (snippet 2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A4: re-optimize guardrails every month (OPT_FREQ_MONTHS=1) | |
| if best_guard is None or ((m.month - 1) % OPT_FREQ_MONTHS == 0): | |
| best_guard = optimize_guardrails(train, policy) | |
| print('Re-opt guardrails @', m.date(), '->', best_guard) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment