TextGrad is exciting! Very much appreciate your efforts.
How to apply textgrad to retrieval-augmented-generation (RAG) for question & answer?
With RAG there are three inputs: the source material (text), the question and the answer (which needs to be evaluated and improved).
Not clear to me how to handle those with one or more Variables, etc.
Something like?
x = Variable("Source material: "+ + " and a question about it: " + [question], role_description="Answering a question on source material", requires_grad=True)
TextGrad is exciting! Very much appreciate your efforts.
How to apply textgrad to retrieval-augmented-generation (RAG) for question & answer?
With RAG there are three inputs: the source material (text), the question and the answer (which needs to be evaluated and improved).
Not clear to me how to handle those with one or more Variables, etc.
Something like?
x = Variable("Source material: "+ + " and a question about it: " + [question], role_description="Answering a question on source material", requires_grad=True)