Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix incorrect and ambiguous guardrail documentation: Input/Output Guardrails and agent sequencing #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
Loading
from

Conversation

Wania-Kazmi
Copy link

@Wania-Kazmi Wania-Kazmi commented May 15, 2025

Problem:

  1. The documentation states that input guardrails only run on the "first agent" and output guardrails only run on the "last agent", which might be unclear in the context of agent sequences or chains.
  2. The original text for the first step of Output Guardrails incorrectly stated that it receives "the same input passed to the agent"

Solution:

  1. Definitions: For "first agent" (the entry point receiving user input) and "last agent" (the one producing the final output) are added directly into the relevant notes. The text also explicitly reiterates that input guardrails apply to the first agent's input and output guardrails apply to the last agent's output.
  2. Output guardrail Error: This has been corrected to reflect the actual behavior: the guardrail receives "the final output produced by the agent". This aligns the documentation with the code examples and the purpose of output guardrails.

Why this change?
Correction of output guardrail description and the clarification helps users understand exactly which agent in a potential chain will have its input or output checked by these types of guardrails, providing crucial context for system design.

…rrect Output guardrail first step.

Enhanced the documentation for input and output guardrails by specifying that input guardrails apply only to the first agent in a sequence, while output guardrails apply only to the last agent. This clarification improves understanding of how guardrails function in agent chains.
@Wania-Kazmi Wania-Kazmi changed the title Clarify Guardrail execution flow and agent roles Fix incorrect and ambiguous guardrail documentation: Input/Output Guardrails and agent sequencing May 15, 2025
Updated the documentation for output guardrails to specify that the guardrail receives the output produced by the agent, enhancing clarity in the guardrail process.
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.

1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.