Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Designing Loss function with non-binary outputs #113

Open
nikhilk7153 opened this issue Aug 21, 2024 · 2 comments
Open

Designing Loss function with non-binary outputs #113

nikhilk7153 opened this issue Aug 21, 2024 · 2 comments

Comments

@nikhilk7153
Copy link

Hello,

I am looking at the textgrad loss function for prompt optimization cases. I noticed that all of them supported binary cases where the answer is either correct/incorrect. I was wondering if this code base could be modified for supporting cases where the answer is an integer/decimal for metrics such as F1, precision, or recall? If so, how would I go about implementing this?

Thanks,

Nikhil

@nikhilk7153 nikhilk7153 changed the title Designing Loss function with non-integer values Designing Loss function with non-binary outputs Aug 21, 2024
@simra-shahid
Copy link

In addition to this, can we have multiple outputs and multiple loss optimizations?
For example, a classification output and its reasoning. Can we optimize for both?

@mertyg
Copy link
Member

mertyg commented Aug 29, 2024

Hi @nikhilk7153 -- yes this should be fairly possible. For instance, you can let the inner function of this class be a function computing F1/precision/recall, e.g., StringBasedFunction(f1, "computes the precision of the answer").

hello @simra-shahid ! I don't think i fully get this question. Do you mind we would like to simultaneously refine the reasoning and the final answer for a given question, akin to what we call "Instance Optimization" in the paper? I'm sorry for not getting this, but an example would be very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants