Skip to content

Commit

Permalink
fix(docs): fixes screenshots in AV guides and adds autodescription in…
Browse files Browse the repository at this point in the history
…formation in docs
  • Loading branch information
FelixNicolaeBucsa committed Oct 8, 2024
1 parent 9d73996 commit bc5f491
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 18 deletions.
8 changes: 4 additions & 4 deletions pages/guides/agents/intermediate/agent-functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ The **Description** is super important to the success of your Agent Function. Th

Read more and see examples on how to properly set field descriptions by heading over to: [Field descriptions for DeltaV ↗️](/guides/services/field-descriptions-for-deltav) guide.

## Primary and Secondary Functions
## Objective Service and Sub-Service

**Primary** and **Secondary** functions are different but have strong similarities.
**Objective Service** and **Sub-Service** functions are different but have strong similarities.

A **Primary Function** is the primary Agent Function and for instance, it could be an agent that would respond to a user or be accessible via DeltaV. _Primary Functions are expected to fully or partially fulfill an objective provided by users_.
The first one is the primary Agent Function and for instance, it could be an agent that would respond to a user or be accessible via DeltaV. _Primary Functions are expected to fully or partially fulfill an objective provided by users_.

Similarly, a **Secondary Function** is an Agent Sub-function providing secondary services that likely need additional context or information to carry out the Primary Function. _Secondary Functions are executed in combination with the Objective task_. If that's the case, DeltaV would see that the Agent Primary Function can be fulfilled by executing a Secondary Function, thus, it will contact this latter one which may or may not require gaining context directly from the user.
Similarly, a **Sub-Service** function is an Agent Sub-function providing secondary services that likely need additional context or information to carry out the Primary Function. _Secondary Functions are executed in combination with the Objective task_. If that's the case, DeltaV would see that the Agent Primary Function can be fulfilled by executing a Secondary Function, thus, it will contact this latter one which may or may not require gaining context directly from the user.

<Callout type="info" emoji="ℹ️">
DeltaV supports rich text and hyperlinks, enhancing formatting and navigation within the interface. You can include hyperlinks using standard HTML tags for clickable links. For more details, refer to the [guide on rich text and hyperlinks ↗️](/guides/agentverse/agentverse-functions/hyperlinks-and-rich-text-deltav).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,29 @@ For clarity, reinforcing key concepts could be done through repetition of keywor

Consider the following Agent Function:

![](src/images/guides/services/the-importance-of-descriptions/description_1.png)
![](src/images/guides/agentverse/registering-agent-coin-toss/new-service-dialog.png)

Providing a detailed field description for the `num_rolls` data `Model` is important to correctly execute the Function. A well written field description enhances the LLM understanding of the type of Function the user objective requires to be executed. This would help in the accurate interpretation and execution of users' requests.
Providing a detailed field description for the `num_rolls` data `Model` is important to correctly execute the Function. A well written field description enhances the LLM understanding of the type of Function and the user objective requires to be executed. This would help in the accurate interpretation and execution of users' requests.

