Closed darinkishore closed 1 year ago
Hi @darinkishore,
Yes, for enhanced control over structured input and outputs, utilizing the full-form signature notation is recommended, allowing you to include a prefix
to denote your input/output and a desc
as a refined description for the corresponding field (as you have illustrated in your example). Usually, brief descriptions suffice, as the aim is to avoid even "signature engineering" where possible and let DSPy do the work with these concise InputFields and OutputFields.
Let me know if that answers your question!
Yes, signature desc and metrics, and compiling, are the ways to control this now.
Soon we will have built-in types that will make this smoother.
Hi! One of the DSPy core tenets is to avoid prompt engineering.
But if you want structured input/output, where is it best to indicate that in a program, aside from the training examples?
Would it be in
utterance_mapping = dspy.OutputField(desc="A dictionary mapping speaker to utterance")
We don't always have the luxury of intermediate labels, so if an intermediate task has to have a particular format, it would be nice to have an official best practices recommendation for this case.