Chalmers University of Technology
Real-time Relevance: RAG with Dynamic Context for Improved Natural Language Responses
Abstract
dc:description.abstractToday’s Retrieval Augmented Generation (RAG) systems often struggle when trying to answer questions that require complex multi-hop reasoning. In this thesis we investigate an autoregressive Large Language Model (LLM) architecture which can generate a real-time relevant dense search vector for every token generation step. To facilitate this we also develop a synthetic data generation technique to acquire search query vector labels on a token-by-token level, requiring only a generating LLM and a document database. We investigate the quality of the synthetic data, and provide an attention based relabeling method which decreases hallucinations, improving the correctness of the labels by 67%. The architecture is able to produce query vectors 27 times faster than a separate embedder at the cost of retrieval accuracy. Finally, we train and employ the model in an active retrieval question-answering setting.
Degree
thesis:*- Level thesis:degree_level
- H
- Department dc:contributor.department
- Chalmers tekniska högskola / Institutionen för data och informationsteknik
- Year dc:date.issued
- 2024
Author and committee
dc:creator, dc:contributor.*- Authors dc:creator
-
- Landgren, Malte
- Giljegård, Oskar
- Advisor dc:contributor.supervisor
-
- Johansson, Richard
- Committee member dc:contributor.committeemember
-
- Johansson, Richard
Subjects
dc:subject × 5Rights
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Coursecode
- DATX05