large-language-models fine-tuning domain-adaptation retrieval-augmented-generation llama-3 additive-manufacturing vector-database expert-question-answering
Abstract
General-purpose large language models (LLMs) often struggle to generate reliable responses in specialized engineering domains due to limited domain grounding and insufficient exposure to structured technical knowledge. This study investigates practical strategies for adapting a foundation LLM to the additive manufacturing (AM) domain in order to improve answer accuracy, relevance, and usability for expert-level question answering. AM knowledge is distributed across heterogeneous sources such as academic literature, manufacturer documentation, technical standards, and procedural guides. Although general LLMs demonstrate strong linguistic capabilities, they frequently fail to retrieve and contextualize such domain-specific information. Two common approaches to address this limitation are domain-specific fine-tuning and retrieval-augmented generation (RAG). We construct a curated AM corpus and evaluate three configurations based on LLaMA-3-8B: (1) the pretrained baseline model, (2) a RAG system that retrieves relevant document chunks from a vector database, and (3) a model fine-tuned on raw domain text. Performance is evaluated using 200 expert-designed AM questions assessed by mechanical engineering experts for accuracy, relevance, and overall preference. Results show that the RAG model consistently outperforms the baseline. Among the 200 questions, 75.5% of RAG responses are judged more accurate, 85.2% are preferred overall, and 90.8% are rated more relevant than baseline responses. In contrast, fine-tuning on raw AM text reduces performance, producing more accurate answers in only 5.6% of cases and more relevant answers in 32.5% of cases. These results indicate that retrieval-augmented approaches provide a more effective pathway for adapting LLMs to specialized engineering domains than naive fine-tuning on unstructured technical data.
한국어 요약
📋 한 줄 요약
**[도메인 적응 / 첨가제 제조]** 폴리머 복합재 적층제조(AM) 도메인에서 LLaMA-3-8B를 RAG와 fine-tuning으로 적응시킬 때 RAG가 fine-tuning보다 실질적으로 우월함을 200문항 전문가 평가로 정량 입증.
🎯 핵심 기여도
- 학술 문헌·제조사 문서·기술 표준·절차 가이드로 분산된 AM 지식을 LLaMA-3-8B에 적응시키는 세 가지 구성(pretrained baseline, RAG, raw text fine-tuning) 비교 실험 설계.
- 기계공학 전문가가 평가한 200개 AM 질문 평가에서 RAG가 정확도 75.5%, 종합 선호 85.2%, 관련성 90.8% 우위를 일관되게 보임을 정량화.
- 원시 도메인 텍스트 fine-tuning은 정확도 5.6%·관련성 32.5%로 baseline보다 오히려 후퇴함을 발견.
- 전문 공학 도메인 LLM 적응 전략 선택의 실증 가이드 제시.
💡 핵심 아이디어
구조화되지 않은 기술 텍스트로 naive fine-tuning하면 도메인 지식을 흡수하기보다 출력 양식을 망가뜨릴 수 있다. 반면 RAG는 정확한 출처 grounding을 제공해 전문 공학 질의 응답에서 더 안정적이다.
🔬 기술적 접근법
- **모델/방법론**: LLaMA-3-8B를 (1) 그대로, (2) 벡터 DB 기반 RAG, (3) raw AM 텍스트 fine-tuning 세 구성으로 비교.
- **핵심 기법**: AM 코퍼스 큐레이션, 벡터 DB에 chunk 색인 후 retrieval, raw text 기반 미세조정, 200개 전문가 설계 문항으로 정확성·관련성·선호도 평가.
📊 주요 결과
- RAG vs baseline: 75.5% 정확도 우위, 85.2% 종합 선호, 90.8% 관련성 우위.
- raw text fine-tuning vs baseline: 5.6% 정확도 우위, 32.5% 관련성 우위(즉 대부분에서 후퇴).
- RAG가 모든 평가 차원에서 가장 균형 잡힌 성능.
💭 의의 및 한계
**의의**: "전문 도메인에는 fine-tuning이 정답"이라는 통념을 정면으로 반박하고, 구조화되지 않은 기술 텍스트 환경에서는 RAG가 실용적 정답임을 실증. **한계**: 단일 LLM·단일 도메인(AM) 평가이며, instruction-tuning이나 structured QA 데이터 기반 fine-tuning과의 비교는 후속 과제.
🚀 실용적 활용
- 제조 엔지니어용 AM 지식 어시스턴트 구축.
- 표준·제조사 매뉴얼이 자주 갱신되는 산업 도메인 챗봇.
- 전문가 검증이 필요한 산업 응용에서 출처 추적 가능한 RAG 우선 채택.