Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepended Conversation should be refactored to include objective #839

Open
rlundeen2 opened this issue Mar 27, 2025 · 3 comments
Open

Prepended Conversation should be refactored to include objective #839

rlundeen2 opened this issue Mar 27, 2025 · 3 comments
Assignees

Comments

@rlundeen2
Copy link
Contributor

Currently, for MultiTurnOrchestrators, you can set a prepended conversation. This is really useful, for example, if you want to set a system prompt on an objective target and then run Crescendo against it.

However, we want to make this more generic so we can prepend specific prompts based on the objective that's being used.

self._prepended_conversation should be replaced by

self.get_prepended_conversation(objective: str) -> list[PromptRequestResponse

We also need to update set_prepended_conversation to include an objectiver (optionally). A good behavior might be to store these in a dictionary such that get_prepended_conversation returns:

  • A default value if it's set and there is no match and set_prepended_conversation has been set for default
  • A specific prepended conversation if the objective matches. This can be a hash also/exact match
@ryanjieh
Copy link
Contributor

ryanjieh commented Apr 3, 2025

Hi, could I try to resolve this issue?

@romanlutz
Copy link
Contributor

Do you understand what needs to be done? If not, please ask questions here. It's not marked with "help wanted" but I'm guessing @rlundeen2 opened it so that people can give it a try. I'll assign it to you for now @ryanjieh

@rlundeen2
Copy link
Contributor Author

rlundeen2 commented Apr 3, 2025

A good use case to look is the second cookbook! Right now we have to send the second turns sequentially, but if we can match "prepend prompt X with objective Y" that's the goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants