Agents
When setting up your pipeline, you can integrate any connected model by using their corresponding Agent node in the canvas.
To set up your Agent node in a pipeline canvas:
- Create a new pipeline, or edit an existing one.
- From the left panel, under the Models tab of the Agents section, click and drag an agent node onto the canvas. You must have at least one connected model.
- In the right panel, you may redefine the model’s parameters through the node’s properties. Any redefined parameters will be maintained even if the connected agent’s parameters are edited in the Agent Hub. If the connected agent’s base model is changed in the Agent Hub, any parameter that was redefined in a pipeline will reset to the connection’s values.
- The Response format and Tools fields are based on the configurations set when connecting the model and aren’t editable. They will be updated in existing pipelines if updated in Agent Hub.
- Enter a prompt in one of two ways:
- In the Agent prompt window – write a prompt for the model to carry out any time the pipeline is triggered. The whole context payload of the node prior to the agent will be included in the prompt.
- In Advanced mode – using JSONPath, you can specify keys from the prior node’s context payload. The values of these keys will be used in the prompt.
Regular prompt
The following example shows the format in which a regular prompt will be sent to the model.
// Your written prompt comes first.
Please rate the answer from the response below.
// Your prompt will be followed by this snippet, which includes the context object of the prior node. This'll be appended to your prompt, you aren't required to add it yourself.
Process the following data:
{
"result": {
"question": "What is the best data labeling software according to G2?",
"response": "SuperAnnotate",
}
}
Advanced prompt
The following example shows the format in which an advanced prompt will be sent to the model.
// The model's Input is the context object of the node prior to the model.
// Your prompt should be formatted as follows, using {$.result.KEY} to specify which keys' values should be included.
Rate the provided response: “{$.result.response}” based on how well it addresses the {$.result.question}. The rating scale is from 1 to 5, where 1 is the worst answer and 5 is the best answer.
Answer only with one number.
// Based on the values, the prompt that the model receives will look like this:
Rate the provided response: “SuperAnnotate” based on how well it addresses the question: “What is the best data labeling software according to G2?”. The rating scale is from 1 to 5, where 1 is the worst answer and 5 is the best answer.
Answer only with one number.
{
"result": {
"item_id": 12345,
"question": "What is the best data labeling software according to G2?",
"response": "SuperAnnotate",
"instruction": "Evaluate factual accuracy",
}
}
Model response
The model’s output will be the context payload of the node that comes next in the pipeline. Examples of the model’s response format can be found here.
Updated about 13 hours ago