Parallel Query Retrieval (Fan Out Architecture)


Let’s first understand what a basic RAG Retrieval-Augmented Generation looks like.
Why do we need Parallel Query Retrieval?
The above diagram explains how the flow of the User question leads to the answer.
Although this flow works well, it has its flaws, too. The user is not always able to ask the correct question, or sometimes wants to have some more information regarding the topic.
Let’s try to understand with an example. If the user asks the question,
“What is AI? “. This question is not very descriptive and does not explain the what and why users may be asking this question.
“What is Python? “. This question is even worse than the above one. As it can lead to multiple paths. Maybe be user is talking about the Python language, or maybe literally about the 🐍.
To try to solve this kind of problem, and mainly to provide more relevant information in the answer, we use Parallel Query Retrieval. This also increases the accuracy and chances of the relevant answers.
What is Parallel Query Retrieval
This technique is to create similar questions relative to the question of user. In this, we ask NLP to generate similar questions. Let’s say 3 more questions, and each question covers the same path to reach the relevant content.
For example:
“What is AI”. For this, NLP will generate 3 more questions, which may look like
How does AI learn and improve its performance over time?
What are the main types of artificial intelligence, and how do they differ?
In which industries is AI most commonly used today, and what are some real-world examples?
As we can see, the generated questions cover more area and provide more detailed answers. (The above example is generated by the AI)
Below is the diagram of the data flow
In all this, we forgot why it is called Fan Out Architecture
Understand Fan Out Architecture:
"Fan out" typically refers to the concept in electronics and computer science where a signal or data stream is transmitted from one source to multiple destinations.
This is the article that explains in detail what Fan Out Architecture in detail.
Subscribe to my newsletter
Read articles from Shivank Mittal directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
