tjarkvandemerwe / tidyprompt

Create LLM prompting pipelines
https://tjarkvandemerwe.github.io/tidyprompt/
Other
3 stars 1 forks source link

multiple extraction/validation functions? #12

Closed tjarkvandemerwe closed 1 month ago

tjarkvandemerwe commented 1 month ago

I think it would be more clear if there is only 1 function to add to extraction/validation. And we could use compose to condense lists of functions into single functions. However, I think the user automatically creates single functions to extract or validate the output. We could also improve the naming:

new_wrap <- prompt_wrap(
    modify_fn = modify_fn,
    extraction_functions = list(extraction_fn),
    validation_functions = list(validation_fn)
  )

To:

new_wrap <- prompt_wrap(
    modify_fn = modify_fn,
    extract_fn = extract_fn,
    validate_fn = validate_fn
  )
lukakoning commented 1 month ago

Agreed, in practice I think you will usually only add one function, and if needed you can always create a combining function.

lukakoning commented 1 month ago

Done op mijn branch