<p>Continuing the topic from yesterday's OpenAI update (<a href="https://t.me/rvnikita_blog/452">https://t.me/rvnikita_blog/452</a>)</p>
<p>Upon further study, it became clear that besides increasing the number of tokens and reducing costs, the main significant update is the support for <strong>Function calling</strong>. So what is it and why is it an important step? In short, it’s somewhat like plugin support, but within the API.</p>
<p>The main limitation of linguistic models is that they process and generate text but cannot perform actions. Various programs with agent support (by the way, I’ve already written a post about agents, but I haven’t published it yet because it needs to be shortened; it turned out huge) like AutoGPT, etc., as well as libraries like LangChain, are trying to change this by adding the ability to execute snippets of code, but they face the issue that the generated text is in an unusable format even with the request to “generate in JSON format.”</p>
<p>Function calling is an attempt to transfer logic inside the linguistic model.</p>
<p>Here’s an example of how to use it:</p>
<p>When a user asks, “What's the weather like in Boston now?” we first need to understand that we will need to use the weather retrieval function, then extract the city (Boston) and date (now, also understand what today’s date is) from the request, and then pass all this data to the weather API. Technically, this can be done through LangChain by making a series of calls, verifying that the necessary data is obtained, and then triggering the function, but experience shows that in some situations, an error in processing will still occur.</p>
<p>Function calling allows us to systematize such tasks and get a properly packaged object as output. I assume that the team has further trained the model to handle this well.</p>
<p>I believe that Function calling will give another significant boost to the development of startups and projects on top of OpenAI GPT.</p>
<p>Other examples of use:</p>
<ul>
<li>stock trading (decision making and placing bets)</li>
<li>sending emails (send Masha the latest report)</li>
<li>recommendations (check out new movies and arrange to go to the cinema with a friend)</li>
<li>etc.</li>
</ul>
<p>P.S. Personally, the new functionality is pushing me to develop my bot @rvnikita_public into a more assistant-like mode (sending emails, searching for information on the internet, reminding about events, etc., everything that can be delegated to a remote assistant).</p>