Skip to content

Commit ad9dbd6

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

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/lab-7/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ As we will see throughout the documentation, LLMs can be incorporated into
1111
software in a wide variety of ways. Some ways of incorporating LLMs into
1212
programs tend to result in robust and performant systems, while others
1313
result in software that is brittle and error-prone.
14+
1415
Generative programs are distinguished from classical programs by their use of
1516
functions that invoke generative models. These generative calls can produce
1617
many different data types — strings, booleans, structured data, code,
@@ -60,8 +61,10 @@ python3.11 -m venv venv
6061
source venv/bin/activate
6162
pip install mellea
6263
```
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.
64+
65+
!!! note
66+
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.
67+
6568
2. Run a simple Mellea session:
6669
```python
6770
import mellea
@@ -74,8 +77,8 @@ you are set up to dig deeper with Mellea.
7477

7578
## Simple email examples
7679

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.
80+
!!! note
81+
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.
7982

8083
Let's leverage Mellea to do some email generation for us, the first example is a simple example:
8184
```python
@@ -223,7 +226,9 @@ print(write_email(m, "Olivia",
223226
```
224227

225228
Most of this should look familiar by now, but the `validation_fn` and `check` should be new.
229+
226230
We create 3 requirements:
231+
227232
- First requirement (r1) will be validated by LLM-as-a-judge on the output of the instruction. This is the default behavior.
228233
- 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.
229234
- 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)