Evidence Hub

ST-RAG: Spatio-Temporal Retrieval-Augmented Generation for Behaviour-Grounded Virtual Agents in Immersive Clinical Training

Edwin Ngari, S. Kang'iri, Prof. Jean Bosco Byiringiro

Book of Abstracts of the 10th DeKUT International Conference on Science, Technology, Innovation and Entrepreneurship (STI&E 2026), 2026

Abstract

Virtual patients in immersive clinical training usually answer from the words a trainee speaks, so a trainee leaning toward a wound and one standing across the room receive the same reply. Retrieval-augmented generation lets a scenario be written as documents rather than branching dialogue, but its query is the utterance alone; systems that give a language model the user’s position or gaze exist, but none is a virtual patient. We describe ST-RAG, a system that classifies the trainee’s distance to the patient into proxemic zones, detects dwell on a body region from a head-direction ray, and uses that state to choose the knowledge chunk given to a retrieval-augmented language model. The system runs on one PC with local speech recognition, an 8-billion-parameter language model and local speech synthesis, and it targets the Meta Quest 3, which has no eye tracker. We report 30 turns spoken by the first author in the Unity Editor and 1,150 turns from a scripted trainee that drove the same server on a laptop with an RTX 4060 GPU. Median server time per turn was 1.26 to 1.43 s across four conditions, and the anchored chunk was returned only in the designed state, in agreement with the coded rule on all 480 matched-pair trials. Putting the whole library in the prompt raised it from 350 to 3,519 tokens between 8 and 128 documents, yet per-turn latency stayed near 1.1 s because the model reused its cached prompt, so retrieval gave no latency advantage at these sizes. No human trainee…

Read the paper

Related studies

Go deeper in Evidence Hub

Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.

Open this study Sign up free