Commit 954283a
refactor: update session context tool description (#9595)
## Description
There is an issue with relative date phrases like *"tomorrow"*,
*"yesterday"*, *"two weeks from now"*, or *"next Friday"* in user
prompts. The LLM either left date fields empty or wrote the phrase
verbatim rather than resolving it into an ISO date.
This PR updates the `SessionContextTool` description in `AIOrchestrator`
to lead with explicit guidance for resolving relative phrases against
the date/time included in the session context, into ISO date / date-time
/ time strings. The orchestrator stays controller-agnostic. What to do
with the resolved value is left to whichever controller is wired in.
Based on Form Filler DX test session findings.
No related issue.
## Type of change
- [ ] Bugfix
- [ ] Feature
- [x] Refactor
## Checklist
- [x] I have read the contribution guide:
https://vaadin.com/docs/latest/contributing/overview
- [x] I have added a description following the guideline.
- [ ] The issue is created in the corresponding repository and I have
referenced it.
- [x] I have added tests to ensure my change is effective and works as
intended.
- [x] New and existing tests are passing locally with my change.
- [x] I have performed self-review and corrected misspellings.1 parent c0389c2 commit 954283a
2 files changed
Lines changed: 35 additions & 3 deletions
File tree
- vaadin-ai-components-flow-parent/vaadin-ai-components-flow/src
- main/java/com/vaadin/flow/component/ai/orchestrator
- test/java/com/vaadin/flow/component/ai/orchestrator
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
653 | | - | |
654 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
655 | 659 | | |
656 | 660 | | |
657 | 661 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2508 | 2508 | | |
2509 | 2509 | | |
2510 | 2510 | | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
2511 | 2539 | | |
2512 | 2540 | | |
2513 | 2541 | | |
| |||
0 commit comments