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

fix: use full value of variable instead of short version #156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions textgrad/optimizer/optimizer_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# TGD update instruction
TGD_PROMPT_PREFIX = (
"Here is the role of the variable you will improve: <ROLE>{variable_desc}</ROLE>.\n\n"
"The variable is the text within the following span: <VARIABLE> {variable_short} </VARIABLE>\n\n"
"The variable is the text within the following span: <VARIABLE> {variable_value} </VARIABLE>\n\n"
"Here is the context and feedback we got for the variable:\n\n"
"<CONTEXT>{variable_grad}</CONTEXT>\n\n"
"Improve the variable ({variable_desc}) using the feedback provided in <FEEDBACK> tags.\n"
Expand All @@ -34,7 +34,7 @@
# If the gradients are in a multi-part container
TGD_MULTIPART_PROMPT_INIT = (
"Here is the role of the variable you will improve: <ROLE>{variable_desc}</ROLE>.\n\n"
"The variable is the text within the following span: <VARIABLE> {variable_short} </VARIABLE>\n\n"
"The variable is the text within the following span: <VARIABLE> {variable_value} </VARIABLE>\n\n"
"Here is the context and feedback we got for the variable:\n\n"
)

Expand Down