Agent as a service #16614
Replies: 3 comments
-
@qingtian1771 you experimented with Lang graph? got any insights? |
Beta Was this translation helpful? Give feedback.
-
@AdithiyaG ,yes, I learned Langgraph, I think it is great for special artificial intelligence (SAI), but we still need a General Artificial Intelligence (GAI). Langgraph is a state machine. A designed graph is suitable for handling a certain type of problem. However, a key problem is that you don't know what questions users will ask, so you must design an architecture that can handle them all.So the cricital problem is: How to design an architecture for all kinds of question? Maybe there are two kinds of methods: Let's talk about first solution. Before answering the user's question, we need to analyze the user's question. Maybe we need to ask some of the following questions about the user's question:
All of above problems need to think before agent answer user's question. Problems vary greatly, and so do solutions. so the structure of the state machine should change as the problem changes. This method seems complicated and costly, maybe it is not the best solution, but we can still explore how to dynamically build the graph, which is the structure of the state machine. At present, langgraph is hard coding, the state machine sructure is fixed and is represented by code. and how to make it dynamic, maybe we need three steps:
Dynamic graph is complicated, Let't talk about second solution: Create universal agents architecture. First, let's give an example to explain what is an intelligent unit. This intelligent unit looks like a tool, but actually it is a graph, it is a state machine. it can be registed on the web and other intelligent units can use it. for example, General Intelligent Unit (GIU, it is General Artificial Intelligence above :-) ) can use it to help user write a kind of document, maybe the chat like following: User to GIU : Hello, I want to write a rent agreement. GIU search on the web, and find a intelligent unit called "Document Writing Assitant" (DWA) which can be help to finish this task, so the GIU ask DWA for help. GIU to DWA : user ask me to write a rent agreement, could you please help? user send some example documents to GIU, and GIU send these documents DWA GIU to DWA : user provide these example documents. when user finished all of question GIU to DWA : following are questions and answers: {questions and answers} During the entire communication process, the user is unaware of the existence of DWA. The user just talks to the GIU and the problem is solved. @hwchase17 and @hinthornw , maybe have a look. Thanks! |
Beta Was this translation helpful? Give feedback.
-
GAI and SAI
What will the artificial intelligence that the world finally presents look like? Do future artificial intelligences have anything in common? I think one of the common features is the use of artificial intelligence through dialogue. In the future, you can complete the following tasks through dialogue:
If the above tasks can be achieved through dialogue, then do we need a lot of dialogue applications to achieve it? Or implement all functions through a unic conversational application?
My idea is to implement all functions through a general conversation application, but in fact this general conversation application does not complete specific tasks. It just acts as a proxy and forwards user requests to other specific conversation applications, and then send feedback from the specific conversation application to the user.
In fact, this general conversational program is not just an agent, it does many other things. We can think of it as a personal assistant, and we can give it a name: General Artificial Intelligence (GAI), with the opposite name is: special artificial intelligence (SAI), which is used to complete a specific task, for example designing a three-dimensional model.
General Artificial Intelligence (GAI) mainly accomplishes the following tasks:
Special artificial intelligence (SAI) mainly accomplishes the following tasks:
The conversation between GAI and SAI can be completed through a protocol. Let's first give an example to illustrate what a protocol is.
For example, in the FastAPI library in python, the client (which can be a browser) accesses the interfaces exposed by a FastAPI application through the http protocol. These interfaces can be GET, POST, UPDATE, DELETE, etc. for something. This is a kind of protocol.
Similarly, the conversation between GAI and SAI is similar to the above dialogue. GAI and SAI use language (analogous to the http protocol above) to dialogue, but not all languages can be used. SAI can only understand its field related content (analogous to the interface exposed by the FastAPI application), GAI completes a task through conversataion with SAI, such as completing the design task of a three-dimensional model.
But GAI doesn't know what to say to SAI before the conversation. The actual situation is that SAI tells GAI how to talk to SAI. It can be understood that SAI sends a prompt to GAI. After GAI gets this prompt, it knows how to talk to SAI. During the conversation with GAI, SAI continuously sends new promts to GAI according to the content of the conversation to control the direction and content of the conversation.
The basic process is that the user talks to GAI, GAI talks to SAI, GAI feeds back the results of the dialogue to the user, and the user continues the dialogue with GAI.
The advantage of blocking users from direct conversations with SGI is that it prevents users from sending things to SAI that it cannot understand, causing confusion in the conversation.
How to design a SAI.
Let's imagine an example to see how an SAI is designed. Let's still use this 3D model design SGI. The function of the 3D SAI is that users can interactively design a 3D model, such as a mug or a bicycle.
Usually, users use 3D design software, such as AutoDesk, SolidWorks, etc., to do interactive design. Users use the mouse and keyboard to communicate within the interface of the 3D design software. Behind this interaction, there are actually commands one by one. For example, adding an R3 corner to a certain part corresponds to a command.
Therefore, a three-dimensional model can correspond to a command sequence, and the result of executing this command sequence is the 3D model. So, "3D model = command sequence".
This command sequence can be understood as a piece of text, which is the context of the conversation, and then the large language model can be used to modify this text. The prompt template used for modification may be designed like this:
"
Modify the following model based on user input, and the output results are displayed in the result:
model: {command_sequence}
user input: {input}
result:
"
When using, fill in the variables in the promt template and send it to the large language model, then you can expect the large language model to output the desired results. But one problem here is that there may be no command sequence in the training data of the large language model, and the output results may be incorrect. There may be two ways to deal with this problem:
Use RAG to get some examples and add them to the prompt.
The language model is fine-tuned to adapt to the generation of command sequences.
The above is just a brief discussion of how to make an SAI. The specific process should be much more complicated than this. From a business perspective, there will be some SAI providers in the future, perhaps a certain 3D design software manufacturer, who developed an SAI and put it online so that it can be discovered and used.
SAI based on this architecture is actually a service. This service is used through dialogue, thus avoiding the complexity of using API or software interface. Interacting with SAI through GAI can ensure the accuracy of interaction. The result is that the design of SGI becomes simple, and it does not need to handle many abnormal situations.
As you can imagine, this Agent as a service approach can be used in a wide range of applications, and may even change the world.
Beta Was this translation helpful? Give feedback.
All reactions