본문 바로가기
IT/Etc

GPT flow - gpt agent

by 조병희 2023. 4. 21.

https://gptagent.notion.site/Agent-Docs-f72c91ab92db46efb4949af4893da778

 

Agent Docs

Table of Contents

gptagent.notion.site

아래 그림과 같이 블록을 기반으로 GPT를 쉽게 어플리케이션 처럼 사용할 수 있게 합니다. 이 어플리케이션은 기능별로 다른 블록들의 집합체로 생각할 수 있습니다. 각 블록은 결과를 출력하며, 이후 앱의 흐름에서 선택되어 다른 블록으로 전달될 수 있습니다.

각 앱의 핵심 구성 요소는 LLM 블록입니다. 이 블록은 대량의 텍스트 데이터셋으로 훈련된 인공지능 유형에 대한 연결이며, 높은 숙련도와 일관성으로 인간과 유사한 언어를 생성할 수 있습니다. prompt engineering은 LLM과 상호작용하고 효과적인 앱을 만들기 위한 중요한 전략입니다. prompt engineering에 대한 최상의 실천 방법은 여기에서 확인할 수 있습니다.

마지막으로, 웹 검색 및 웹 스크래핑 블록, 통합을 통한 Discord 및 HTTP 블록과 같은 도구에 액세스 할 수 있도록 LLM을 Agent로 전환할 수 있습니다.

Creating an app

Think of Agent as a set of building blocks, each with a different functionality. Every block outputs a result which can then be selected and passed into further blocks in the flow of an app.

The primary component of each app will always be the LLM block — a connection to a type of artificial intelligence that is trained on a massive dataset of text and is able to generate human-like language with a high degree of fluency and coherence. Prompt engineering is a key strategy for interacting with LLMs and creating effective apps. You can read up on prompt engineering best practices here.

Finally, you can turn an LLM into an Agent by giving it access to tools like the internet through the Web search & Web scrape blocks, Discord through our integration, and any other open-structure application through our HTTP block.

Example of a complicated Agent app (example app reproduction of John Nay’s LLM Lobbyist)

Block types

Data block

  • Input
    • The “Input” block allows you to enter in text to pass into other blocks. For example, if you are building a recipe generator in which you provide three ingredients and prompt the LLM to come up with a recipe, you can use “Input” blocks to pass in different ingredients without having to directly change your prompt each time.

Logic & coding blocks

  • Run function
    • The “Run function” block executes Javascript code written by the user. It is generally used to post-process & clean outputs from blocks including “LLM_COMPLETE” and “Web scrape”.
  • If (coming soon)
    • The “If” block is a control flow block that allows you to execute another block or set of blocks if the Javascript eval condition is met. The blocks that will be executed if the condition is met should be added between the blocks labeled “If” and “END_IF”.
  • Repeat (coming soon)
    • The “Repeat” block is a block that allows you to repeat another block or set of blocks however many times as specified. The blocks that will be executed should be added between the blocks labeled “Repeat” and “End Repeat”.

LLM block

  • LLM
    • The “LLM” block provides a connection to Large Language Models (LLMs) like OpenAI’s GPT-3. Think of “LLM” as ChatGPT — the LLM block will provide a similar result as if you were entering the same information into ChatGPT. You can edit the source and configuration of the model in the “Configuration” settings. The ”Prompt” field is used to prompt, or give instructions to, the model.

Integrations blocks

  • HTTP
    • The “HTTP” block enables you to easily make an HTTP request to a specified URL using various methods such as GET, POST, PUT, and DELETE. You can also set headers and query parameters in the block. The block is used for interacting with web services and APIs.
  • Web search
    • The “Web search” block returns the top Google search results, including links & webpage snippets, for a given query. One great use case for this block is to find URLs to pass into the “Web scrape” block. The “Web search” block is powered by SerpAPI.
  • Web scrape
    • The “Web scrape” block gives you the ability to extract the contents of any web page using the URL of the page as an input. The “Selector” field refers to the HTML element you would like to target — common selectors are “body” to return the majority of the contents of the webpage, “p” for just the paragraphs or “h1” for the leading headers. It is powered by Browserless.io.
  • Discord
    • The “Discord” block currently lets you send messages into a Discord channel by entering in the Webhook URL for the channel. You can find directions for finding the Webhook URL for a channel here. Soon, we will have a two-way integration setup so you can both send and receive messages to an Agent app — a great way to create AI chatbots.

Passing data from one block to the next

Data does not flow automatically from block to block. To connect blocks together, you must reference the the output of a previous block. To do this, you can copy a reference to the output of the previous block you want to pass into the current block, and then paste the reference into the body of the current block. See the steps below:

Step 1: Use the popup box to select the block you’d like to reference.

Step 2: Then, select the data you’d like to be passed into the current block by clicking. This will copy the reference to your clipboard.

Step 3: Paste (ctrl + v) reference to previous block output into the current block. You are now successfully referencing the previous block’s result — click “Run” in the top right corner of the block to test & make sure you have completed these steps successfully!

Integrations & usage

For now, we are providing default API keys and complementary usage for all integrations including OpenAI models, browserless.io webscraping, and SerpAPI web search. If you would prefer to use your own API keys, you can add your own keys in the Integrations tab.

You may notice there are additional integrations “coming soon” — if you are particularly interested in one of the upcoming integrations, please reach out at team@gptagent.com and let us know!

Discord server

Join the Agent Discord server to get your questions answered, provide product feedback, and connect with others building in AI.

 

'IT > Etc' 카테고리의 다른 글

RATH  (0) 2023.04.26
인텔 맥북 Bootcamp 에서 Windows 11 설치하기  (0) 2023.04.25
ElevenLabs - Voice AI  (0) 2023.04.17
윈도우 11에서 디스크 점유률(사용률)이 높을 때  (0) 2023.03.23
AVEQA 알고리즘  (0) 2023.03.17

댓글