liu.seSearch for publications in DiVA
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • 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
Optimization of Data Representations for RAG-Based Chatbots
Linköping University, Department of Computer and Information Science, Artificial Intelligence and Integrated Computer Systems.
Linköping University, Department of Computer and Information Science, Artificial Intelligence and Integrated Computer Systems.
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Optimering av datarepresentationer för RAG-baserade chattbottar (Swedish)
Abstract [en]

Scattered technical documentation makes it difficult for developers and IT support to quickly and reliably find relevant information. This thesis investigates how Retrieval-Augmented Generation (RAG) chatbots can be improved to better retrieve and generate accurate answers in such environments. The focus lies on optimizing table and text representations for retrieval, and identifying which automated evaluation metrics best reflect human judgment.

To address this, a wide range of table and text formats were deliberately selected and compared, including simple, verbose, and structured styles such as and fixed-size chunking and representing tables as natural language sentences, JSON and Markdown formats. The methods were assessed using manual review and a diverse set of automated metrics.

For text-related questions, fixed-size chunks achieved the most reliable performance. A sliding window approach using overlapping windows also performed well by preserving boundary context. For table-related questions, the Markdown format stood out when preserving full tables and sentences within a chunk, likely due to its addition of structural clarity and mapping of table header and cell values without adding verbosity, as well as LLMs usual familiarity with Markdown during training, such as from GitHub README files.

In terms of evaluation, our custom LLM-as-a-judge method, named “Our-Judge“, presented in this paper achieved the highest alignment with human assessments, outperforming traditional metrics such as BLEU, ROUGE, and BERTScore. This alignment was likely also improved in comparison to other LLM-based metrics by the use of chain-of-thought prompting, which encouraged the model to reason more deliberately about correctness and completeness.

The results show that combining clearly structured representations, particularly Markdown or JSON for tables and fixed-size chunking for text, with or without the addition of a small window overlap, in combination with reasoning-aware evaluation techniques utilizing chain-of-thought prompting, significantly improves the accuracy and assessment of RAG-based chatbots in technical documentation settings.

Place, publisher, year, edition, pages
2025. , p. 57
Keywords [en]
Retrieval-Augmented Generation (RAG), Large Language Models (LLMs), Natural Language Processing (NLP), Text Chunking, Table Representation, Automated Evaluation Metrics
National Category
Natural Language Processing
Identifiers
URN: urn:nbn:se:liu:diva-214410ISRN: LIU-IDA/LITH-EX-A--25/026--SEOAI: oai:DiVA.org:liu-214410DiVA, id: diva2:1965487
External cooperation
Ericsson
Subject / course
Computer Engineering
Presentation
2025-05-26, Linköping, 10:26 (English)
Supervisors
Examiners
Available from: 2025-06-09 Created: 2025-06-09 Last updated: 2025-06-09Bibliographically approved

Open Access in DiVA

Optimization_of_Data_Representations_for_RAG_Based_Chatbots(886 kB)521 downloads
File information
File name FULLTEXT01.pdfFile size 886 kBChecksum SHA-512
b672276a3d3cb7f8dc6e8589ba0fde5d2937059cb258b8e7ba7ceecda7791d8e1bbc1eb6622ce9045539d8ad2efbb783a2a89a6e284f522ad24c864e6e2e3c13
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Fabian, BergströmElias, Hörnberg
By organisation
Artificial Intelligence and Integrated Computer Systems
Natural Language Processing

Search outside of DiVA

GoogleGoogle Scholar
Total: 523 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: 1329 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • 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