bobbai00 opened a new pull request, #9496:
URL: https://github.com/apache/texera/pull/9496
### What changes were proposed in this PR?
Every model call carried the compact schema of each allowed operator type in
the system prompt: 18.8 KB by default, 189.2 KB with all 168 types. The prompt
also told the model to call a `getOperatorSchema` tool that did not exist, and
`addOperator` accepted every type whatever the allowed list said.
| | `main` | This PR |
| --- | --- | --- |
| System prompt | Each allowed type's schema | Each usable type in one line:
its name and what it does |
| A type's properties | Already in the prompt | `get_operator_schema`, for
several types in one call |
| Allowed operator types | Trim the prompt only | One list for the prompt,
the lookup and `addOperator` |
| A tool that throws, or a call the SDK rejects | Recorded with no result |
Recorded as the call's failed result |
This is the first part of #9481; `edit_workflow` and `execute_workflow`
follow.
### Any related issues, documentation, discussions?
Part of #9481
Part of #9453
### How was this PR tested?
- `cd agent-service && bun test` (352 pass), `bun run typecheck` and `bun
run format:check`. New tests cover the lookup (several types, an unknown, a
disallowed or a miscased type, an empty list), the prompt's list (allowlist, no
allowlist, nothing known, no schema left), one list for the prompt, the lookup
and `addOperator`, and a thrown tool error recorded on its step.
- The evaluation from #9495 with Claude Haiku 5.5, three runs per case,
against `main`:
| Per run, averaged | `main` | This PR |
| --- | --- | --- |
| Runs passed | 9 of 18 | 9 of 18 |
| Model calls | 2.5 | 3.3 |
| Input tokens | 32,506 | 20,587 |
| Output tokens | 964 | 1,145 |
| KB per call | 37.6 | 16.6 |
- A first version kept the types out of the prompt behind a `find_operator`
tool and looked up one type per call. It passed the same runs but made 5.3
model calls per run for 30,616 input tokens, since the model searched for each
type before reading it, so this PR names the types in the prompt and reads
several at once.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]