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

Override System Prompts Without Losing Rulesets #1467

Open
1 task done
collindutter opened this issue Dec 19, 2024 · 0 comments
Open
1 task done

Override System Prompts Without Losing Rulesets #1467

collindutter opened this issue Dec 19, 2024 · 0 comments
Assignees
Labels
type:enhancement Improvements to existing features
Milestone

Comments

@collindutter
Copy link
Member

Is your feature request related to a problem? Please describe.
Users occasionally want to override the system prompt while still persisting Rulesets.

Describe the solution you'd like
For Rulesets to not be lost when overriding the system prompt.

Describe alternatives you've considered
To accomplish this, users need to rely on default_system_template_generator which feels fragile.

def custom_system_template(task: PromptTask) -> str:
    return """
    [context] there are oranges on the table. The forks are on the wall. There is a plant on my head.
    """ + task.default_system_template_generator(task)


task = PromptTask(
    input="{{args[0]}}",
    generate_system_template=custom_system_template,
)

agent = Agent(
    rulesets=[Ruleset(name="language", rules=[Rule("You speak in yoda")])]
)
@collindutter collindutter added the type:enhancement Improvements to existing features label Dec 19, 2024
@collindutter collindutter added this to the 2.0 milestone Dec 19, 2024
@collindutter collindutter self-assigned this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant