Coder Social home page Coder Social logo

On Adding Custom Actions about nemo-guardrails HOT 3 OPEN

nvidia avatar nvidia commented on July 18, 2024
On Adding Custom Actions

from nemo-guardrails.

Comments (3)

drazvan avatar drazvan commented on July 18, 2024

Can you provide the server logs? This will help us figure out what is going on.
I can't say I'm spotting anything wrong at first sight. Do you have at least an example for asks about invoice details included in the config?

from nemo-guardrails.

PetreanuAndi avatar PetreanuAndi commented on July 18, 2024

I did what you asked, added an example of the entire flow in sample_conversation.
what happens now is even weirder :

sometimes it does go into the action check_fulfilment, but only once (doesn't loop over the fulfilment flow in the while even if check_fulfilment always returns True)

execute check_fulfilment
# The result was True
bot responds about invoice details

sometimes, after restart of the CLI agent, without changing anything to co / config structure, it doesn't go into the action check fulfilment, although it adds it to dispatcher.

I can confirm from the verbose server that in both cases the action is added to the dispatcher.
INFO:nemoguardrails.actions.action_dispatcher:Initializing action dispatcher
INFO:nemoguardrails.actions.action_dispatcher:Adding retrieve_relevant_chunks to actions
INFO:nemoguardrails.actions.action_dispatcher:Adding check_jailbreak to actions
INFO:nemoguardrails.actions.action_dispatcher:Adding output_moderation to actions
INFO:nemoguardrails.actions.action_dispatcher:Adding wolfram_alpha_request to actions
INFO:nemoguardrails.actions.action_dispatcher:Adding check_fulfilment to actions

I'm trying to formulate some intuition here :

Is it the case that the underlining GPT model can chose to do the action or not on his own, depending on the conversation? This would suggest that the flow example is only acting as a reference but is not totally enacted during live usage, and some non-determinism might still occur. Bobbing my head. PS : also sent you guys an email.

from nemo-guardrails.

trebedea avatar trebedea commented on July 18, 2024

@PetreanuAndi , have you checked whether the generated canonical forms for the user messages are the ones you have used in your defined flow?

user asks about invoice details
$fulfilment_invoice_details = execute check_fulfilment()
user responds to fulfilment credentials
$fulfilment_invoice_details = execute check_fulfilment()

If the generated canonical forms are different, there is no guarantee that the check_fulfilment action will be called. If the generated canonical forms are similar (using the embeddings) to the two ones (e.g. user asks about invoice details and user responds to fulfilment credentials) then there is a greater likelihood the next generated system action will be check_fulfilment.

Do you have any examples for the user canonical forms you have defined? Can you put here the complete set of .co files?
The sample conversation might be useful, but it is more important to have several examples for all user canonical forms that guide your flows.

from nemo-guardrails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.