Leveraging long context in retrieval augmented language models for medical question answering
TL;DR Highlight
A map-reduce step over retrieved context eases lost-in-the-middle in medical RAG.
Who Should Read
A backend developer building healthcare RAG whose answers miss key facts buried in the middle of retrieved results
Core Mechanics
- RAG is sensitive to where info sits
- Answer quality depends heavily on the rank and density of key information in retrieval results.
- Facts buried in the middle get missed, known as lost-in-the-middle.
- BriefContext is a map-reduce strategy
- Instead of feeding all retrieved text at once, it splits the work and merges the results.
- It does not modify model weights.
- No fine-tuning, just a workflow change
- It can be layered on top of an existing LLM and RAG pipeline.
- Tested across LLMs and QA datasets
- The abstract reports benefits with various LLM backbones and multiple QA datasets.
- Aimed at high-stakes medical use
- The goal is to reduce misinformation risk and keep critical clinical content in answers.
Evidence
- No concrete numbers in the provided text
- The abstract only says benefits were shown across various LLM backbones and multiple QA datasets.
- No accuracy gains or baseline figures are given.
How to Apply
- Split retrieved chunks and summarize each group
- Today, split 10 RAG results into groups of 3-4 and extract question-relevant facts from each.
- Merge the extracts into the final prompt and compare with your current approach.
- Test answer omissions by evidence position
- Place the gold document at the start, middle and end of the results and check if answers change.
- Apply first to high-risk questions
- Turn on the map-reduce step for question types where wrong answers are costly.
Try It
# Simplified version of the paper's method: paste into Claude/ChatGPT
Below are a question and retrieved documents.
[Step 1 map] Group the documents in threes and, for each group, list only the key facts relevant to the question as bullets. If none, write "none".
[Step 2 reduce] Merge all extracted facts, remove duplicates, and answer the question based on them. If evidence is insufficient, say you don't know.
Question: {{question}}
Documents:
{{documents}}Terminology
Related Papers
FutureBench: A Renewable Framework for Evaluating Knowledge-Context Conflict in LLMs
Adding 'verify and prioritize the passage' to RAG prompts raised false-passage adoption; a knowledge-priority warning fixed it.
Faster Retrieval for Better, More Efficient RAG
Small neural nets learned query routing, hitting the same recall up to 8x faster in IVF search
Memorilla: Latent Semantic Memory for LLMs
Compressing documents into 16 memory tokens beat full-context accuracy on FactKG.
What the Author Wrote, What the Agent Reads: Silent Cue Loss in Enterprise Document Ingestion
Preserving red text and highlights in docx ingestion lifted marked-requirement F1 from 0.150 to 0.690.
Multimodal Reranking Is a System One Decision
One multiple-choice question to a VLM over 16 candidates reranks them, beating a dedicated 2B reranker.
You could have invented transformers from memory
Viewing linear, MLP and attention layers as memory stores: capacity goes ~64 to ~2,700 to over a million
Pointing AI at archives found a forgotten meteorite, lost rhinos, and more
Embedding search plus a cheap filter model surfaced unrecorded events in 400 years of archives
EmbeddingGemma 2: An open, lightweight multimodal embedding model
One open 740M model embeds text, images, audio and video into a single shared vector space
Original Abstract (Expand)
While holding great promise for improving and facilitating healthcare through applications of medical literature summarization, large language models (LLMs) struggle to produce up-to-date responses on evolving topics due to outdated knowledge or hallucination. Retrieval-augmented generation (RAG) is a pivotal innovation that improves the accuracy and relevance of LLM responses by integrating LLMs with a search engine and external sources of knowledge. However, the quality of RAG responses can be largely impacted by the rank and density of key information in the retrieval results, such as the “lost-in-the-middle” problem. In this work, we aim to improve the robustness and reliability of the RAG workflow in the medical domain. Specifically, we propose a map-reduce strategy, BriefContext, to combat the “lost-in-the-middle” issue without modifying the model weights. We demonstrated the advantage of the workflow with various LLM backbones and on multiple QA datasets. This method promises to improve the safety and reliability of LLMs deployed in healthcare domains by reducing the risk of misinformation, ensuring critical clinical content is retained in generated responses, and enabling more trustworthy use of LLMs in critical tasks such as medical question answering, clinical decision support, and patient-facing applications.