Skip to content

Commit da6dd3d

Browse files
committed
fixing Note, to note
Signed-off-by: JJ Asghar <[email protected]>
1 parent bb220b6 commit da6dd3d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/lab-7/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ python3.11 -m venv venv
6060
source venv/bin/activate
6161
pip install mellea
6262
```
63-
Note: If you see something about the Rust compiler, please confirm you are using python3.11, or python3.12
64-
anything above that has a Rust dependency.
63+
64+
!!! note
65+
If you see something about the Rust compiler, please confirm you are using python3.11, or python3.12 anything above that has a Rust dependency.
66+
6567
2. Run a simple Mellea session:
6668
```python
6769
import mellea
@@ -74,8 +76,8 @@ you are set up to dig deeper with Mellea.
7476

7577
## Simple email examples
7678

77-
Note: The following work should be done via a text editor, there should be a couple installed on your
78-
laptop, if you aren't sure raise your hand and a helper will help you out.
79+
!!! note
80+
The following work should be done via a text editor, there should be a couple installed on your laptop, if you aren't sure raise your hand and a helper will help you out.
7981

8082
Let's leverage Mellea to do some email generation for us, the first example is a simple example:
8183
```python
@@ -223,7 +225,9 @@ print(write_email(m, "Olivia",
223225
```
224226

225227
Most of this should look familiar by now, but the `validation_fn` and `check` should be new.
228+
226229
We create 3 requirements:
230+
227231
- First requirement (r1) will be validated by LLM-as-a-judge on the output of the instruction. This is the default behavior.
228232
- Second requirement (r2) uses a function that takes the output of a sampling step and returns a boolean value indicating successful or unsuccessful validation. While the validation_fn parameter requires to run validation on the full session context, Mellea provides a wrapper for simpler validation functions (simple_validate(fn: Callable[[str], bool])) that take the output string and return a boolean as seen in this case.
229233
- Third requirement is a check(). Checks are only used for validation, not for generation. Don't think mention purple elephants.

0 commit comments

Comments
 (0)