Show simple item record

Development of a system for medical knowledge retrieval and generation from clinical studies based on deep learning and RAG architecture

dc.contributor.advisorSotiropoulos, Dionisios
dc.contributor.advisorΣωτηρόπουλος, Διονύσιος
dc.contributor.authorGerolymos, Christos
dc.contributor.authorΓερόλυμος, Χρήστος
dc.date.accessioned2026-09-25T11:50:23Z
dc.date.available2026-09-25T11:50:23Z
dc.date.issued2026-09
dc.identifier.urihttps://dione.lib.unipi.gr/xmlui/handle/unipi/19791
dc.description.abstractΟι κλινικές δοκιμές αποτελούν τον κύριο μηχανισμό αξιολόγησης νέων ιατρικών παρεμβάσεων, και το μητρώο ClinicalTrials.gov — το μεγαλύτερο παγκοσμίως αρχείο κλινικών μελετών με περισσότερες από 500.000 εγγεγραμμένες μελέτες — παρέχει δημόσια πρόσβαση σε λεπτομερή πρωτόκολλα, κριτήρια επιλεξιμότητας, παρεμβάσεις και στατιστικά αποτελέσματα. Παρά τη διαθεσιμότητά τους, η αποτελεσματική πρόσβαση σε αυτές τις πληροφορίες παραμένει πρόκληση: τα αρχεία δοκιμών είναι γραμμένα σε πυκνή ιατρική ορολογία και δεν υποστηρίζουν αναζήτηση με φυσική γλώσσα. Η παρούσα διπλωματική εργασία παρουσιάζει τον σχεδιασμό, την υλοποίηση και αξιολόγηση ενός ανοιχτού συστήματος Ανάκτησης-Επαυξημένης Παραγωγής (RAG) για απάντηση ερωτημάτων φυσικής γλώσσας σε αρχεία κλινικών δοκιμών. Το σύστημα επιτρέπει στους χρήστες να επιλέξουν οποιαδήποτε κλινική δοκιμή και να υποβάλλουν ερωτήματα που απαντώνται με παραπομπές σε συγκεκριμένα αποσπάσματα. Όλη η επεξεργασία εκτελείται τοπικά σε GPU χαμηλού κόστους με ανοιχτού κώδικα μοντέλα. Η κύρια τεχνική συνεισφορά είναι μία τμηματοποίηση σε ιεραρχικά επίπεδα που αξιοποιεί τη δομημένη ιεραρχία των εγγραφών JSON του ClinicalTrials.gov v2, παράγοντας 80–400 σημασιολογικά συνεκτικά τμήματα ανά δοκιμή. Το σύστημα ανάκτησης συνδυάζει ανάκτηση BM25 και πυκνή ανάκτηση BGE-M3 μέσω Αμοιβαίας Ταξινόμησης Συχνοτήτων, ακολουθούμενη από επαναταξινόμηση cross-encoder. Η αξιολόγηση σε δύο δομικά διαφορετικές δοκιμές έδειξε ότι κανένας κωδικοποιητής δεν υπερτερεί καθολικά: ο βιοϊατρικός MedCPT υπερτερεί σε ολοκληρωμένη δοκιμή με αποτελέσματα (nDCG@10 = 0.394), ενώ ο γενικός BGE-M3 υπερτερεί σε δοκιμή σε φάση στρατολόγησης (nDCG@10 = 0.508). Η πιστότητα απαντήσεων ήταν 0.862, επιβεβαιώνοντας χαμηλά ποσοστά ψευδαίσθησης με συμπαγές ανοιχτό μοντέλο.el
dc.format.extent108el
dc.language.isoenel
dc.publisherΠανεπιστήμιο Πειραιώςel
dc.rightsΑναφορά Δημιουργού - Μη Εμπορική Χρήση - Παρόμοια Διανομή 3.0 Ελλάδα*
dc.rights.urihttp://creativecommons.org/licenses/by-nc-sa/3.0/gr/*
dc.titleDevelopment of a system for medical knowledge retrieval and generation from clinical studies based on deep learning and RAG architectureel
dc.title.alternativeΑνάπτυξη συστήματος ανάκτησης και παραγωγής ιατρικών γνώσεων με χρήση τεχνικών deep learning και RAG αρχιτεκτονικήςel
dc.typeBachelor Dissertationel
dc.contributor.departmentΣχολή Τεχνολογιών Πληροφορικής και Επικοινωνιών. Τμήμα Πληροφορικήςel
dc.description.abstractENClinical trials are the primary mechanism through which new medical interventions are evaluated, and ClinicalTrials.gov — the world's largest clinical trial registry with over 500,000 registered studies — provides public access to detailed trial protocols, eligibility criteria, intervention designs, and statistical results. Despite this availability, effective access to this information remains challenging: trial records are written in dense medical language, span thousands of words of structured text, and cannot be queried with natural language through existing interfaces. This thesis presents the design, implementation, and evaluation of an open-source Retrieval-Augmented Generation (RAG) system for natural language question answering over clinical trial records. The system enables users to select any trial from a live ClinicalTrials.gov dropdown, wait while a per-trial index is dynamically constructed, and then pose arbitrary natural language questions that are answered with citations to specific trial passages. All inference runs locally on a consumer-grade GPU using open-source models, requiring no proprietary cloud API. The primary technical contribution is a section-aware hierarchical chunking pipeline that exploits the structured module hierarchy of ClinicalTrials.gov v2 JSON records, producing 80–400 semantically coherent chunks per trial with rich metadata enabling structured retrieval filtering. The retrieval pipeline combines BM25 sparse retrieval and dense BGE-M3 bi-encoder retrieval via Reciprocal Rank Fusion, followed by cross-encoder re-ranking and parent document expansion. Advanced query routing techniques — including Hypothetical Document Embeddings, query decomposition, and step-back prompting — handle compound, vague, and reasoning-intensive questions. Generation is performed by Llama 3.1 8B Instruct (Q4_K_M quantization) served via Ollama, with citation enforcement and hallucination detection in post-processing. A controlled ablation across three embedding models, four retrieval strategies, and two structurally contrasting trials yields the thesis's principal finding: no embedding model is universally best for clinical trial retrieval. The biomedical MedCPT encoder is strongest on a completed, results-dense trial (nDCG@10 = 0.394), while the general-purpose BGE-M3 is strongest on a recruiting, protocol-only trial (nDCG@10 = 0.508) — a near-complete reversal driven by the match between each embedder's training distribution and the trial's content. End-to-end evaluation across 30 questions balanced over five query types achieves aggregate faithfulness of 0.862 and answer relevancy of 0.883, with each query-routing strategy delivering its intended benefit, confirming that the system produces well-grounded, on-topic answers with low hallucination rates using a compact open-source model.el
dc.subject.keywordRetrieval-augmented generationel
dc.subject.keywordClinical trialsel
dc.subject.keywordNatural language processingel
dc.subject.keywordInformation retrievalel
dc.subject.keywordLarge language modelsel
dc.subject.keywordVector searchel
dc.subject.keywordChromaDBel
dc.subject.keywordLLaMAel
dc.subject.keywordClinicalTrials.govel
dc.subject.keywordBM25el
dc.date.defense2026-09


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record

Αναφορά Δημιουργού - Μη Εμπορική Χρήση - Παρόμοια Διανομή 3.0 Ελλάδα
Except where otherwise noted, this item's license is described as
Αναφορά Δημιουργού - Μη Εμπορική Χρήση - Παρόμοια Διανομή 3.0 Ελλάδα

Βιβλιοθήκη Πανεπιστημίου Πειραιώς
Contact Us
Send Feedback
Created by ELiDOC
Η δημιουργία κι ο εμπλουτισμός του Ιδρυματικού Αποθετηρίου "Διώνη", έγιναν στο πλαίσιο του Έργου «Υπηρεσία Ιδρυματικού Αποθετηρίου και Ψηφιακής Βιβλιοθήκης» της πράξης «Ψηφιακές υπηρεσίες ανοιχτής πρόσβασης της βιβλιοθήκης του Πανεπιστημίου Πειραιώς»