Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Beyond Vector Retrieval: Evaluating Graph-Enhanced RAG performance in aSystem Architecture Environment
Blekinge Institute of Technology, Faculty of Computing, Department of Computer Science.
Blekinge Institute of Technology, Faculty of Computing, Department of Computer Science.
2025 (English)Independent thesis Advanced level (professional degree), 20 credits / 30 HE creditsStudent thesis
Abstract [en]

Background. Retrieval-Augmented Generation systems have shown promise inenhancing Large Language Models (LLMs) by providing them with up to date andrelevant information. This capability is particularly important in business domainsusing confidential data which the models have not been trained on. For complexdomains such as software architecture simple document databases fail to capture thecomplex relationships between entities. This is why the thesis suggest the use ofa Graph database to represent these connections and improve the overall retrievalprocess.Objectives. The objectives of this thesis are to build and evaluate two RAGapproaches: DocumentRAG, which uses only keyword and vector similarity searchesto find relevant knowledge in a document database, and HybridRAG which combinesthis with a graph database consisting of nodes and edges detailing the overall systemarchitecture. Specifically, this thesis aims to compare the two implementations andanswer which performs better overall, on specific prompt categories and which of theused metrics are deemed practical and reliable.Methods. The two pipelines, DocumentRAG and HybridRAG as well as theautomated testing pipeline were developed. They both used the same LLMs (GPT-4o and o1) through the OpenAI API to ensure a fair comparison. A total of 49 testprompts which were all created by Subject Matter Experts (SMEs). Each being clas-sified with a different rating in categories like abstraction level, amount of reasoningneeded, number of datapoints needed and the overall complexity of the question.The methods were compared on the following metrics: Relevance, Accuracy, Com-pleteness, Context Recall and Faithfulness.Results. HybridRAG slightly outperformed DocumentRAG overall in all met-rics, although the differences were not statistically significant to a degree of p >=0.05. The largest improvements were in Faithfulness and Relevance where Hy-bridRAG had an advantage of 0.078 and 0.079 in mean scores respectively. Hy-bridRAG outperformed its counterpart most significantly when the prompt wasvaguely phrased, required deep technical knowledge or needed an especially largenumber of data points. Context recall remained low at about 0.13 for both im-plementations and did not show much difference depending on the type of question.Faithfulness on the other hand was high overall with 0.917 for HybridRAG and 0.840for DocumentRAG.Conclusions. While HybridRAG’s advantage was not statistically significant inany categories it maintained a advantage or at least matched DocumentRAG in allmeasurements. The difference in performance was especially clear in vague questionor complex questions. The metrics Accuracy, Completeness and Relevance werefound to be most practical in real world use due to their high trustworthiness andadherence with the overall system performance.

Place, publisher, year, edition, pages
2025.
Keywords [en]
Retrieval-Augmented Generation, Graph Database, Large Language Models, System Architecture Documentation, Knowledge Retrieval
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:bth-27950OAI: oai:DiVA.org:bth-27950DiVA, id: diva2:1962572
External cooperation
Ericsson
Subject / course
Degree Project in Master of Science in Engineering 30,0 hp
Educational program
DVAMI Master of Science in Engineering: AI and Machine Learning 300 hp
Presentation
2025-05-22, J1630, Karlskrona, 08:00 (English)
Supervisors
Examiners
Available from: 2025-06-11 Created: 2025-05-31 Last updated: 2025-09-30Bibliographically approved

Open Access in DiVA

fulltext(4280 kB)376 downloads
File information
File name FULLTEXT02.pdfFile size 4280 kBChecksum SHA-512
2d946297f7007abef20f8314010930faa3a8908ef0e836f7169b5a5dca89bd09c474f5fcaf07144a3b60c62d247a107acfe48b9027556f612d3cd240f1df7ae1
Type fulltextMimetype application/pdf

By organisation
Department of Computer Science
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 377 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 1127 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf