-
Notifications
You must be signed in to change notification settings - Fork 409
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
Adding new RAG Chatbot example with llamaGuard and Alignscore integration #720
base: develop
Are you sure you want to change the base?
Conversation
@drazvan for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @abodhankar!
Generally, looks good. However, there are a few issues to solve before we'd be able to merge:
- currently there is no documentation
- the code is not a bot, so it should not be placed under
examples/bots
- given there's also an ingestion part, this would be a better fit for a notebook; the notebook would explain the goal, the ingestion part, and then adding the guardrails; you can place it in
examples/notebooks
; - the config itself (without the python files) can be placed under
examples/configs
; the notebook can copy it from there; - including a 200 pages PDF in the repository is not recommended; can this be downloaded dynamically from somewhere? You can add this part to the notebook as well.
- only one commit seems to be signed. Please configure signing the commits as per the contributing guidelines, and then rebase on top of the
develop
branch. - make sure you link to the documentation about setting up the AlignScore server.
I'll review again once the above points have been addressed.
a49a29b
to
75118dd
Compare
a40b98d
to
eaf9496
Compare
@drazvan Made all the changes as per request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that, langchain_nvidia_ai_endpoints
most recent version only supports langchain 3 which is not currently supported by NeMo Guardrails. We will have it merged to the develop branch latest this week.
@Pouyanpi the example was built using the following dependencies - |
@abodhankar, having the Please run You can then run: pre-commit run --all-files The pipeline is failing because of this. Finally, make sure to sign all of your commits. If you have GPG configured, the easiest way would be to run the following after checking out this branch: git rebase --exec 'git commit --amend --no-edit -n -S' -i origin/develop Also make sure that the it works with the latest state of develop branch (it should). I will merge when the pipeline pass and the commits are signed. Thank you! |
a605786
to
75c40ae
Compare
Hi @abodhankar, I can fix these minor issues (running pre-commit and signing the commits) so that we can merge the PR, would it be OK for you? |
75c40ae
to
b0d9ab3
Compare
sample_conversation: | | ||
user action: user said "Hi there. Can you help me with some questions I have about NVIDIA AI Enterprise?" | ||
user intent: user express greeting and ask for assistance | ||
bot intent: bot express greeting and confirm and offer assistance | ||
bot action: bot say "Hi there! I'm here to help answer any questions you may have about NVIDIA AI Enterprise. What would you like to know?" | ||
user action: user said "What is offered by NVIDIA AI Enterprise?" | ||
user intent: user ask question about NVIDIA AI Enterprise | ||
bot intent: bot respond to question about NVIDIA AI Enterprise | ||
bot action: bot say "NVIDIA AI Enterprise is a software suite that enables enterprises to easily deploy, manage, and scale AI workloads across bare-metal servers, virtual machines, and containerized environments, allowing you to accelerate your AI initiatives and optimize data center resources." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sample conversation format is for Colang 2.0. However, I see that this config does not specify the Colang version, which means it will implicitly use 1.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drazvan I can mention in the Readme.md file that this is explicitly using colang1.0. Will that be good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drazvan Added what I suggested in the above comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abodhankar : the point is that it doesn't make sense to include Colang 2.0 format sample conversation in a Colang 1.0 config.
model_name: "meta-llama/LlamaGuard-7b" | ||
|
||
rails: | ||
input: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reformat this YAML file to use consistent indentation.
"\n", | ||
"The following is the architecture diagram for the NIM-powered RAG pipeline that we are going to build in this tutorial using NVIDIA NIM and NeMO Guardrails.\n", | ||
"\n", | ||
"![Arch Diagram](https://drive.google.com/file/d/17iUW3ReMq5h5aFAb5DvZbtN8B_iEcUVf/view?usp=drive_link)\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diagram is not publicly accessible. Please include the diagram in the repo, next to the notebook, if needed.
Signed-off-by: Aditi Bodhankar <[email protected]>
Added shareable link to the architecture diagram Signed-off-by: Aditi Bodhankar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For the architecture diagram, update the link to point to the image; it still points to the GDrive one;
wget
may not work when running the on mac (as it was the case for me); replace withcurl
command!curl -o ./kb/data.pdf https://docs.nvidia.com/ai-enterprise/latest/pdf/nvidia-ai-enterprise-user-guide.pdf
- The PDF https://docs.nvidia.com/ai-enterprise/latest/pdf/nvidia-ai-enterprise-user-guide.pdf is no longer accessible
- remove
.ipynb_checkpoints
folder; - lowercase for notebook filename for consistency with the other notebooks;
pypdf
package needs to be installed; following the tutorial as is results in import error.- the formatting in the "To understand the config ...." is off (I think the parameters should be a bulleted list)
- there are inconsistencies in the formatting of YAML snippets (the
%%writefile config/config.yml
sections)
I have created a directory for the notebook that has the following -
Now Let me address the comments here -
|
LlamaGuard Alignscore Integration with RAG