Agent Generation

Overview

When a system receives an incoming request, it processes this request to generate an extensive prompt. This prompt is then utilized to ensure that the resulting agent accomplishes the specified task and returns the output in JSON format. This comprehensive approach guarantees that the generated agent delivers precise and structured results as required, facilitating seamless integration and further processing of the data.

Parameters

Name
Type
Required
Description

request

string

Request Resume as a JSON

Prompt Example

request = { "type": "agent", "prompt": "analiza el sentimiento del siguiente texto", "params": ["title", "content"], "return": "sentiment" }

Response Object

Name
Type
Description

prompt

string

The generated prompt text

return_example

dynamic

An example of the return value for the agent response

Result Example

{
  "request": "analiza el sentimiento del siguiente texto",
  "return_example": {"sentiment":"POSITIVE"},
  "prompt": "As a Sentiment Analysis Agent, your task is to analyze the sentiment of the following text based on the title and content of the provided text. Your response should be one of the following sentiments: 'POSITIVE', 'NEGATIVE', or 'NEUTRAL'. Return the result strictly in JSON format as {'sentiment': 'value'} where 'value' is one of the above sentiments.\n\n### Input Example:\n{\n  \"title\": \"Great Service!\",\n  \"content\": \"I had a wonderful experience at the restaurant. The staff was friendly, and the food was excellent.\"\n}\n\n### Counterexample:\n{\n  \"title\": \"\",\n  \"content\": \"This place is meh.\"\n}\nExpected return: {'sentiment': 'NEUTRAL'}\n\n### Input to Analyze:\nTitle: \"{title}\"\nContent: \"{content}\"\n\nReturn the sentiment in JSON format as {'sentiment': 'value'}"
}

Last updated

Was this helpful?