Getting trustworthy results from AI - the "RAG Triad"

Neil McKechnie • Jan 16, 2024

Three-step process to improving answer accuracy and trustworthiness

With the widespread adoption of AI coming this year, many people have correctly raised concerns about trust. How can we ensure the answers and actions it provides us are accurate, fair, relevant and trustworthy?


There are already a variety of safeguards and approaches and more coming. Today I'll describe the "Triad" applied when coupling your own data source with a Large Language Model, as I described in my last post. (The Triad was first proposed by an AI safety company called TruEra in late 2023.)

Three components of the Triad


When a question is posed to AI, this Triad approach proposes we test the results three ways before emitting them to a human:


  • Context Relevance
  • Groundedness
  • Answer Relevance


Humans do this initial testing but the AI itself can be trained to do a great job in most scenarios, with humans monitoring on an ongoing basis.


1. Context Relevance


Is the content that AI responds with, relevant to the query?


Suppose you ask an AI chatbot at a sporting goods website for "find breathing equipment used in underwater activities and provide a price" (an example used at a recent Microsoft AI conference in San Francisco). It has access to all the product details in the store's catalog.


Let's say AI first responded with wetsuits, fins, snorkels, personal submarines and scuba tanks. A pretty good start clearly understanding the importance of "underwater" in the query. It might have also picked items like bike helmets and basketballs because there was some relevance to the words "equipment" and "activities".


By filtering at this stage for Context Relevance, AI will remove "bike helmets" and "basketballs" from the results, leaving only items that are commonly used underwater. A definite improvement over the initial results.


2. Groundedness


Is the response supported by the context of the query?


For each and every "claim" made by the AI in the response, independently search for evidence that supports each claim, especially as it relates to the "context" of the query. Each claim must be supported by a highly relevant citation.


Continuing our sporting goods example, for the products remaining in AI's response (wetsuits, fins, snorkels, personal submarines and scuba tanks), AI must include a link to the original product details page found in the company's catalog, verifying the product name, type and price.


But "personal submarines" cannot be supported with a citation because it is not in the store's product catalog - they don't sell those. So it will be eliminated from the response.


And "fins" are out of stock and don't currently have a price in the listing, so those can also be eliminated from the response, because the user specifically said they are looking for pricing.


After this second stage of filtering, we can see the response is getting even more trustworthy. But we still have one more step to go in the Triad.


3. Answer relevance


Does the overall response, and every claim in it, provide an answer to the original question?


Before emitting the answer to the user, we perform one more audit of the results to make sure all aspects of it are relevant to the question.


In this stage, AI recognizes "breathing" in the query and it knows that only "snorkels" and "scuba tanks" relate to that part of underwater activities. It now eliminates "wetsuits" from the results.


A trustworthy, accurate response to the user


Now that the results have passed through all the components of the Triad, the user gets highly relevant, accurate and trustworthy responses to their initial question.


Applying the Triad approach to I&R


In this simple example, instead of looking for snorkels and scuba tanks, the same approach can be used for finding service referrals to help seekers. For queries like these:


  • "I'm hungry where can I get free food in downtown Houston"
  • "Summer camps for 10 year old boys with autism"
  • "What free day cares are open Wednesday afternoon"
  • "Avoiding eviction for veterans in San Diego"


...Yanzio's tools will pass them all through the Triad to ensure the best possible results.


In future blog posts I'll discuss some of the many other approaches and safeguards that greatly increase the trustworthiness and accuracy of AI.


By Neil McKechnie 14 May, 2024
Got 8 minutes? Let Fake Ryan Gosling explain how LLMs work (link below)
By Neil McKechnie 09 May, 2024
A fascinating new report by Microsoft and LinkedIn shows widespread AI adoption amongst knowledge workers globally
By Neil McKechnie 30 Apr, 2024
Integrate our AI Assistants into your primary software systems
Share by: