36
Views
1
Comments
[AI Agent Builder] How to customize response from CallAgent server action?
AI Agent Builder
Forge asset by OutSystems
Application Type
Reactive

Hello all,


I successfully connected Azure Open AI and the database (from Azure) on AI Agent Builder portal/app.

I have a question if it's possible to customize the response that we get from CallAgent server action which library is exposing.

Here is what I have so far:

  • From Azure side: We have a container with excel files (at the moment only one) with model, name and price of several products. Index and Indexers are done and connected with AI Agent Builder.
  • On app/ODC side: we have an random app just calling server action "CallAgentV2", which is returning responses pretty fine, but we would like to customize that response.

An example:

"User: I would like a list of Hi-Fi products.

AI Agent: Sure, here what we have:

         - Headphones

         - Headsets 

         - (...)"


The list of that response, should be a JSON, which should be customizable like Id and the name (at least).


How is it possible to achieve this?


Many thanks in advance.

2021-11-19 11-12-44
Rui Mendes

Hello @Joel Ponte,

I use an instruction in my request to my model to respond with the data formatted in JSON. 

You should provide it with an example so it knows what structure you want, and since it can sometimes hallucinate, you should emphasize that the response must comply with the given example.  

If you need more help, just let me know. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.