agentune icon indicating copy to clipboard operation
agentune copied to clipboard

Try a fewshot prompt for adversarial tester

Open leonidb opened this issue 1 year ago • 3 comments

Description

The goal

We should check if (or rather how) adding a few real examples as a reference to Adversarial Tester prompt can improve the results - give us a more informative score

Implementation details

Example conversations can be passed to adversarial tester in 2 ways:

  1. Constructor The user needs to select the conversations when creating the tester It's more difficult to avoid sending the conversations from example samples to the tester
  2. In the method signiture: test(pair, reference_examples) It feels a bit less correct, for Adversarial tester, to get them on each call. But simpler to implement - tester can be created automatically, in the analysis flow we can select several examples as a reference, and test on others.
  3. Allow to "install" the examples. something like
tester_with_examples = tester.with_refrence_examples(examples)

refrence_examples can be an optional field, and prompt will optionally include them we can make it conditional - install only if they are not set yet

I tend to like the 3rd option

@danarmak @ErikLagerSB What do you think?

leonidb avatar Jun 26 '25 09:06 leonidb

I'm not sure I understand how "installing" the examples would help solve the "don't load the conversation as an example problem without ID's", but I do think it's the right direction. Why don't we add id's or at least fake ids to when we're using the adversarial tester? I think that this could be done when it's tested without too big of a problem, but not quite sure about the technicalities.

ErikLagerSB avatar Jun 26 '25 12:06 ErikLagerSB

I'm not sure I understand how "installing" the examples would help solve the "don't load the conversation as an example problem without ID's

Thats what I mean: In the SimulationSession flow you can first select 3-5 examples, from real conversations, configure the AdversarialTester to use them as reference examples, and remove them from the rest of the conversations, when you create pairs. That way you guarantee reference examples are different from conversations under test. And you don't need a special logic inside the Tester to compare conversations.

If we leave it to the user (option 1) we have no control over if there is an overlap between reference conversations and conversations under test.

I also don't want to "burden" the user with selecting examples in general

leonidb avatar Jun 26 '25 13:06 leonidb

The third option seems fine to me, FWIW.

danarmak avatar Jun 29 '25 13:06 danarmak