Hierarchical Semantic Structuring and Evolutionary Query Optimization Framework for Domain-Specific Retrieval- Augmented Generation
Large language models (LLMs) have demonstrated strong capabilities across natural language processing tasks; however, deploying them in domain-specific and edge-constrained environments remains challenging because of semantic ambiguity, retrieval noise, computational overhead, and inadequate contextual grounding. Existing retrieval-augmented generation (RAG) frameworks often rely on static retrieval mechanisms and unstructured prompts, while current prompt engineering approaches generally lack adaptive optimization and edge compatibility. To address these limitations, this study proposes a multi-stage prompt optimization framework integrating the OSMOSIS semantic structuring engine with the Camouflage Optimization Algorithm (COA). OSMOSIS transforms ambiguous natural-language prompts into schema-constrained JSON representations, while COA adaptively refines retrieval relevance through evolutionary optimization. Experimental evaluation across legal, medical, financial, and career counseling domains demonstrates superior performance over seven baselines, including DSPy, Self-RAG, HyDE, and GraphRAG, achieving a BERTScore F1 of 0.813, ROUGE-L of 0.717, and 95.4% task accuracy. Statistical validation confirms the framework's robustness and generalizability.
Authors
- Komal Paul
- Tamal Ghosh
- Sajal Saha
Institutions
- Adamas University (IN)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-23
- DOI
- https://doi.org/10.21203/rs.3.rs-11137327/v1
- Primary Topic
- Topic Modeling
- Type
- preprint