Skip to content

Conversation

@MQ37
Copy link
Contributor

@MQ37 MQ37 commented Oct 23, 2025

related to #282

Improved the output format by wrapping JSON in the backtick JSON markdown block (as per JC's feedback)

@MQ37 MQ37 requested a review from jirispilka October 23, 2025 19:01
@github-actions github-actions bot added the t-ai Issues owned by the AI team. label Oct 23, 2025
Copy link
Collaborator

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

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

Thanks! But le'ts not use indent:

JSON.stringify(datasets, null, 2)

For some reason it cost almost double of the tokens: #283 (comment)

"On real data from Google map, JSON to markdown is 11% smaller for normal JSON (JSON.stringify without formatting params) and 44% smaller than formatted JSON JSON.stringify(json, null, 2)"

@MQ37
Copy link
Contributor Author

MQ37 commented Oct 24, 2025

Thanks! But le'ts not use indent:

JSON.stringify(datasets, null, 2)

For some reason it cost almost double of the tokens: #283 (comment)

"On real data from Google map, JSON to markdown is 11% smaller for normal JSON (JSON.stringify without formatting params) and 44% smaller than formatted JSON JSON.stringify(json, null, 2)"

Makes sense, thank you for noting this. Changed to JSON.stringify(obj) only.

@MQ37 MQ37 requested a review from jirispilka October 24, 2025 19:49
@MQ37 MQ37 merged commit 232a71e into master Oct 27, 2025
4 checks passed
@MQ37 MQ37 deleted the improve-markdown-json-output-format-jc branch October 27, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants