Paper ID

2048f54a98aa7aec577b7fcbf29513d8924d8cd9


Motivation

The source paper is "RareBench: Can LLMs Serve as Rare Diseases Specialists?" (25 citations, 2024, ID: 2048f54a98aa7aec577b7fcbf29513d8924d8cd9). This idea builds on a progression of related work [25a5f70b1077f81380f092637644e2d78100121c].

The analysis highlights that while the source paper establishes a benchmark for evaluating LLMs in diagnosing rare diseases, it does not address the interpretability of the diagnostic process. Paper 0 advances this by proposing a framework for interpretable differential diagnosis, which is crucial for clinical acceptance and trust in LLMs. However, both papers focus primarily on the diagnostic accuracy and interpretability without exploring the potential for LLMs to assist in the ongoing management and treatment of rare diseases. A research idea that extends beyond diagnosis to include treatment recommendations could significantly advance the field, providing a more comprehensive tool for clinicians dealing with rare diseases.


Hypothesis

Integrating Chain-of-Thought prompting with Retrieve Augmented Generation will significantly improve the accuracy of treatment recommendations for rare diseases by LLMs, compared to using static prompts and limited knowledge bases.


Research Gap

Existing research has explored dynamic few-shot prompting and knowledge graph integration separately, but the specific combination of Chain-of-Thought (CoT) prompting with Retrieve Augmented Generation (RAG) for improving rare disease treatment recommendations has not been extensively tested. This combination could enhance the reasoning and factual accuracy of LLMs by leveraging both structured reasoning and real-time data retrieval.


Hypothesis Elements

Independent variable: Integration of Chain-of-Thought prompting with Retrieve Augmented Generation

Dependent variable: Accuracy of treatment recommendations for rare diseases (measured by F1 score)

Comparison groups: Four conditions: Static Prompt (Baseline 1), CoT Only (Baseline 2), RAG Only (Baseline 3), and CoT+RAG (Experimental)

Baseline/control: Using static prompts and limited knowledge bases

Context/setting: Large Language Models generating treatment recommendations for rare diseases

Assumptions: Chain-of-Thought prompting enhances reasoning by structuring thought processes; RAG improves factual accuracy by integrating up-to-date medical knowledge

Relationship type: Causal (integration of CoT and RAG will cause improvement in accuracy)

Population: Rare disease cases from datasets such as Orphanet

Timeframe: Not specified

Measurement method: F1 score calculation combining precision and recall of treatment recommendations compared to gold-standard treatments


Overview

This research investigates the synergistic effect of combining Chain-of-Thought (CoT) prompting with Retrieve Augmented Generation (RAG) to enhance the accuracy of treatment recommendations for rare diseases using large language models (LLMs). CoT prompting encourages LLMs to generate a sequence of intermediate reasoning steps, improving their ability to solve complex diagnostic tasks by structuring their thought processes. Meanwhile, RAG dynamically integrates external, up-to-date medical knowledge into the LLM's responses, enhancing factual accuracy and contextual relevance. By combining these two approaches, the LLM can leverage structured reasoning and real-time data retrieval to provide more accurate and contextually relevant treatment recommendations. This hypothesis addresses the gap in existing research where the individual benefits of CoT and RAG have been explored, but their combined effect in the context of rare disease treatment has not been extensively tested. The expected outcome is a significant improvement in the F1 score of treatment recommendations, indicating better alignment with expert guidelines and reduced false positives and negatives. This approach is particularly relevant for rare diseases, where accurate diagnosis and treatment are challenging due to limited data and complex symptomatology.


Background

Chain-of-Thought Prompting: Chain-of-Thought (CoT) prompting involves guiding the LLM to generate a series of intermediate reasoning steps before arriving at a final decision. This method helps the model break down complex problems into smaller, manageable parts, enhancing its reasoning capabilities. In this experiment, CoT prompting will be implemented by designing prompts that instruct the LLM to think 'step-by-step', ensuring logical consistency and thoroughness in its diagnostic process. This approach is expected to improve the model's ability to handle the intricate symptomatology of rare diseases, leading to more accurate treatment recommendations.

Retrieve Augmented Generation: Retrieve Augmented Generation (RAG) integrates external knowledge sources into the LLM's response generation process. By dynamically retrieving relevant medical information from databases and incorporating it into the prompts, RAG enhances the factual accuracy and contextual relevance of the LLM's outputs. In this experiment, RAG will be used to access up-to-date medical knowledge, ensuring that the LLM's recommendations are informed by the latest research and clinical guidelines. This approach is crucial for rare diseases, where new discoveries and treatment options are constantly emerging.


Implementation

The hypothesis will be implemented by integrating Chain-of-Thought (CoT) prompting with Retrieve Augmented Generation (RAG) in a modular LLM framework. The CoT module will be responsible for structuring the LLM's reasoning process. It will generate intermediate reasoning steps by breaking down the diagnostic task into smaller, logical components. This will be achieved by designing prompts that explicitly instruct the LLM to think 'step-by-step', ensuring that each reasoning step is based on relevant medical knowledge. The RAG module will dynamically retrieve external medical information from databases such as PubMed and Orphanet. This module will use a retrieval mechanism to query these databases in real-time, incorporating the retrieved information into the LLM's prompts. The integration of these modules will occur at the prompt generation stage, where the CoT-generated reasoning steps will be enriched with RAG-retrieved data. The LLM will then use this enriched prompt to generate treatment recommendations. The expected outcome is an improvement in the F1 score of the LLM's recommendations, indicating better alignment with expert guidelines. The experiment will be conducted using a dataset of rare disease cases, with the LLM's performance compared to a baseline model using static prompts and limited knowledge bases.


Operationalization Information

Please build an experiment to test whether integrating Chain-of-Thought (CoT) prompting with Retrieve Augmented Generation (RAG) improves the accuracy of treatment recommendations for rare diseases by Large Language Models (LLMs).

Experiment Overview

This experiment will compare three conditions:
1. Baseline 1 (Static Prompt): Using a standard prompt template without CoT or RAG
2. Baseline 2 (CoT Only): Using Chain-of-Thought prompting without RAG
3. Baseline 3 (RAG Only): Using RAG without explicit CoT prompting
4. Experimental (CoT+RAG): Integrating Chain-of-Thought prompting with RAG

The hypothesis is that the experimental condition (CoT+RAG) will significantly outperform all baseline conditions in terms of F1 score for rare disease treatment recommendations.

Pilot Mode Implementation

Implement a global variable PILOT_MODE with three possible settings: MINI_PILOT, PILOT, or FULL_EXPERIMENT. The code should check this variable and adjust the experiment scale accordingly:

Start by running the MINI_PILOT first. If everything looks good, proceed to the PILOT. After the PILOT completes, stop and do not run the FULL_EXPERIMENT (a human will manually verify the results and make the change to FULL_EXPERIMENT if needed).

Data Requirements

  1. Obtain a dataset of rare disease cases. Each case should include:
  2. Patient symptoms and medical history
  3. Correct diagnosis
  4. Gold-standard treatment recommendations
  5. If possible, use the Orphanet dataset or a similar rare disease dataset

  1. Split the dataset into training, development, and test sets (70%/15%/15%).

System Components

1. Chain-of-Thought (CoT) Prompting Module

Implement a module that generates prompts encouraging step-by-step reasoning:
- Design a prompt template that explicitly instructs the LLM to think through the diagnostic process step-by-step
- The prompt should guide the LLM to:
a. First analyze the symptoms and patient history
b. Consider possible diagnoses based on the symptoms
c. Narrow down to the most likely diagnosis
d. Recommend treatments based on the diagnosis
- Example prompt structure: "Given the following patient information, think step-by-step to determine the most appropriate treatment recommendations. First, analyze the key symptoms and patient history. Second, consider possible diagnoses that match these symptoms. Third, determine the most likely diagnosis. Finally, recommend appropriate treatments for this diagnosis."

2. Retrieve Augmented Generation (RAG) Module

Implement a module that retrieves relevant medical information and integrates it into the prompt:
- Create a vector database of medical knowledge from PubMed and Orphanet
- Implement a retrieval mechanism that:
a. Extracts key terms from the patient case
b. Queries the vector database for relevant medical information
c. Selects the most relevant documents
d. Formats the retrieved information for inclusion in the prompt
- The retrieved information should include disease descriptions, diagnostic criteria, and treatment guidelines

3. Integration Module

Implement a module that integrates CoT prompting with RAG:
- Design a system that:
a. First applies the CoT prompt structure to guide reasoning
b. At each reasoning step, enriches the context with relevant retrieved information
c. Ensures that the retrieved information is specifically relevant to the current reasoning step
- The integration should happen at the prompt generation stage, where CoT-generated reasoning steps are enriched with RAG-retrieved data

4. Evaluation Module

Implement a module that evaluates the performance of each condition:
- Calculate precision, recall, and F1 score for treatment recommendations
- Precision: proportion of recommended treatments that match gold-standard treatments
- Recall: proportion of gold-standard treatments that were recommended
- F1 score: harmonic mean of precision and recall
- Implement statistical significance testing (bootstrap resampling) to compare conditions

Experiment Procedure

  1. For each condition (Static Prompt, CoT Only, RAG Only, CoT+RAG):
    a. Process each case in the dataset
    b. Generate treatment recommendations
    c. Calculate precision, recall, and F1 score against gold-standard treatments
    d. Log all prompts, responses, and evaluation metrics

  1. Compare the performance of all conditions:
    a. Calculate mean and standard deviation of F1 scores for each condition
    b. Perform statistical significance testing to determine if the experimental condition (CoT+RAG) significantly outperforms the baselines
    c. Generate visualizations comparing the performance of each condition

Implementation Details

LLM Configuration

RAG Configuration

Logging and Output

Expected Deliverables

  1. Complete codebase implementing all modules
  2. Dataset of rare disease cases with gold-standard treatments
  3. Vector database of medical knowledge
  4. Comprehensive evaluation report
  5. All logs and raw results

Please implement this experiment with careful attention to the integration of CoT prompting and RAG, as this is the key innovation being tested.


References

  1. RareBench: Can LLMs Serve as Rare Diseases Specialists? (2024). Paper ID: 2048f54a98aa7aec577b7fcbf29513d8924d8cd9

  2. Interpretable Differential Diagnosis with Dual-Inference Large Language Models (2024). Paper ID: 25a5f70b1077f81380f092637644e2d78100121c

  3. Evaluating GPT- and Reasoning-based Large Language Models on Physics Olympiad Problems: Surpassing Human Performance and Implications for Educational Assessment (2025). Paper ID: cbd4012c8934c97fda6afd96ab56f0d115ec1840

  4. GAP: Graph-Assisted Prompts for Dialogue-based Medication Recommendation (2025). Paper ID: 11832d2a5115980dd7eac4cdd2fc4b82a3e6e3c8