dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Add an unique id for every entry in history

Open Anindyadeep opened this issue 1 year ago • 6 comments

We can infer that, history in dspy acts as a trace, where we can see previous LLM response along with all the additional arguments. However, with more and more llm responses, it becomes hard to follow along the traces, since this is a list. And this becomes a common problem for all the supported LLMs in dsp.modules

So my proposal is to have some id parameter with the following example standard:

module-name:current-date-time

or we can also use uuid but then add, date-time parameter seperately. The reason I put emphasis on datetime, because it makes easier to do some filter operations.

Let me know what everyone thinks on this.

Anindyadeep avatar May 29 '24 03:05 Anindyadeep

Using date-time might also help in time-performance analysis

tom-doerr avatar May 29 '24 20:05 tom-doerr

Yes, I agree

Anindyadeep avatar May 30 '24 06:05 Anindyadeep

This is solid idea. @Anindyadeep wanna add a PR to the new dspy.LM client?

okhat avatar Sep 27 '24 15:09 okhat

This is solid idea. @Anindyadeep wanna add a PR to the new dspy.LM client?

sure, would be happy to do it

Anindyadeep avatar Sep 29 '24 17:09 Anindyadeep

This is solid idea. @Anindyadeep wanna add a PR to the new dspy.LM client?

Hi @okhat I have one question though should it be added on the dspy/clients.lm or dspy/modules.lm or both? Since module seems to be the base class?

Edit: From what I see, I do not see any such scope to add those in modules section. Although we can discuss if we need to add in modules here.

Anindyadeep avatar Sep 29 '24 18:09 Anindyadeep

Hey, also I added an another issue, while I was solving this one, let me know your thoughts.

Anindyadeep avatar Sep 29 '24 18:09 Anindyadeep