Live data from Hacker News

Function calling and other API updates

openai.com

41–50 of 174 posts

Re: Function calling and other API updates

#41
post #12

GPT3.5 has been undergoing constant improvements, this price decrease (and context length increase) is great news! The main problem I see with people using GPT3.5 is they try and ask it to "write a short story about aliens" and then they get back a crap boring response that sounds like it was written by an AI that was asleep at the wheel. Good creative prompts are long and detailed, and to get the best results you re…

> None of the prompt guides I've seen really cover pushing GPT3.5 to its limit, I've published one of my more complicated prompts[1] but getting GPT3.5 to output good responses in just this limited sense has taken a lot of work.

Completely agree. We use gpt-3.5 in our feature and it works really well! After my blog post where I detail some of the issues [0] I got a lot of people asking me questions about how we got gpt-3.5 to "work well" because they found it wasn't working for them compared to gpt-4. Almost every time the reason is that they weren't really doing good prompting and expected the magic box to do some magic. The answer is...prompt engineering is actual work, and with some elbow grease you can really get gpt-3.5 to do a lot for you.

[0]: https://www.honeycomb.io/blog/hard-stuff-nobody-talks-about-...

Re: Function calling and other API updates

#42

The big feature here is the function calls, as this is effectively a replacement for the "Tools" feature of Agents popularized by LangChain, except in theory much more efficient since it may not require an extra call to the API. In the case of LangChain which selects Tools and their functional outputs through JSON Markdown shennanigans (which often fails and causes ParsingErrors), this variant of ChatGPT appears to b…

This is a really clever approach to tool use. I'll definitely be experimenting with this trick. Previously I had a grotesque cacophony of agents and JSON parsers. I think this will do a lot to help (both the process and my wallet)

Re: Function calling and other API updates

#43
OpenAI continues to impress. Function calls will make working with JSON much easier, a current pain point. Dropping the price of embeddings and increasing context length means searching through your own content should become faster and more accurate.

> $0.0015 per 1K input tokens and $0.002 per 1K output tokens, which equates to roughly 700 pages per dollar.

This is such an incredible steal, especially when you consider that no open source option comes close to GPT3.5.

Re: Function calling and other API updates

#44

I don't understand it. You tell the gpt-4 session a function exists and supply the signature, but I don't see any URLs being defined on where the APIs live? > 1. Call the model with functions and the user’s input > 2. Use the model response to call your API I don't get this part. Where do you tell it where the API lives?

You don't. You take the model response and you call your API.

Re: Function calling and other API updates

#45

Seems like I was right to wait for price drop on GPT3.5 a few months ago, was hoping for mostly a drastic drop for GPT4 but I guess 25%(for input tokens, effectively 12.5% on average) on 3.5 works as well

Despite sharing a common prefix, GPT3.5 and GPT4 are completely different models. So, if you were hoping for a price drop on GPT4, the 3.5 drop might not be of any use to you

Re: Function calling and other API updates

#46

I hate seeing these guys succeed because everyone of their successes is a new day that AI becomes less accessible to the average person and more locked behind their APIs.

- The API is extremely cheap

- There are plenty of open source tools built on top if it (example list: https://github.com/heartly/awesome-writing-tools)

While I wish this work was open, they are both the best and cheapest option out there... by a mile.

Re: Function calling and other API updates

#47
post #44

I don't understand it. You tell the gpt-4 session a function exists and supply the signature, but I don't see any URLs being defined on where the APIs live? > 1. Call the model with functions and the user’s input > 2. Use the model response to call your API I don't get this part. Where do you tell it where the API lives?

You don't. You take the model response and you call your API.

Ah, I missed this part. ChatGPT response after you tell it a function call exists, it can decide whether or not to call it.

    {
      "id": "chatcmpl-123",
      ...
      "choices": [{
        "index": 0,
        "message": {
          "role": "assistant",
          "content": null,
          "function_call": {
            "name": "get_current_weather",
            "arguments": "{ \"location\": \"Boston, MA\"}"
          }
        },
        "finish_reason": "function_call"
      }]
    }
Gotcha. This makes it so that instead of English, gpt-4 can basically spit out/decide when to make function calls now, got it. Thanks.

I wonder how scary this will get if people mistakenly trust it with anything more than a GET. Imagine not being able to trust the reliability of some of the parameters of POST / PUT / DELETE on some reports/internal databases, etc.

Re: Function calling and other API updates

#48
This seems great, but what does this mean for fine-tuning? Will we be able to fine-tune models prompted with function calls? Should we fine-tune models prompted with function calls? Depending on the complexity of the function-call/text-query pairs I think we may still want to...

Re: Function calling and other API updates

#50
Nice! Real life use case of these updates for my autonomous web scraping product:

- Bigger context window means less slicing and less calls for generating the web scrapers on the fly

- The functions will help to reliably build our data transformation steps (e.g. mapping different sources into the same structure)

- Way better unit economics

Post reply on HN