On the subject of LLM safety, we thought of: OWASP Top 10 LLM Applications, Llama Guard, and Lighthouz AI from varied angles.At this time, I am going to discover NeMo Guardrailis an open supply toolkit developed by NVIDIA to simply add programmable guardrails to LLM-based dialog methods.
How is the NeMo Guardrail totally different from the Llama Guard that we detailed final time? Previous article? Let’s evaluate the options aspect by aspect.
As you possibly can see, Llama Guard and NeMo guardrails are basically totally different.
- Llama Guard is a big language mannequin and enter/output safety mannequin that has been fine-tuned from Llama 2. It comes with six insecure classes, which builders can customise by including further insecure classes to swimsuit their enter/output moderation use circumstances.
- NeMo Guardrails is a extra complete LLM safety toolset that gives a broad set of programmable guardrails to manage and information LLM enter and output. This consists of content material moderation, subject steering to steer conversations towards particular matters, and anti-hallucinations to cut back the technology of counterfactual info. Inaccurate or nonsensical content material and response formation.
Let’s check out the implementation particulars of how you can add NeMo guardrails to a RAG pipeline constructed with: RecursiveRetrieverSmallToBigPack, LlamaIndex’s superior search pack. How does this pack work? It takes a doc and breaks it down into smaller components (youngster chunks), beginning with a big part (mum or dad chunk). Hyperlink every youngster chunk to its mum or dad chunk.

