APAI 2i11 - Encoding is all you need
Data bound, domain aware, 100% ZERO hallucinations AI applications
The first tweet I made via the NeuralDreams account on the Twitter/X.com platform was in response to
‘s own tweet that mentioned NeuralDreams and a discussion we had in the SmallBets Discord community:The topic of zero hallucinations is something that I cover very often with many customers, I thought I’d capture the basics in a permanent space.
Note: The title “Enconding is all you need” references the paper titled “Attention is all you need”. This paper can be found on Arxiv - “Attention is all you need”. The paper is considered a seminal doc in the contemporary AI craze.
Table of Contents - Domain Aware AI Bots & 5Ws:
Domain Aware applications
Who is the customer (typical use case)
What is the problem with current AI service chatbots
What is the proposed solution
What is the new user experience (based on the proposed solution)
What is the measure of success
1. Domain Aware Applications
Domain aware chatbots, service & product recommendation AI chatbots and conversational and automation chatbots are exploding since last year (2023) and now in 2024 there’s no slowing down. Such domain aware and data bound AI chatbot that does service & product recommendation must have following data centric functionality:
must be domain aware; that means, if an ecommerce shop sells shoes, then the AI chatbot must know about shoes but does not need to have knowledge about cooking or farming.
must be data bound; that means, if an ecommerce shop sells women’s sneakers and boots from company ACME Sports, then the AI chatbot does not need reference competing brands products.
must have zero hallucination - I mean 100% ZERO hallucinations. One thing is to have a chatbot reference a competing brand, another is for the AI Chatbot to mention fictional brands or completely make up discounts the company is not actually offering.
2. Who is the customer (typical use case)?
The typical customer persona (or typical use case) is an individual who wants:
search/retrieve information from a service/system/datasource
uses a natural language to query the system (instead of keywords)
user expects to receive consistent, deterministic data (ie, if the user makes the same query 2-3 times in a row, with the same input data, then the result will be the same).
For example:
Online fashion shop allows customers to search for outfits. Customer searches in full sentences for “spring outfits, shirt and pants, made of sustainable cotton at least 80%, that are on sale”. Customer expects in the end to see a list of various outfits he/she can purchase from the online shop.
3. What is the problem with current AI powered chatbots
The problem with the current AI powered chatbots offering a plethora of products and service recomendations is that the chatbots hallucinate and lie with authority.
As an ELI5 (explain like I am 5) explanation, when you ask ChatGPT (or your typical LLM based on BERT) a question, there are 2 main things that happen:
The LLM must undertand what you are trying to say (the encoding part)
The LLM will predict/generate what it thinks the answer should be (the decoding part).
First part is the NLP (natural language processing) section that “understands” what you are trying to say - it breaks things down into tokens, etc. The second part is the part where the LLM generates an answer.
The problem is, when the LLM responds, that is when it goes off the rails.
What is the proposed solution
The solution is to eliminate the part that hallucinates: the decoder portion.
The input of the system is still the conversational portion of a chatbot. The user question is processed as such:
Use classifiers to identify UCIS (user context, intent & sentiment)
Perform similarity search in vectorstore (using the metadata classifier filters)
Return results directly to user.
Optional (see below video demo)
You can still have the answer conversational portion of a chatbot using an LLM, however the inputs and outputs are 100% decoupled. ie, the LLM is only told of the classifier UCIS as input. Additionally, it is recomended the LLM output is ran through another classifier filter to ensure it passes ethical and internal policy governance.
4. What is the new user experience (based on the proposed solution)
Prepare the data to be returned. search, then display to the user.
The data/result does NOT go to an LLM at all, it is returned directly from your data bound systems.
A video is worth 1million words.
Here is a video of the alpha MultiAgent retail demo of the NeuralDreams recomendation system:
The coversational AI is contextually managed by a governor workflow engine (NeuralFlow) - the system identifies the proper context in realtime, calls the appropriate AI agent - there’s an unlimited number of agents.
There’s also a multi-layered stacked set of datasources that will waterfall by default - quick answers, medium detailed answers and deep-search answers.
For example, for a product database this can map to : deals of the moment, inventory at prefered store, all inventory at all locations.
5. What is the measure of success
You lose customer trust if the recomendations are made up.
For AirCanada, the measure of success is reasonably simple: the customer service chatbot must only offer discounts and legally binding advice from a vetted AirCanada official policies.
For everybody else the measure of success is this:
Any query a customer makes, product, services & data points overall are 100% retrieved from a vetted, clean database. Based on the system design, there must be zero chance for the hard data (products, services, etc) to come from anywhere else.
100x queries with the same criteria must result in the same product/services/data results. As in the AirCanada example, if a second customer came the next day, asked the same question, he/she must receive the same answer.
Which one topic are you most interested next:
Creative Assistance (personalized and relevant results)
Conversational commerce (high engagement/conversion)
Customer Service Automation (chatbots that don’t go off the rails)
If you are interested to learn how to apply this advice to your own business case, contact me (DM me on Substack) or message via the button:
or go to the NeuralDreams “contact” form and leave a message.
100% resonates, thanks for this, and for mentioning me Matt!
Btw I'm mostly interested in Creative Assistance..