We in Telegram
Add news
March 2010 April 2010 May 2010 June 2010 July 2010
August 2010
September 2010 October 2010
November 2010
December 2010
January 2011
February 2011 March 2011 April 2011 May 2011 June 2011 July 2011 August 2011 September 2011 October 2011 November 2011 December 2011 January 2012 February 2012 March 2012 April 2012 May 2012 June 2012 July 2012 August 2012 September 2012 October 2012 November 2012 December 2012 January 2013 February 2013 March 2013 April 2013 May 2013 June 2013 July 2013 August 2013 September 2013 October 2013 November 2013 December 2013 January 2014 February 2014 March 2014 April 2014 May 2014 June 2014 July 2014 August 2014 September 2014 October 2014 November 2014 December 2014 January 2015 February 2015 March 2015 April 2015 May 2015 June 2015 July 2015 August 2015 September 2015 October 2015 November 2015 December 2015 January 2016 February 2016 March 2016 April 2016 May 2016 June 2016 July 2016 August 2016 September 2016 October 2016 November 2016 December 2016 January 2017 February 2017 March 2017 April 2017 May 2017 June 2017 July 2017 August 2017 September 2017 October 2017 November 2017 December 2017 January 2018 February 2018 March 2018 April 2018 May 2018 June 2018 July 2018 August 2018 September 2018 October 2018 November 2018 December 2018 January 2019 February 2019 March 2019 April 2019 May 2019 June 2019 July 2019 August 2019 September 2019 October 2019 November 2019 December 2019 January 2020 February 2020 March 2020 April 2020 May 2020 June 2020 July 2020 August 2020 September 2020 October 2020 November 2020 December 2020 January 2021 February 2021 March 2021 April 2021 May 2021 June 2021 July 2021 August 2021 September 2021 October 2021 November 2021 December 2021 January 2022 February 2022 March 2022 April 2022 May 2022 June 2022 July 2022 August 2022 September 2022 October 2022 November 2022 December 2022 January 2023 February 2023 March 2023 April 2023 May 2023 June 2023 July 2023 August 2023 September 2023 October 2023 November 2023 December 2023 January 2024 February 2024 March 2024 April 2024 May 2024
1 2 3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
News Every Day |

What is Retrieval Augmented Generation? How it Works & Use Cases

7

Retrieval-augmented generation, or RAG, is a technique for enhancing the output of large language models by incorporating information from external knowledge bases or sources.

By retrieving relevant data or documents before generating a response, RAG improves the generated text’s accuracy, reliability, and informativeness. This approach helps ground the generated content in external sources of information, ensuring that the output is more contextually relevant and factually accurate.

Read on to learn more about RAG, how it works, its use cases, and how it differs from the traditional process of natural language processing (NLP).

What Exactly is Retrieval-Augmented Generation (RAG)?

You’ve probably heard people say that AI-generated content is susceptible to plagiarism and lack of originality. In traditional natural language processing tasks, language models generate responses based solely on patterns and information in their training data. While this approach has shown impressive results, it also comes with limitations, such as the potential for generating incorrect or biased output, especially when dealing with complex or ambiguous queries.

RAG is a technique that addresses this issue by combining the power of both natural language processing and information retrieval.

Imagine trying to write a research paper without access to the Internet or any external resources. You may have a general understanding of the topic, but to support your arguments and provide in-depth analysis, you need to consult various sources of information.

This is where RAG comes in — it acts as your research assistant, helping you access and integrate relevant information to enhance the quality and depth of your work.

Large language models (LLMs) are trained on vast volumes of data. They are like well-read individuals who have a broad understanding of various topics and subjects. They can provide general information and answer various queries based on their vast knowledge-base. But to generate more precise, reliable, and detailed responses backed up by specific evidence or examples, LLMs often need the assistance of RAG techniques. This is similar to how even the most knowledgeable person may need to consult references or sources to provide thorough and accurate responses in certain situations.

To gain a deeper understanding of today’s top large language models, read our guide to Best Large Language Models

How RAG Works in Practice

Retrieval-augmented generation (RAG) is a AI model architecture that combines the strengths of pre-trained parametric models (like transformer-based models) with non-parametric memory retrieval, enabling the generation of text conditioned on both the input prompt and external knowledge sources.

The workability of the RAG model starts from the user query or prompt. The retrieval model is activated when you type your questions into your GenAI text field.

Query Phase

In the query or prompt phase, the system searches a large knowledge source to find relevant information based on the input query or prompt. This knowledge source could be a collection of documents, a database, or any other structured or unstructured data repository. It could also be your company knowledge base.

For example, if the input query is “What are the symptoms of COVID-19?” the RAG system would search and retrieve relevant information from a database of medical documents or articles.

Retrieval augmented generation (RAG) diagram.
Image: AWS

Retrieval

Once the relevant information is found, the system selects a set of candidate passages or documents likely to contain useful information for generating a response. This step helps filter out irrelevant or redundant information and only picks the most relevant answer to your question.

In the COVID-19 example, the system might select passages from medical articles that list common symptoms associated with the disease.

Generation Phase

In the generation phase, the result is returned to the user. RAG uses the selected candidate passages as context to generate a response or text.

This generation process can be based on various techniques, such as neural language models (e.g., GPT) or other generation architectures. The generated response should be coherent, relevant, and informative based on the input query and the retrieved context.

3 Key Benefits of RAG

Reduction of Response Bias

RAG systems can mitigate the effects of bias inherent in any single dataset or knowledge repository by retrieving information from diverse sources. This helps provide more balanced and objective responses as the system considers a broader range of perspectives and viewpoints. By promoting inclusivity and diversity in the retrieved content, RAG models create fairer and more equitable interactions.

Reduced Risk of Hallucinations

Hallucinations refer to the generation of incorrect or nonsensical information by large language models. RAG systems mitigate this risk by incorporating real-world information retrieved from external knowledge sources.

By retrieving and grounding responses in verified, external information, RAG models are less likely to generate hallucinatory content. This reliance on external context helps ensure that the generated responses are grounded in reality and aligned with factual information, reducing the likelihood of producing inaccurate or misleading output.

Improved Response Quality

The RAG technique can generate relevant, fluent, and coherent responses by combining retrieval and generation techniques, leading to higher-quality outputs than purely generative-based approaches. Clearly, even the best LLM has its limitations – RAG is the technology needed to add a deeper knowledge base.

When to Use RAG vs. Fine-Tuning a Model

This chart summarizes the considerations for choosing between RAG and fine-tuning an AI model based on various aspects.

Criteria RAG Fine-Tuning a Model
External knowledge access Suitable for tasks requiring access to external knowledge sources. May not require external knowledge access.
Knowledge integration Excels in integrating external knowledge into generated responses, providing more comprehensive and informative outputs. May struggle to incorporate external knowledge beyond what is encoded in the fine-tuning data, potentially leading to less diverse or contextually relevant responses.
Performance trade-off Offers a trade-off between response latency and information richness, with longer response times potentially resulting in more comprehensive and contextually relevant outputs. Provides faster response times but may sacrifice some degree of contextual understanding and knowledge integration compared to RAG.
Nature of task Suitable for tasks requiring access to external knowledge sources and contextual understanding, such as question answering, dialogue systems, and content generation. Ideal for tasks where the model needs to specialize in a specific domain or perform a narrow range of tasks, such as sentiment analysis or named entity recognition.
Interpretability Offers transparent access to retrieved knowledge sources, allowing users to understand the basis for generated responses. Low interpretability.
Latency requirements Retrieval process may introduce latency, especially when accessing large knowledge sources, but generation itself can be fast once the context is obtained. Generally faster inference times, as the model is fine-tuned to the specific task and may require less external data retrieval during inference.

How is Retrieval-Augmented Generation Being Used Today?

Question Answering Systems

RAG models are used in question answering systems to provide more accurate and context-aware responses to user queries. These systems can be deployed in customer support chatbots, virtual AI assistants, and search engines to deliver relevant information to users in natural language.

Search Augmentation

RAG can enhance traditional search engines by providing more contextually relevant results. Instead of simply matching keywords, it retrieves relevant passages from a larger database and generates responses that are more tailored to the user’s query.

Knowledge Engines

RAG can power knowledge engines where users can ask questions in natural language and receive well-informed responses. This is particularly useful in domains with a large amount of structured or unstructured data, such as healthcare, law, finance, or scientific research.

RAG vs. Traditional Approaches

Traditional question and answer approaches rely heavily on keyword matching for information retrieval, which can lead to limitations in accurately understanding user queries and providing relevant results.

In contrast, RAG offers a more advanced and contextually aware approach to information retrieval. Instead of relying solely on keyword matching, RAG leverages a combination of techniques, including natural language understanding and machine learning, to comprehend the semantics and context of user queries. This allows RAG to provide more accurate and relevant results by understanding the intent behind the query rather than just matching keywords.

Bottom Line: Embracing the Potential of RAG

Retrieval augmented generation holds significant promise for transforming various aspects of natural language processing and text generation tasks. By incorporating the strengths of retrieval-based and generation-based models, RAG can improve the quality, coherence, and relevance of generated text.

Embracing RAG’s potential can lead to more effective and human-like interactions with AI systems, better question answering systems, and enhanced content creation capabilities. This approach can also help address common AI challenges by generating more diverse and informative responses, reducing biases in generated text, and improving the overall performance of language models.

For more information about generative AI providers, read our in-depth guide: Generative AI Companies: Top 20 Leaders

The post What is Retrieval Augmented Generation? How it Works & Use Cases appeared first on eWEEK.

Происшествия

Столичные росгвардейцы оказали помощь пострадавшим в дорожно-транспортном происшествии

Tom Aspinall says UFC 304 start time is ‘awful’ and should be changed as Brit provides update on next opponent

Online Alarm Clock for efficient time management

Tyson Fury vs Oleksandr Usyk undercard: Who is fighting on huge Saudi bill?

5 Things To Remember When A Friendship Ends

Ria.city






Read also

Boston Woman Will Not be Charged Over Four Dead Babies Found in Freezer

Bastian Schweinsteiger reveals Jose Mourinho apologised to him over treatment in his final Man Utd season

'Virat Kohli needs to dictate terms, not anchor, at T20 World Cup'

News, articles, comments, with a minute-by-minute update, now on Today24.pro

News Every Day

13 Crops You'd Be INSANE Not To Plant in May

Today24.pro — latest news 24/7. You can add your news instantly now — here


News Every Day

Tyson Fury vs Oleksandr Usyk undercard: Who is fighting on huge Saudi bill?



Sports today


Новости тенниса
Елена Рыбакина

"Я играю и зарабатываю хорошие деньги, но...". Рыбакина назвала главную проблему в женском теннисе



Спорт в России и мире
Москва

В дивизии имени Ф.Э. Дзержинского Росгвардии стартовал турнир по боксу «Кубок Победы»



All sports news today





Sports in Russia today

Москва

Росгвардейцы обеспечили безопасность во время футбольного матча в Москве


Новости России

Game News

Manor Lords seems surprisingly stable for an early access game, and the developer says: '99% crashes so far are old drivers'


Russian.city


Блоги

XXIII Московский Пасхальный фестиваль проходит при поддержке Relax FM


Губернаторы России
Желдорреммаш

ЧЭРЗ развивает промышленный туризм в рамках Всероссийской акции «Неделя без турникетов»


6 городов России, где можно увидеть белые ночи кроме Санкт-Петербурга

Аудиолог Никита Дикопольцев рассказал о причинах снижения слуха в рамках специальных лекций для проекта «Московское долголетие»

Суд взыскал с актеров Боярской и Матвеева 26 тысяч рублей долга ЖКХ

Героическое участие армян в СВО. Часть третья


Концерт дома детского творчества

Продвижение Музыки. Раскрутка Музыки. Продвижение Песни. Раскрутка Песни.

Баста: «Я ходил в компьютерные клубы в Ростове. Любимый боец в MK – Шан Цунг»

Deep Purple — Portable Door


Елена Рыбакина выступила с критикой в адрес WTA

Увидит ли Париж Мирру из России? Андреева дает жару в Мадриде и включается в олимпийскую гонку

Медведев обыграл Бублика и вышел в четвертьфинал "Мастерса" в Мадриде

Легечка обыграл Надаля и сыграет с Медведевым в 1/4 финала «Мастерса» в Мадриде



Обвалилась кровля На горящем заводе в Москве удалось локализовать огонь

Магнитная буря 2 мая может спровоцировать северное сияние в Москве

«Кубок футбольных мам» прошел на стадионе «Москвич» в Лобне

Продвижение новых песен с высоким результатом


В дивизии имени Ф.Э. Дзержинского Росгвардии стартовал турнир по боксу «Кубок Победы»

Новая работа Чубайса. Из Израиля будет изучать новейшую историю России

Обратиться к Востоку: Иран и РФ прорабатывают запуск платежей в цифровых валютах ЦБ

Тарифы ЖКХ вырастут в России


Более 200 заявок подано на участие в конкурсе «Исследуй город»

700 заявок, увеличение рабочей группы и акцент на практику: BIA Technologies подвела итоги «Школы тестировщиков»

Собянин рассказал о благоустройстве улиц в Орехово-Борисове

Зеленое царство – обзор новостроек рядом с «Лосиным островом»



Путин в России и мире






Персональные новости Russian.city
БГАТОиБ

Выпускники БРХК вновь выступят на одной сцене



News Every Day

13 Crops You'd Be INSANE Not To Plant in May




Friends of Today24

Музыкальные новости

Персональные новости