-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Using vars on rubricPrompt lacks serialization, leading to the failure of the entire assertion. #823
Comments
Related to #759 |
Hi typpo, In my personal opinion, this doesn't seem to be related to issue #759. Meanwhile, the problem I see is in the implementation of Did you agree with this perspective? |
Thank you for looking into this. I agree and would gladly accept a PR @YiFanChen99 ! |
I intend to use LLM2 to assist in evaluating the response of another LLM1.
Therefore, the vars for the first request will be passed to LLM2 again.
However, if the vars contain special characters (such as
\n
), it will lead to the failure of the entire llm-rubric assertion.In the following example for a translation request.
An error occurs due to the
\n
in thevars.input
. (... families are all alike. \nAnd every ...
)And removing this character will make the evaluation be successful.
example.yaml
Will get the result:
![image](https://private-user-images.githubusercontent.com/11830576/334352802-f1a47044-5204-4668-8755-054356b96a4e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzODMwNjMsIm5iZiI6MTcxOTM4Mjc2MywicGF0aCI6Ii8xMTgzMDU3Ni8zMzQzNTI4MDItZjFhNDcwNDQtNTIwNC00NjY4LTg3NTUtMDU0MzU2Yjk2YTRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDA2MTkyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0MWQyMmMxNDI0ODZhZDhmZTgxNWVmMWViMTY5YTkyM2NlMzhlMGEzZmUzYjRhZDlhYzg2NWU0YTJjNDlhNTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZZdJ4gbAm9fy_qm3qpAeUq8lckmTHQKQ1LRklirHtKA)
Due to the unserialized
input
:...\"content\":\"[Input Start] Happy families are all alike. \n And every unhappy family is unhappy in its own way. [Input End]\\n[Translation Start]...
Is there any workaround or maybe a better way to do this, please?
The text was updated successfully, but these errors were encountered: