unitxt icon indicating copy to clipboard operation
unitxt copied to clipboard

Current Formats do support different target_prefix in demos

Open yoavkatz opened this issue 1 year ago • 2 comments

Today the code in formats.py assumes the target prefix for the demos is taken from the instance. This may cause subtle issue when the target_prefix uses input field for formatting (e.g. target_prefix="The answer for {num1} + {num2} is")

yoavkatz avatar Jul 09 '24 07:07 yoavkatz

can you explain why it causes issue in that case? or in what cases it will fail?

elronbandel avatar Jul 09 '24 07:07 elronbandel

Since we take the target_prefix from the main instance and not the demos, if the instance is verbalized the calculation of 1+2 and the demo need to verbalize 4+5, it will use the instance target_prefix verbalization in the demos:

User: calculate 4+5? Assistant: The answer of 1+2 is 9 <--- demo (note the wrong target_prefix)

User: calculate 1+2? Assistant: The answer of 1+2 is

yoavkatz avatar Jul 09 '24 08:07 yoavkatz

Resolved by PR #1031

dafnapension avatar Sep 22 '24 15:09 dafnapension