Finally! How to Leverage JSON Mode in OpenAI's New GPT 4 Turbo 128k

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2023
  • ‪@siliconsociety‬ Lead AI Engineer Robert Sharp shows how to use OpenAI's new GPT-4 Turbo 128 with JSON mode.
    We'll be posting more pro tips as we go-if you liked this, please do like the video to appease The Algorithm, and subscribe if you're interested in more 🙂
  • НаукаНаука

Комментарии • 21

  • @stefanrows2589
    @stefanrows2589 4 месяца назад +2

    Cheers. That was helpful. I'm surprised they aren't as clear about these instructions in their documentation...

  • @faustoalbers6314
    @faustoalbers6314 6 месяцев назад +2

    Very inspiring! I reversed your approach to make it create JSON objects with predefined pydantic classes from unstructured text data. The pydantic example guarantees that only the data that is ‘fitting the slots’ is extracted.
    Added to it, instructions to reason about the most probable information that is not present in the source data, but can be deduced from what it did found!
    Thanks!

  • @KabobTech
    @KabobTech 11 дней назад

    Excellent video!

  • @user-jg4ci4mf8w
    @user-jg4ci4mf8w 6 месяцев назад +3

    Excellent tutorial, thank you. Please provide more.

  • @Zach-rw6jf
    @Zach-rw6jf 4 месяца назад +1

    Awesome! I'm in the process of doing something similar and trying to figure out the best way to get my output as consistent as possible. Will definitely look into using a method like this!

  • @JT-Works
    @JT-Works 6 месяцев назад +1

    Great tutorial, I am surprised you don't have more subscribers.

  • @BangaloreYoutube
    @BangaloreYoutube 3 месяца назад

    What a video, comments section also super helpful.
    Cheers everyone.

  • @ExplodeReality
    @ExplodeReality 5 месяцев назад

    This is exactly what I was looking for, thanks!

  • @mikulcek
    @mikulcek 3 месяца назад +1

    You need to start making more content. 👍

  • @adrianobleton
    @adrianobleton 7 месяцев назад +2

    This is great! I have been working on a project that needed json output from open API, and was describing the json object in the system prompt. Similar to what you saw it works most of the time, but fails ~5%. I was solving that by making the call again if the output couldn't be parsed, but that eats up a lot more tokens.
    This seems much more elegant.

    • @bqmac43
      @bqmac43 6 месяцев назад

      I was in the same boat. This new approach gives me tons more confidence in the outputs.

  • @AiTaughtMeHow
    @AiTaughtMeHow 6 месяцев назад +1

    great idea, this helped me so much

  • @gingerjiang666
    @gingerjiang666 6 месяцев назад

    This is so cool. Thanks for sharing.

  • @jakeejacobson
    @jakeejacobson 7 месяцев назад +2

    very cool, I am using JSON schema to create the structure in the prompt but pydantic looks cool. also wondering if you can just use function calling for this, as you have to define a JSON schema for the function. have you tested the differences between JSON mode and function calling?

  • @Steve-Richter
    @Steve-Richter 7 месяцев назад +7

    Ask the AI agent to check and increase your font size.

  • @chaozhang4751
    @chaozhang4751 6 месяцев назад

    very helpful, the way to get structured output from gpt API. Just wondering if it supports nested object, such as graph structure G(V, E) with nodes and edges?

  • @mostafamoustaghni6980
    @mostafamoustaghni6980 5 месяцев назад

    I really want to see if this is better way than functions calling?

  • @Mhmdmine
    @Mhmdmine 4 месяца назад

    Whats the difference between using JSON Mode and function calling since both extract structered data? which is more accurate and viable? thanks for the pydentic tip btw

  • @adityashinde436
    @adityashinde436 6 месяцев назад

    How can i make user_prompt dynamic, meaning instead RPG as input I want to send some other input?

  • @akshatkant1423
    @akshatkant1423 2 месяца назад

    Hi, i also need to get a json response from the open ai api from my project, the json is kind of big with around 5082 tokens, so after some time the response is gibberrish and completely unrelated to with what it started, do you think there are some alternatives to my problem and if any solution is there