From 8e820a327f244ff13511543c43004ca15fcd8e8b Mon Sep 17 00:00:00 2001 From: Stefan Krawczyk Date: Thu, 26 Dec 2024 15:20:42 -0800 Subject: [PATCH] Adds docs reference for pytest example --- docs/examples/guardrails/creating_tests.rst | 14 ++++++++++---- docs/examples/guardrails/index.rst | 6 +++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/examples/guardrails/creating_tests.rst b/docs/examples/guardrails/creating_tests.rst index fa453d65..def1d89d 100644 --- a/docs/examples/guardrails/creating_tests.rst +++ b/docs/examples/guardrails/creating_tests.rst @@ -14,6 +14,12 @@ words or phrases, or using LLMs to grade the output, etc. We aren't opinionated do this, but in any case, you'll need to write a test case to exercise things, and this is what we're showing you how to do here. +Need to know more about pytest? +------------------------------- +For a more pytest walkthrough and example, see the `pytest example `_, +that explains what pytest is, how to evaluate more than just a single assert statement, how to aggregate results, etc. + + Test Case Creation Example -------------------------- Video walkthrough: @@ -57,11 +63,11 @@ test case with the module name of your serialization logic. Note (2): you can pass in `--action-name` to override the action name in the test case. This is useful if you want to use the output of one action as the input to another action; there are corner cases where this is useful. + Future Work ----------- We see many more improvements here: -1. Annotating data in the UI to make it easier to pull out. -2. Automatically suggesting tests cases for you to add. -3. Data export / integration with evaluation tools. -4. etc. Please let us know what you need! +1. Automatically suggesting tests cases for you to add. +2. Data export / integration with evaluation tools. +3. etc. Please let us know what you need! diff --git a/docs/examples/guardrails/index.rst b/docs/examples/guardrails/index.rst index e6f078a2..c577fd0a 100644 --- a/docs/examples/guardrails/index.rst +++ b/docs/examples/guardrails/index.rst @@ -1,6 +1,6 @@ -============= -🚧 Guardrails -============= +======================= +🚧 Guardrails / Tests +======================= .. toctree:: :maxdepth: 2