Skip to content

refactor: improve instructions for ambiguous values#9594

Open
ugur-vaadin wants to merge 1 commit into
mainfrom
refactor-improve-instructions-for-ambiguous-values
Open

refactor: improve instructions for ambiguous values#9594
ugur-vaadin wants to merge 1 commit into
mainfrom
refactor-improve-instructions-for-ambiguous-values

Conversation

@ugur-vaadin

Copy link
Copy Markdown
Contributor

Description

There is an issue with FormAIController ignoring per-field description directives like "let the user pick when the query returns multiple items" on queryable fields. When the query returned multiple matches, the LLM picked one (or all) of them rather than asking the user, regardless of what the developer wrote in the description.

This PR updates the form-fill workflow text in INSTRUCTIONS_TEXT step 3 so the LLM checks the field's description for an ambiguity directive before writing a queryable field whose query returned multiple matches. When the directive is present and the user's prompt does not single out the subset to write, the LLM asks for clarification instead. Prompts like "Add both X and Y" or "Pick all of them" already name the subset, so they proceed without asking. Without a directive, the LLM picks the most reasonable match and writes it.

Based on Form Filler DX test session findings.

No related issue.

Type of change

  • Bugfix
  • Feature
  • Refactor

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant