Answers.Body: <p>If you examine the announcement on <a href="https://openai.com/blog/function-calling-and-other-api-updates" rel="nofollow noreferrer">https://openai.com/blog/function-calling-and-other-api-updates</a> function calling does not actually give LLMs the power to invoke functions directly.
  Instead it gives them the power to populate JSON models of the arguments to functions.
  Hopefully ones for which it has a good model.</p>
  <p>So there is a new output from such models. In addition to language they can output parameters. Though this is not such a stretch given that they can already output code which include functions and parameters.</p>
  <p>These can be checked to see if they follow the rules of the function itself in the same way that written output must conform to the rules of the language.
  It is an obvious evolution as:</p>
  <ol>
  <li>It plays to the models strengths - creating seemingly sensible patterns</li>
  <li>Its what many applications of chatGPT are already doing.</li>
  </ol>
  <p>The model itself will not invoke the functions but its easy to imagine invoking a function which will provide new prompts.</p>
  <p>I think its very wise to break the feedback loop here as immediate invocation of arbitray functions could have undesirable consequences.</p>
  <p>I expect we will see some consequences from people experimenting with that in the near future.</p>
  <p>The limitations are less obvious but you can imagine it falling prey to its own hallucinations.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-22T17:43:51.833Z
Answers.LastActivityDate: 2023-06-23T12:58:48.863Z
Answers.LastEditDate: 2023-06-23T12:58:48.863Z
Answers.UserDisplayName: Bruce Adams
Answers.Body: <blockquote>
  <p>What sort of applications does it enable?</p>
  </blockquote>
  <p>Here is an example of an application that <a href="https://stackoverflow.com/q/76757194/395857">function calling</a> enabled: <a href="https://arxiv.org/abs/2309.08872" rel="nofollow noreferrer">PDFTriage: Question Answering over Long, Structured Documents</a></p>
  <blockquote>
  <p>We propose an approach called PDFTriage that enables models to retrieve the context based on either structure or content. Our experiments demonstrate the effectiveness of the proposed PDFTriage-augmented models across several classes of questions where existing retrieval-augmented LLMs fail.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-03T11:59:27.490Z
Answers.LastActivityDate: 2023-11-03T11:59:27.490Z
Answers.UserDisplayName: Franck Dernoncourt
Answers.Body: <p>OpenAI can call Functions you provide in your API. This function can provide an extra information that is now available on web, or it can execute a task such as registering to an event.</p>
  <p>You can check this article which proviodes further details and example project with function calling feature of OpenAI:
  <a href="https://medium.com/@nihatonder87/openai-integration-can-we-use-java-instead-of-python-ddd1e03a62e8" rel="nofollow noreferrer">OpenAI function call example</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-08T10:14:00.173Z
Answers.LastActivityDate: 2024-12-08T10:14:53.307Z
Answers.LastEditDate: 2024-12-08T10:14:53.307Z
Answers.UserDisplayName: nonder
Body: <p>OpenAI has recently added something that it calls <em>function calling</em> to its ChatGPT models/API.</p>
  <p>What is meant by <em>function calling</em> in the context of a large language model? Does it allow us to invoke functions and feed them back immediately?</p>
  <p>What limitations does it have? What sort of applications does it enable?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-22T21:55:14.520Z
Comments.Text: This question is about a specific API, so it's off-topic.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-22T22:55:54.560Z
Comments.Text: There are  other questions about chatGPT on here. I'll try and rephrase though.
Comments.UserDisplayName: Bruce Adams
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-23T10:38:49.383Z
Comments.Text: Models and APIs are not the same thing. An API has nothing to do with AI, unless that API was e.g. created by an AI. Function calling seems to be just an API feature. If function calling is something that the model itself is able to do, then fine. If they created a new model that can produce JSON, then your question is more likely to be on-topic here.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-23T10:46:25.580Z
Comments.Text: According to this https://openai.com/blog/function-calling-and-other-api-updates, they fine-tuned the model, so it's not just an API feature.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-23T12:56:46.833Z
Comments.Text: Indeed before it could just output langauge now it is outputting parameter values.
Comments.UserDisplayName: Bruce Adams
Tags: <definitions><large-language-models><open-ai><chatgpt>
Title: What is function calling in OpenAI's ChatGPT models?
UserDisplayName: Bruce Adams
ThreadText: # What is function calling in OpenAI's ChatGPT models?
  
  (Asked by: username_0 on 2023-06-22)
  
  OpenAI has recently added something that it calls *function calling* to its ChatGPT models/API.
  
  What is meant by *function calling* in the context of a large language model? Does it allow us to invoke functions and feed them back immediately?
  
  What limitations does it have? What sort of applications does it enable?
  
  **Tags:** definitions, large-language-models, open-ai, chatgpt
  > **Comments:**
  > **username_1**: This question is about a specific API, so it's off-topic.  
  > **username_0**: There are  other questions about chatGPT on here. I'll try and rephrase though.  
  > **username_1**: Models and APIs are not the same thing. An API has nothing to do with AI, unless that API was e.g. created by an AI. Function calling seems to be just an API feature. If function calling is something that the model itself is able to do, then fine. If they created a new model that can produce JSON, then your question is more likely to be on-topic here.  
  > **username_1**: According to this https://openai.com/blog/function-calling-and-other-api-updates, they fine-tuned the model, so it's not just an API feature.  
  > **username_0**: Indeed before it could just output langauge now it is outputting parameter values.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2023-06-22. Score: 2
  
  If you examine the announcement on <https://openai.com/blog/function-calling-and-other-api-updates> function calling does not actually give LLMs the power to invoke functions directly.
  Instead it gives them the power to populate JSON models of the arguments to functions.
  Hopefully ones for which it has a good model.
  
  So there is a new output from such models. In addition to language they can output parameters. Though this is not such a stretch given that they can already output code which include functions and parameters.
  
  These can be checked to see if they follow the rules of the function itself in the same way that written output must conform to the rules of the language.
  It is an obvious evolution as:
  
  1. It plays to the models strengths - creating seemingly sensible patterns
  2. Its what many applications of chatGPT are already doing.
  
  The model itself will not invoke the functions but its easy to imagine invoking a function which will provide new prompts.
  
  I think its very wise to break the feedback loop here as immediate invocation of arbitray functions could have undesirable consequences.
  
  I expect we will see some consequences from people experimenting with that in the near future.
  
  The limitations are less obvious but you can imagine it falling prey to its own hallucinations.
  
  
  ---
  
  ### Answer by username_2 on 2023-11-03. Score: 0
  
  > What sort of applications does it enable?
  
  Here is an example of an application that [function calling](https://stackoverflow.com/q/76757194/395857) enabled: [PDFTriage: Question Answering over Long, Structured Documents](https://arxiv.org/abs/2309.08872)
  
  > We propose an approach called PDFTriage that enables models to retrieve the context based on either structure or content. Our experiments demonstrate the effectiveness of the proposed PDFTriage-augmented models across several classes of questions where existing retrieval-augmented LLMs fail.
  
  
  ---
  
  ### Answer by username_3 on 2024-12-08. Score: 0
  
  OpenAI can call Functions you provide in your API. This function can provide an extra information that is now available on web, or it can execute a task such as registering to an event.
  
  You can check this article which proviodes further details and example project with function calling feature of OpenAI:
  [OpenAI function call example](https://medium.com/@nihatonder87/openai-integration-can-we-use-java-instead-of-python-ddd1e03a62e8)
  
  
  ---
  
  