**It is possible to call additional Secondary Functions from Primary or Secondary ones by specifying this within the field description itself**. For Primary and Secondary Functions network, please refer to the below examples.
It is possible to call additional other **Sub-Services** from either **Objective or other Sub-Services** by specifying this within the field description itself. For additional information on Objective Service and Sub-Service, check the following [resource ↗️](/guides/services/services#primary-and-secondary-functions)

For a network of Objective Services and Sub-Services, please refer to the below examples.

## Auto-description functionality

It is possible for you to generate **auto-descriptions** for your Functions when it comes to deploy them on Agentverse.

You can make use of this functionality by opening your Agent's details by clicking on the Agent's box within the list of Agents available in **My Agents** tab in Agentverse. Then, head over to the **Deploy** tab as shown below:

![](src/images/guides/agentverse/autodescriptions_initial.png)

Here, you will need to either create a **New Function** or **edit an existing one**. This way, you will open your Agent's Function editor, and you will be able to provide/edit the description for what that Function does. It is here where you can make use of the auto-description functionality to fill in such field. At the moment, this functionality is available just for the **Function Description**, but it will be available for **Fields** description at a later stage.

Check out the following screenshot to have a better idea:

![](src/images/guides/agentverse/autodescriptions.png)

By clicking the **Refine** button, the [AI Engine ↗️](/concepts/ai-engine/ai-engine-intro) will automatically generate a description based on the Function details you have provided. You can either provide an initial prompt within the **Description** field to be then refined, or you can auto-generate a description from a nothing and the AI Engine will do this for you by itself.

### Example 1: News Reading System

Expand All @@ -30,15 +48,15 @@ This Function helps user to read news of a specific type. This Function calls a

![](src/images/guides/services/the-importance-of-descriptions/description_2.png)

The field description for the `news` data model describes the news that will be presented to the user. It should be mentioned that it should be always provided by triggering of Secondary Function. In our case, a good field description would be: **Describes the news which will be generate from the "Generate News" secondary function. Always go for "Generate News" secondary function only never ask this field from user. All the news articles generated are presented as strings**.
The field description for the `news` data model describes the news that will be presented to the user. It should be mentioned that it should be always provided by triggering of Secondary Function. In our case, a good field description would be: **Describes the news which will be generated from the "Generate News" secondary function. Always go for "Generate News" secondary function only never ask this field from user. All the news articles generated are presented as strings**.

#### Secondary Function Field Description

This Function helps task to generate news and send it to task or another Secondary Function. Below, there is an example where the users ask for news category they want to read and provide news to Primary Function. For a better understanding, you can find the overall guide for this example [here ↗️](/examples/news-reading-system).

![](src/images/guides/services/the-importance-of-descriptions/description_3.png)

The field description for the `category` data model describes the category for which the user wants to read the news. It should be mentioned that it should be always provided by user. In our case, a good field description would be: **Describes the category provided by user about which he want to get news for. This should always be provided by user in all cases. This primary function responds to "Generate News" secondary function. This should be from options business, entertainment, general, health, science, sports, technology**.
The field description for the `category` data model describes the category for which the user wants to read the news. It should be mentioned that it should be always provided by user. In our case, a good field description would be: **Describes the category provided by user about which he wants to get news for. This should always be provided by user in all cases. This primary function responds to "Generate News" secondary function. This should be from options business, entertainment, general, health, science, sports, technology**.

<Callout type="info" emoji="ℹ️">
_Remember to always include the secondary function trigger in the field description_. This is very important to ensure that the secondary function is being called. When selecting one of multiple secondary functions, you need to use different names for each one of the functions. This way, we avoid confusion for the LLM.
Expand All @@ -65,7 +83,7 @@ The field description for the `response` describes the response to be provided t
Ideal field description for this example will be like:

**model_id:** Always go for model list secondary function. Never ask this field to user.
**query:** Describes the query user wants to ask to the model. Always ask this to user after model_id is given by model list secondary function.
**query:** Describes the query user wants to ask the model. Always ask this to user after model_id is given by model list secondary function.

<Callout type="info" emoji="ℹ️">
Remember to always provide a comprehensive description in `query` field that first we should fetch `model_id` using secondary function before asking `query` to user.
Expand Down Expand Up @@ -103,14 +121,15 @@ Ideal field descriptions for this example will be like:

**location:** This describes the coordinates of the city given in str(lat,long) format.

![](src/images/guides/services/service-guide/business_finder_2.png)
![](src/images/guides/services/service-guide/business_finder_2.png)

2. **Business Finder**: This secondary function takes category and city from the primary function and looks around for 10 business name in that area. Asks user to select one and then sends back to task as name field.

**category:** This is the category provided by the user for which they want to get businesses in primary function business details service, Use this category for task as well.
**city:** This is the city responded by city finder or one given by user.
**category:** This is the category provided by the user for which they want to get businesses in primary function business details service, Use this category for task as well.

**city:** This is the city responded by city finder or one given by user.

![](src/images/guides/services/service-guide/business_finder_3.png)
![](src/images/guides/services/service-guide/business_finder_3.png)

## Agent Function registration examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ There's a little to unpack here, but it's quite simple:

- **Function title**: just the name of your Agent Function.
- **Description**: super important to be as detailed as you can, as reasoning AI Engine looks at descriptions to understand what your Agent Function does.
- **Application**: Primary or Secondary Function. For a detailed definition, check [here ↗️](/guides/services/services#primary-and-secondary-functions)
- **Application**: Objective Service or Sub-Service. For a detailed definition, check [here ↗️](/guides/services/services#primary-and-secondary-functions)
- **Protocol**: it's defined in your `Agent`.
- **Model**: again, we defined that in `simple_protocol.py`.
- **Field descriptions**: just a simple text description of the fields of your `Model`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Creating a simple dice roll agent on agentverse
# Creating a simple dice roll agent on Agentverse

## Introduction

Expand All @@ -15,7 +15,7 @@ Make sure you have read the following resources before going on with this guide:
- [Agents address ↗️](/guides/agents/getting-started/getting-uagent-address)
- [Almanac contract ↗️](/concepts/fetch-network/almanac)
- [Register in Almanac ↗️](/guides/agents/register-in-almanac)
- [Agents running on agentverse↗️](/guides/agents/intermediate/hosted-agent)
- [Agents running on Agentverse ↗️](/guides/agents/intermediate/hosted-agent)

## Create your dice roll agent!

Expand Down Expand Up @@ -68,4 +68,4 @@ Check out the following resources to better grasps all of these concepts:

- [Agentverse Functions ↗️](/guides/agents/intermediate/agent-functions).
- [Agentverse Functions: register your Agents Functions on the Agentverse! ↗️](/guides/agentverse/agentverse-functions/registering-agent-services).
- [Agentverse Functions: register a coin toss agent as a Function 🪙 ↗️](/guides/agentverse/agentverse-functions/registering-agent-coin-toss).
- [Agentverse Functions: register a coin toss agent as a Function ↗️](/guides/agentverse/agentverse-functions/registering-agent-coin-toss).
Binary file modified src/images/agentverse/create-agent/agentverse-myagent_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/agentverse/create-agent/agentverse-myagent_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/agentverse/create-agent/agentverse-myagent_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/agentverse/create-agent/agentverse-myagent_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/agentverse/explorer/agentverse-explorer_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/101/sentimentagent_agent_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/agentverse/agentverse_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/agentverse/mailbox/mailbox_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/agentverse/mailbox/mailbox_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/services/service-guide/business_finder_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/services/service-guide/business_finder_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/services/service-guide/hugging_face_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/guides/services/service-guide/hugging_face_2.png
Binary file modified src/images/guides/services/service-guide/hugging_face_3.png
Binary file modified src/images/guides/services/service-guide/simple_protocol_0.png
Binary file modified src/images/guides/uagent/langchain_function.png
Binary file modified src/images/guides/uagent/servicefordungeons_3.png

0 comments on commit bc5f491

Please sign in to comment.