iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💭

HumanTool: Using ChatGPT as the Frontend and Humans as the Backend

に公開

ChatGPT plugins are a lot of fun. Since I've been able to use them for a while now, I've been playing around with things like adding ChatGPT plugin support to ChatWP, which I created recently.

On the other hand, even if AI is smart, there are things that only humans can understand. Therefore, as a slightly more sophisticated example than simply making ChatWP plugin-compatible, I created a very simple mechanism to ask questions to the human behind the plugin.

Overview

I used the configuration shown in the diagram below. It consists of a frontend via ChatGPT, and a backend consisting of the plugin and the OTP distribution (a distributed protocol provided by Erlang/OTP) behind it.

I have generalized the architecture of a web system that incorporates AI in this way as the "Divergence-Convergence Pattern."

https://twitter.com/kentaro/status/1641652292079472642

https://twitter.com/kentaro/status/1641653293486321665

This article is also an example of that.

Usage

  1. First, start the server that acts as the plugin.
iex --sname plugin@localhost -S mix
  1. Install the above plugin as a localhost plugin from the ChatGPT UI.
  2. Start the interface for the human to answer questions.
iex --sname human@localhost lib/human_tool/human.ex
  1. When you ask a question through ChatGPT, the question will arrive at the console in step 3, so please provide an answer as the HumanTool.

The following video summarizes this, so please check it out as well.

https://youtu.be/zt0zXF1cMPg

Conclusion

Incorporating humans into the Chain of Thought itself is supported by LangChain. The key points here are:

  • I configured the system with different communication protocols and technologies to clearly distinguish the frontend and backend.
  • I conducted a preliminary experiment to do more interesting things in the future using the OTP distribution protocol.

That's about it. I plan to apply the configuration shown here to various things in the future.

GitHubで編集を提案

Discussion