docs: add decompose to tutorial with example#366
docs: add decompose to tutorial with example#366AngeloDanducci merged 14 commits intogenerative-computing:mainfrom
Conversation
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
docs/tutorial.md
Outdated
| #### Decompose | ||
| For large prompts Mellea offers a decompose function to break down the initial prompt into a series of smaller ones. In addition, the intermediary output allows for constraints and validation to be applied to the output of each step. The final output is done by composing these intermediate steps. | ||
|
|
||
| See [`mellea/docs/examples/m_decompose/`](./examples/m_decompose/) for an input example prompt, intermdiary json and python representations, and the final output. |
There was a problem hiding this comment.
It might be helpful to have example commands so that folks can follow along (similar to the IVR section)
| @@ -0,0 +1,750 @@ | |||
| **Event Strategy Document** | |||
There was a problem hiding this comment.
Is there a smaller / simpler example we could include too? While this really shows the power of what can be done, for someone new it's a lot to try to wrap your head around.
There was a problem hiding this comment.
I can include a second example that is a bit more digestible for users.
|
Suggestion to keep our tests working nicely... To align with the recently merged PR #372 (optimizing example testing in pytest) and ensure consistency with other examples:
|
These are generated outputs directly from decompose based on the prompt - mainly for users to see how you go from input prompt to intermediary to final answer. I've updated it to match the new test structure as this will live in examples and we do have that as part of our test suite. |
jakelorocco
left a comment
There was a problem hiding this comment.
This looks good! A few thoughts:
- Can we add a flag to these examples so that they don't run? I think the goal of these examples should be to run the decompose pipeline not the decomposed mellea programs.
- Can we add a bash script and python command in the directory so that users can clearly see that this is how to run the decompose pipeline? I think adding it to the tutorial is good but users might miss it. Ideally, if we add a python program to decompose an even smaller prompt, we can run it as part of the examples and show users how to invoke the pipeline directly from code (ie from the python functions).
- Could you also please add a comment or docstring at the top of .py reiterating that these are the decomposed prompts not "how to decompose"?
Misc PR
Type of PR
Description
m decomposeto tutorial #18Testing