Skip to content

[OPIK-5707] [BE] Fix eval suite dataset storing empty data for non-object trace input#6109

Merged
LifeXplorer merged 1 commit intomainfrom
user/OPIK-5707-fix-eval-suite-non-object-input
Apr 7, 2026
Merged

[OPIK-5707] [BE] Fix eval suite dataset storing empty data for non-object trace input#6109
LifeXplorer merged 1 commit intomainfrom
user/OPIK-5707-fix-eval-suite-non-object-input

Conversation

@LifeXplorer
Copy link
Copy Markdown
Contributor

Details

When adding a trace to an evaluation suite dataset, if the trace input is a JSON array (e.g. chat messages [{"role":"user","content":"hello"}]) or a scalar value, filterDataForDatasetType() discards the input entirely and stores {} as the dataset item data.

The fix adds a third branch: non-object inputs (array, string, number, boolean) are now wrapped under an "input" key, preserving the data while maintaining the Map<String, JsonNode> type constraint. Object inputs continue to be unwrapped as top-level keys (no regression).

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-5707

AI-WATERMARK

AI-WATERMARK: yes

  • If yes:
    • Tools: Claude Code
    • Model(s): Claude Opus 4.6
    • Scope: Implementation of fix and tests
    • Human verification: Code reviewed, unit tests pass, bug reproduced and fix verified locally

Testing

  • mvn test -Dtest=DatasetItemServiceFilterDataTest — all 9 parameterized tests pass
  • Reproduced bug locally: created trace with array input, added to eval suite dataset, confirmed "data":{} before fix
  • Verified fix locally: same flow now produces "data":{"input":[{"role":"user","content":"hello"}]}
  • Test cases cover: object input (unchanged), array input, string input, numeric input, boolean input, null input, missing input

Documentation

N/A

…ject trace input

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@LifeXplorer LifeXplorer requested a review from a team as a code owner April 7, 2026 15:48
@github-actions github-actions bot added java Pull requests that update Java code Backend tests Including test files, or tests related like configuration. labels Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Backend Tests - Integration Group 16

 15 files  ± 0   15 suites  ±0   5m 1s ⏱️ -22s
228 tests ± 0  225 ✅ ± 0  2 💤 ±0  0 ❌ ±0  1 🔥 ±0 
227 runs  +75  225 ✅ +75  2 💤 ±0  0 ❌ ±0 

For more details on these errors, see this check.

Results for commit 956e78b. ± Comparison against base commit ff0a7d1.

@LifeXplorer LifeXplorer merged commit 6a81ab5 into main Apr 7, 2026
76 checks passed
@LifeXplorer LifeXplorer deleted the user/OPIK-5707-fix-eval-suite-non-object-input branch April 7, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend java Pull requests that update Java code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants