News for hackers. Stuff that matters.
Re:Native JSON Output from GPT-4 by thorum on Wednesday June 14, 2023 @03:22PM (#36331180)
The JSON schema not counting toward token usage is huge, that will really help reduce costs.
Re:Native JSON Output from GPT-4 by yonom on Wednesday June 14, 2023 @03:26PM (#36331238)
I believe functions do count in some way toward the token usage; but it seems to be in a more efficient way than pasting raw JSON schemas into the prompt. Nevertheless, the token usage seems to be far lower than previous alternatives, which is awesome!
Re:Native JSON Output from GPT-4 by minimaxir on Wednesday June 14, 2023 @03:28PM (#36331277)
That is up in the air and needs more testing. Field descriptions, for example, are important but extraneous input that would be tokenized and count in the costs.

At the least for ChatGPT, input token costs were cut by 25% so it evens out.

Re:Native JSON Output from GPT-4 by stavros on Wednesday June 14, 2023 @03:48PM (#36331566)
> Under the hood, functions are injected into the system message in a syntax the model has been trained on. This means functions count against the model's context limit and are billed as input tokens. If running into context limits, we suggest limiting the number of functions or the length of documentation you provide for function parameters.
Re:Native JSON Output from GPT-4 by blamy on Wednesday June 14, 2023 @09:03PM (#36335096)
But it does count toward token usage. And they picked JSON schema which is like 6x more verbose than typescript for defining the shape of json.