You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we call a Signature, like this: class MySig(dspy.Signature): """Initial instruction""" input: str = InputField(desc="...") output: int = OutputField(desc="...")
If I update the instruction like MySig.instructions = "new prompt" it will work, but if I reload the page or restart, the instructions revert back to "Initial Instruction".
I’d prefer not to create a new Signature programmatically every time I want to update the instruction.
Is there way for overriding or replacing instructions that doesn’t involve redefining classes?
Thanks
Would you like to contribute?
Yes, I'd like to help implement this.
No, I just want to request it.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Hi @Francisca266 , can you clarify what "reloading the page or restart" means here?
you can update the instruction by setting the program's internal predictor(s) instructions. Here's an example of doing so in the InferRules optimizer
Hi, thanks for answering.
By "reloading the page or restart" I meant restarting the kernel in a Jupyter Notebook. The Signature class is reloaded from its original definition, so the docstring becomes the default instructions again. Any updates I made to signature.instructions are lost.
What feature would you like to see?
When we call a Signature, like this:
class MySig(dspy.Signature): """Initial instruction""" input: str = InputField(desc="...") output: int = OutputField(desc="...")
If I update the instruction like
MySig.instructions = "new prompt"
it will work, but if I reload the page or restart, the instructions revert back to "Initial Instruction".I’d prefer not to create a new Signature programmatically every time I want to update the instruction.
Is there way for overriding or replacing instructions that doesn’t involve redefining classes?
Thanks
Would you like to contribute?
Additional Context
No response
The text was updated successfully, but these errors were encountered: