I m working on a fix but using the current custom signatureInfo design to represent a signature with variable depth feels a bit hacky.
I prototyped a way to use the json schema of the model as signature and to let the LM generate a new json schema signature with unmodified fields except description and prefix.
This has the additional advantage of including the types as context information further helping the LM to reason about the problem.
disavantages:
probably higher probabilities of making mistakes in generating a new signatureInfo
I currently use a nested BaseModel as output of a signature for a project.
the current implementation seems to look solely at top level field declarations. https://github.com/stanfordnlp/dspy/blob/ef4e5ad109c7fc94c14319f3e687f7e4de7108e3/dspy/teleprompt/signature_opt_typed.py#L28
I m working on a fix but using the current custom signatureInfo design to represent a signature with variable depth feels a bit hacky. I prototyped a way to use the json schema of the model as signature and to let the LM generate a new json schema signature with unmodified fields except
description
andprefix
. This has the additional advantage of including the types as context information further helping the LM to reason about the problem.disavantages:
What do you guys think of this approach?