chatgpt_plugins icon indicating copy to clipboard operation
chatgpt_plugins copied to clipboard

How do functions compare to plugins?

Open pisees opened this issue 2 years ago • 2 comments

Love your sample but how would you describe when to use or develop functions or plugins?

pisees avatar Jun 17 '23 14:06 pisees

I think, using functions should be the default mode of any non-trivial application built on the chat APIs. For example, in a simple question-answering app where you give the LLM matching text from a bunch of documents as context to the LLM and you want it generate an answer along with citations. Doing this through a function call such as format_answer(answer_text: str, citations: List[str]) would help us easily parse the answer and citations.

However, by adding more functions we can enrich our app without having to do extra prompt engineering or hacking unnecessary code. For example, you could add couple of more function calls which take the answer generated by the LLM, do a fact check against fact checking websites, modify the answer as required and then send it back to the user. All of this would fit very easily via a chain of function calls where the LLM decides which should be called when.

abhinav-upadhyay avatar Jun 17 '23 15:06 abhinav-upadhyay

Thank you for reading and your comment.

abhinav-upadhyay avatar Jun 17 '23 15:06 abhinav-upadhyay