Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/guardrails_ai/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@
"source": [
"#### Specifying quality criteria\n",
"\n",
"Next, we want to specify the quality criteria for the output to be valid and corrective actions to be taken if the output is invalid. We can do this by adding a `format` tag to each field in the output schema. Format tags can either be enforced by Guardrails, or they can only be suggetions to the LLM. You can see the list of validators enforced by Guardrails [here](../api_reference_markdown/validators.md). Additionally, you can create your own custom validators, see examples here [1](../examples/no_secrets_in_generated_text), [2](../examples/recipe_generation), [3](../examples/valid_chess_moves).\n",
"Next, we want to specify the quality criteria for the output to be valid and corrective actions to be taken if the output is invalid. We can do this by adding a `format` tag to each field in the output schema. Format tags can either be enforced by Guardrails, or they can only be suggetions to the LLM. You can see the list of validators enforced by Guardrails [here](../hub/api_reference_markdown/validators.md). Additionally, you can create your own custom validators, see examples here [1](../examples/no_secrets_in_generated_text), [2](../examples/recipe_generation), [3](../examples/valid_chess_moves).\n",
"\n",
"As an example, for our use case we specify that the `affected_area` of `symptoms` should be one of the following: `['head', 'neck', 'chest']`. For this, we use the [`valid-choices` validator](https://www.guardrailsai.com/docs/api_reference_markdown/validators#validchoices).\n",
"As an example, for our use case we specify that the `affected_area` of `symptoms` should be one of the following: `['head', 'neck', 'chest']`. For this, we use the [`valid-choices` validator](https://www.guardrailsai.com/docs/hub/api_reference_markdown/validators#validchoices).\n",
"\n",
"\n",
"#### Specifying corrective actions\n",
Expand All @@ -165,7 +165,7 @@
"\n",
"For example, we can specify that if the `affected_area` of a symptom is not one of the valid choices, we should re-prompt the LLM to correct its output.\n",
"\n",
"We do this by adding the `on-fail-valid-choices='reask'` attribute to the `affected_area` field. To see the full list of corrective actions, see [here](https://www.guardrailsai.com/docs/concepts/output#%EF%B8%8F-specifying-corrective-actions).\n",
"We do this by adding the `on-fail-valid-choices='reask'` attribute to the `affected_area` field. To see the full list of corrective actions, see [here](https://www.guardrailsai.com/docs/hub/concepts/on_fail_policies).\n",
"\n",
"\n",
"Finally, our updated output schema looks like:"
Expand Down Expand Up @@ -1977,7 +1977,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.11.7"
},
"orig_nbformat": 4,
"vscode": {
Expand Down