search_answer.yamlThis is the core configuration file that controls Medical-RAG retrieval behavior. Adjustments are required in the following scenarios:
Search Performance Optimization
- weightingWhen a particular search method (dense/sparse) yields unsatisfactory results, modify it.
weight_densecap (a poem)weight_sparseParameter Rebalancing Retrieval Strategy - Output Quantity Control: By
top_k_densecap (a poem)top_k_sparseChange the number of results returned by each channel
Business Scenario Adaptation
- Specialty Search OptimizationSet differentiated search thresholds for different departments (e.g., internal medicine/surgery).
- Query Type HandlingSet specific parameters for different types of inquiries, such as symptom lookups and medication consultations.
System Integration Requirements
- Model switchingWhen replacing embedded models or LLMs, synchronous updates are required.
embedding_configRelated Configuration - Performance AdjustmentModify based on server resource availability.
batch_sizeOptimize throughput by adjusting parameters
After modifying the configuration, there is no need to re-import data. The system will automatically apply the new policy during the next query. It is recommended to usepython scripts/search_pipline.py --search-configExecute the command to perform interactive testing and verify the results.
This answer comes from the articleMedical-RAG: A Retrieval-Augmented Generation Framework for Constructing Chinese Medical Q&AsThe































