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

Allow for customizing the prompt #2054

Open
bartekpacia opened this issue Sep 13, 2024 · 0 comments
Open

Allow for customizing the prompt #2054

bartekpacia opened this issue Sep 13, 2024 · 0 comments
Labels
enhancement New feature request or improvement of an existing feature maestro ai Related to Maestro's AI-powered commands maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Sep 13, 2024

User feedback on assertWithAI

I like assertWithAI for detecting defects. It helps to limit the unexpected changes but I miss something to tell the model what defects it should ignore. For example, localization changes, I have one situation where I test the app in a spanish locale but since the email for the login has english names, the model reported a defect that the locale doesn't match.

To be honest, we expected this feedback (see #1222 (comment)), but preferred to not implement it until users actually request it.

Ideas

(ordererd from most basic to most powerful)

1. Per-command list of false positives (injected into the final prompt)

- assertWithAI:
    assertion: There is a login screen visible
    falsePositives:
      - Both English and Spanish text being visible
      - <something-else>

Cons:

  • why limit the flexibility? Feels wrong to me. Better just give users the control of the whole prompt.

2. Per-command list customizable prompt

- assertWithAI:
    assertion: There is a login screen visible
    prompt: Ignore problems related to both English and Spanish being visible

Cons:

  • our current prompt is quite long and including it all every time, on the commands, would be tedious.

3. Customize the default prompts for AI-powered commands

Allow for customization on per-workspace level, with possible override on per-command level.

Define prompts

We'd let you configure the prompt template in .maestro/config.yaml:

ai:
  defaultPrompts:
    assertNoDefectsWithAI: ./prompts/my_assert_no_defects_ai_prompt_template.txt
    assertWithAI: ./prompts/my_assert_with_ai_prompt_template.txt
  
  customPrompts:
    noBadWords: ./prompts/badwords_filter.txt

That's what the workspace directory hierarchy would look like in this example:

.
├── config.yaml
└── prompts
    ├── badwords_filter.txt
    ├── my_assert_no_defects_ai_prompt_template.txt
    └── my_assert_with_ai_prompt_template.txt

Of course, users would be free to structure it however they want.

Use prompts

We would introduce some syntax to refer to the prompts prefefined on the per-workspace level in the per-command level. For example:

- assertWithAI:
    prompt: noBadWords # refers to the contents of the "noBadWords" prompt

Or, to not introduce new arguments, we could re-use JavaScript for this:

- assertWithAI:
    prompt: ${prompts.noBadWords} # "prompts" would be the JS object, set by Maestro
@bartekpacia bartekpacia added enhancement New feature request or improvement of an existing feature maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list maestro ai Related to Maestro's AI-powered commands labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request or improvement of an existing feature maestro ai Related to Maestro's AI-powered commands maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list
Projects
None yet
Development

No branches or pull requests

1 participant