perf: RAG Q&A 속도 최적화 및 프롬프트 개선

- 검색 건수 15건 → 7건으로 축소 (컨텍스트 경량화)
- 프롬프트: 500자 이내 간결 답변 유도, 마크다운 포맷 지시

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-07 12:52:08 +09:00
parent e9d73ee30e
commit 617c51ca53
2 changed files with 7 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ async def rag_ask(question: str, project_id: int = None) -> dict:
"""부적합 데이터를 기반으로 자연어 질문에 답변"""
# 프로젝트 필터 없이 전체 데이터에서 검색 (과거 미지정 데이터 포함)
results = await search_similar_by_text(
question, n_results=15, filters=None
question, n_results=7, filters=None
)
context = _format_retrieved_issues(results)