Back to search

Chalmers University of Technology

Real-time Relevance: RAG with Dynamic Context for Improved Natural Language Responses

Abstract

dc:description.abstract

Today’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 × 5

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Coursecode
DATX05

Chain of custody

source
Harvested from
Chalmers University of Technology
Base URL
odr.chalmers.se/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Landgren, Malte; Giljegård, Oskar. Real-time Relevance: RAG with Dynamic Context for Improved Natural Language Responses. H thesis, 2024. https://hdl.handle.net/20.500.12380/308927