search
HomeTechnology peripheralsAIGuide to using the ChatGPT plug-in to unlock a new Internet experience

ChatGPT’s knowledge base was trained with data as of September 2021, but by using these plugins, ChatGPT is now able to search the web for the latest answers, thus removing the limitations of relying solely on its knowledge base.

Recently, OpenAI released a new feature of ChatGPT: plug-in system. ChatGPT can now be extended with functionality and perform new tasks, such as:

  • Retrieve real-time information: for example, sports scores, stock prices, the latest news, etc.
  • Retrieve knowledge base information: for example, company documents, personal notes, etc.
  • performs actions on behalf of the user: for example, booking a flight, ordering food, etc.

Guide to using the ChatGPT plug-in to unlock a new Internet experience

ChatGPT’s knowledge base was trained with data as of September 2021, but by using these plugins, ChatGPT is now able to search the web for the latest answers , thus removing the limitation of relying solely on its knowledge base.

Guide to using the ChatGPT plug-in to unlock a new Internet experience

Create custom plugins

OpenAI also enables any developer to create their own plugins. Although developers currently need to join a waiting list (https://openai.com/waitlist/plugins), the files to create plugins are already available.

More information about the plug-in process can be found on this page (https://platform.openai.com/docs/plugins/introduction).

Example code can be found on this page (https://platform.openai.com/docs/plugins/examples).

The documentation only shows how the integration between the third-party API and ChatGPT works. The following article will explore the inner workings of this integration:

"How do large language models perform operations without receiving relevant training?"

LangChain Introduction

Guide to using the ChatGPT plug-in to unlock a new Internet experience

LangChain is a framework for creating chatbots, generative question answering, summaries, and more

LangChain is Harrison Chase (hwchase17) A tool developed in 2022 to assist developers in integrating third-party applications into large language models (LLM).

Borrow the example shown below to explain its working mode:

import os
os.environ["SERPAPI_API_KEY"] = ""
os. environ["OPENAI_API_KEY"] = ""

from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.llms import OpenAI

# First, load the language model you want to use to control the agent
llm = OpenAI(temperature=0)

# Next, load some tools to use. Note that the llm-math tool uses LLM, so you need to pass it in
tools = load_tools(["serpapi", "llm-math"], llm=llm)

# Finally, use the tools , language model and the agent type you want to use to initialize the agent
agent = initialize_agent(tools, llm, agent="zero-shot-react-description", verbose=True)

# Test now
agent.run("Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?")

Three main parts can be seen from this example:

  • LLM: LLM is a core component of LangChain, which helps the agent understand natural language. In this example, OpenAI’s default model is used. According to the source code (https://github.com/hwchase17/langchain/blob/master/langchain/llms/openai.py#L133), the default model is text-davinci-003.
  • Agent: The agent uses LLM to decide which actions to take and in what order. An action can be using a tool and observing its output, or it can be returning a response to the user.

The 0-shot-react-description is used here. From its documentation, we can learn that "this agent uses the ReAct framework and decides which tool to use based entirely on the tool's description." This information will be used later.

  • Tools: Functions that agents can use to interact with the world. In this example, two tools are used:
  • serpapi: a wrapper around the https://serpapi.com/ API. It is used for browsing the web.

  • llm-math: Enables the agent to answer math-related questions in prompts, such as "What is his current age raised to the power 0.23?".

When the script is run, the agent does several things, such as browsing who Olivia Wilde's boyfriend is, extracting his name, asking Harry Style's age, performing a search and using llm-math The tool calculates 29^0.23, which is 2.16.

Guide to using the ChatGPT plug-in to unlock a new Internet experience

The biggest advantage of LangChain is that it does not rely on a single provider, as documented (https://python.langchain.com/en/latest/modules/llms/ integrations.html).

Why can LangChain provide powerful functions for the ChatGPT plug-in system?

On March 21, OpenAI’s strongest partner Microsoft released MM-REACT, revealing ChatGPT’s multi-modal reasoning and actions (https://github.com/microsoft/MM-REACT).

When looking at the capabilities of this "system paradigm", you can see that each example involves an interaction between the language model and some external application.

Guide to using the ChatGPT plug-in to unlock a new Internet experience

By looking at the sample code provided (https://github.com/microsoft/MM-REACT/blob/main/sample.py), we can see , the implementation of de model tools interaction is done with LangChain. The README.md file (https://github.com/microsoft/MM-REACT/blob/main/README.md) also states that "MM-REACT's code is based on langchain".

Combining this evidence, plus the fact that the ChatGPT plug-in documentation mentions that “plug-in descriptions, API requests, and API responses are all inserted into conversations with ChatGPT.” it can be assumed that the plug-in system adds different plug-ins as proxies tool, in this case ChatGPT.

It is also possible that OpenAI turned ChatGPT into a proxy of type zero-shot-react-description to support these plug-ins (which is the type we saw in the previous example). Because the description of the API is inserted into the conversation, this matches the agent's expectations, as can be seen in the documentation excerpt below.

Guide to using the ChatGPT plug-in to unlock a new Internet experience

LangChain

Conclusion

Although the plug-in system is not yet open to users, it can be experienced using published documents and MM-REACT The powerful functions of ChatGPT plug-in system.

The above is the detailed content of Guide to using the ChatGPT plug-in to unlock a new Internet experience. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
Mean Squared Error: Definition and FormulaMean Squared Error: Definition and FormulaApr 22, 2025 am 10:15 AM

Introduction Mean squared error (MSE), a fundamental concept in statistics and machine learning, is a key metric for assessing model accuracy. It quantifies the discrepancy between a model's predictions and the actual values. MSE's simplicity and e

SQL Server FORMAT() FunctionSQL Server FORMAT() FunctionApr 22, 2025 am 10:13 AM

Introduction Mastering data formatting is essential for any data scientist or analyst. Well-formatted data enhances readability and user-friendliness, ensuring stakeholders can easily grasp insights. SQL Server's FORMAT() function offers powerful ca

What are Grant and Revoke in SQL? - Analytics VidhyaWhat are Grant and Revoke in SQL? - Analytics VidhyaApr 22, 2025 am 10:10 AM

SQL Data Control Language (DCL): Securing Your Database with GRANT and REVOKE Maintaining data security and integrity is critical in relational databases. SQL's Data Control Language (DCL) provides the tools to manage user access privileges, ensurin

McCulloch-Pitts Neuron - Analytics ViidhyaMcCulloch-Pitts Neuron - Analytics ViidhyaApr 22, 2025 am 10:06 AM

The McCulloch-Pitts Neuron: A Foundation for Artificial Neural Networks Biological neurons, the fundamental building blocks of the brain, inspire much of artificial neural network (ANN) research. These biological units, comprising soma, axons, dendr

What is SQL DESCRIBE? - Analytics VidhyaWhat is SQL DESCRIBE? - Analytics VidhyaApr 22, 2025 am 10:04 AM

SQL's DESCRIBE (or DESC) Command: Your Database Table Detective Understanding relational database table structures is crucial. SQL's DESCRIBE command acts as your database detective, providing detailed insights into table composition. At a Glance:

Rajini  : Programming Language Inspired by Rajinikanth - Analytics VidhyaRajini : Programming Language Inspired by Rajinikanth - Analytics VidhyaApr 22, 2025 am 09:58 AM

Rajini , a whimsical programming language born from the iconic dialogues of Rajinikanth, blends coding with pop culture. This playful esoteric language, created by Aadhithya Sankar, isn't meant for serious software development, but offers a unique

Top 40 DBMS Interview Questions and Answers (2025)Top 40 DBMS Interview Questions and Answers (2025)Apr 22, 2025 am 09:56 AM

This article provides a comprehensive guide to database management system (DBMS) interview questions, designed to prepare candidates for various DBMS-related roles. It covers fundamental concepts such as DBMS and RDBMS architectures, normalization t

Excel TRANSPOSE FunctionExcel TRANSPOSE FunctionApr 22, 2025 am 09:52 AM

Powerful tools in Excel data analysis and processing: Detailed explanation of TRANSPOSE function Excel remains a powerful tool in the field of data analysis and processing. Among its many features, the TRANSPOSE function stands out for its ability to reorganize data quickly and efficiently. This feature is especially useful for data scientists and AI professionals who often need to reconstruct data to suit specific analytics needs. In this article, we will explore the TRANSPOSE function of Excel in depth, exploring its uses, usage and its practical application in data science and artificial intelligence. Learn more: Microsoft Excel Data Analytics Table of contents In Excel

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools