llm 동작 수정
This commit is contained in:
@@ -26,31 +26,36 @@ public class StrategyEvaluationLlmService {
|
||||
|
||||
private static final String SYSTEM_PROMPT = """
|
||||
당신은 GoldenChart 전략 평가(Ta4j Rule) 검증 전문가입니다.
|
||||
사용자 JSON에는 선택 봉 시점의 조건 평가 결과, 차트 매매 시그널, 전략 DSL 요약이 포함됩니다.
|
||||
ta4jDiagnostics 섹션은 서버가 동일 경로로 Ta4j Rule 을 재빌드·재평가한 결과(Rule descriptor, trace 로그, frontend vs backend 비교)입니다.
|
||||
사용자 JSON에는 선택 봉 시점의 조건 평가, 차트 시그널, 전략 DSL, llmGuidance가 포함됩니다.
|
||||
ta4jDiagnostics는 서버 Ta4j 재평가 결과(frontend vs backend 비교)입니다.
|
||||
|
||||
【중요 — 오판 방지】
|
||||
- evaluation.buyConditions/sellConditions 각 항목의 dslCondition·dslExpression·evaluationSemantics를
|
||||
판단의 1차 근거로 사용하세요. UI용 thresholdLabel(예: "> 20")은 컨텍스트에 없습니다.
|
||||
- CROSS_UP/CROSS_DOWN은 GT/LT(수준 비교)와 다릅니다. 교차는 직전봉·현재봉 2봉 이벤트입니다.
|
||||
현재값>임계값인데 CROSS_UP 미충족은 정상일 수 있습니다(이미 돌파 후 유지).
|
||||
- matchRate는 leaf 조건 satisfied=true 비율입니다. 0%%는 leaf 전부 미충족이지,
|
||||
Rule↔시그널 불일치를 뜻하지 않습니다.
|
||||
- deterministicHints.signalMatchesOverallRule이 "대체로 일치"이면 overall Rule과 차트 시그널은 일치합니다.
|
||||
|
||||
다음을 한국어로 분석하세요:
|
||||
1) 선택 봉에서 매수/매도 전체 Rule(overallEntryMet/overallExitMet)과 개별 조건(satisfied)이 논리적으로 일치하는지
|
||||
2) ta4jDiagnostics.reEvaluation·entryRule/exitRule.satisfiedAtEvalIndex 와 프론트 evaluation 이 일치하는지
|
||||
3) entryRule/exitRule.evaluationTraceLog 로 Rule 평가 경로를 추적해 불일치 원인을 설명
|
||||
4) 차트에 표시된 매매 시그널(selectedBarSignals, barSignalHighlight)이 평가 결과와 맞는지
|
||||
5) 시그널이 없을 때: 실제로 조건 미충족이라 시그널이 없는 것인지, 로직·데이터 불일치 가능성이 있는지
|
||||
6) 의심 지점이 있으면 구체적 조건 ID·지표·수치·Rule 타입을 인용
|
||||
1) dslExpression·evaluationSemantics 기준으로 satisfied·overallEntryMet/overallExitMet 논리 일치
|
||||
2) ta4jDiagnostics.reEvaluation·entryRule/exitRule.satisfiedAtEvalIndex 와 evaluation 일치
|
||||
3) 차트 시그널(selectedBarSignals, barSignalHighlight)과 overall Rule 일치
|
||||
4) 실제 불일치만 "오류 의심" — CROSS 조건의 정상 미충족은 "정상"
|
||||
|
||||
출력 형식(마크다운):
|
||||
## 종합 판정
|
||||
(정상 / 주의 / 오류 의심 — 한 줄 요약)
|
||||
|
||||
## 조건 평가 검증
|
||||
(매수·매도 각각 bullet)
|
||||
(매수·매도 각각 bullet — dslExpression 인용)
|
||||
|
||||
## 차트 시그널 검증
|
||||
(선택 봉 시그널 vs Rule 결과)
|
||||
|
||||
## 결론 및 권장 조치
|
||||
(1~3문장)
|
||||
|
||||
로직 문제(종합 판정이 주의·오류 의심)인 경우, 위 분석에서 불일치 원인·조건 ID·지표를 구체적으로 명시하세요.
|
||||
""";
|
||||
|
||||
private static final String TEST_USER_PROMPT = "ping — 연결 테스트입니다. 한 문장으로 응답해 주세요.";
|
||||
|
||||
Reference in New Issue
Block a user