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

Parse JSON in JSONDiff #99

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Parse JSON in JSONDiff #99

merged 2 commits into from
Nov 4, 2024

Conversation

ankrgyl
Copy link
Contributor

@ankrgyl ankrgyl commented Nov 4, 2024

By popular demand... if the string looks like JSON, treat it as such. This is very common when comparing an LLM generated json string to an expected value.

Copy link

github-actions bot commented Nov 4, 2024

Braintrust eval report

Autoevals (semantic-json-1730742427)

Score Average Improvements Regressions
NumericDiff 75.9% (+0pp) - -
Duration 1.52s (-2.65s) 100 🟢 -
Prompt_tokens 279.25tok (+0tok) - -
Completion_tokens 17.94tok (+0tok) - -
Total_tokens 297.18tok (+0tok) - -

Copy link

github-actions bot commented Nov 4, 2024

Braintrust eval report

Autoevals (semantic-json-1730701127)

Score Average Improvements Regressions
NumericDiff 75.9% (+2pp) 10 🟢 3 🔴
Duration 4.19s (+2.64s) - 100 🔴
Llm_duration 1.95s - -
Prompt_tokens 279.25tok (+0tok) - -
Completion_tokens 17.94tok (-0.5tok) 21 🟢 17 🔴
Total_tokens 297.18tok (-0.5tok) 21 🟢 17 🔴
Estimated_cost 0$ - -

'{"o1": {"y": 2, "x": 1}}',
0.83333,
),
(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case is identical to the one above it.

js/json.test.ts Outdated
expected: 0.83333,
},
{
a: '{"o1": {"x": 2, "y": 2}}',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case is identical to the one above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for flagging, just tweaked it

@ankrgyl ankrgyl merged commit 76b5a92 into main Nov 4, 2024
2 of 8 checks passed
Copy link

github-actions bot commented Nov 4, 2024

Braintrust eval report

Autoevals (main-1730742450)

Score Average Improvements Regressions
NumericDiff 75.9% (0pp) - -
Duration 1.55s (+0.04s) 33 🟢 67 🔴
Prompt_tokens 279.25tok (+0tok) - -
Completion_tokens 17.94tok (+0tok) - -
Total_tokens 297.18tok (+0tok) - -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants