Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: How to adapt Guardrails in a project #656

Open
AadarshBhalerao opened this issue Jul 31, 2024 · 3 comments
Open

question: How to adapt Guardrails in a project #656

AadarshBhalerao opened this issue Jul 31, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@AadarshBhalerao
Copy link

AadarshBhalerao commented Jul 31, 2024

Hello!

I have a general question. With the documentation of nemoguardrails available online I understand the setup and working of guardrails. My question is I just want to use guardrails as input, output and dialague flow (.co file). But for the rest of the user queries, we have different projects and the query should flow there. How can I do that? How can I use Guardrails only to check input and output?

For example: If I setup input and output rails as self_check_input and self_check_output.

This is the summary

1. Task `self_check_input` took 0.51 seconds and used 178 tokens.
2. Task `generate_user_intent` took 1.51 seconds and used 553 tokens.
3. Task `generate_next_steps` took 0.85 seconds and used 449 tokens.
4. Task `generate_bot_message` took 0.84 seconds and used 610 tokens.
5. Task `self_check_output` took 0.19 seconds and used 195 tokens.

What If I just want 'self_check_input' to give me confirmation that the input is okay to proceed further and 'self_check_output' later to inform output is okay to be shared with user.

@AadarshBhalerao
Copy link
Author

Hi @drazvan and @Pouyanpi Can you guys please check this

@drazvan
Copy link
Collaborator

drazvan commented Aug 6, 2024

@drazvan drazvan self-assigned this Aug 6, 2024
@drazvan drazvan added the question Further information is requested label Aug 6, 2024
@AadarshBhalerao
Copy link
Author

Thanks @drazvan but along with the input and output It doesnt allow me to just use generate_user_intent. Reason why I need that is, in a scenario where I have mentioned company policy in input rail. I still want to check if the question falls in the off_topic category. For That I defined another flow in '.co' file. Name: define flow off topic

Here I have two points:

  1. In cases where the user intent does not match it will give me generate_next_steps and generate_bot_message regardless which I dont want.
  2. If I enter prompt exactly the way one of my off topic is written in .co file, the user intent is still not same to what I had anticipated and mentioned in .co file to catch off topics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants