fix(rag): 무관 뉴스 입력 시 Thinking 모델의 무한 추론 방지를 위한 Short-Circuit 규칙 추가 및 토큰 한도 확장
This commit is contained in:
@@ -692,11 +692,11 @@ object RagService {
|
||||
put("temperature", 0.1)
|
||||
put("top_p", 0.85)
|
||||
put("top_k", 40)
|
||||
put("max_tokens", 1500)
|
||||
put("max_tokens", 2000)
|
||||
putJsonArray("messages") {
|
||||
addJsonObject {
|
||||
put("role", "system")
|
||||
put("content", "You are a helpful AI financial analyst. Keep your internal thinking concise (under 50 words), then output strictly in valid JSON format.")
|
||||
put("content", "You are a helpful AI financial analyst. Keep your internal thinking very brief (under 50 words). If the news is unrelated or general market news, immediately output score 50.0. Output strictly in valid JSON format.")
|
||||
}
|
||||
addJsonObject {
|
||||
put("role", "user")
|
||||
@@ -937,13 +937,14 @@ object RagService {
|
||||
- If the news mentions specific profit figures (e.g., "72B KRW"), award a "Profit Bonus" even without YoY comparison.
|
||||
- If 'Base Position' is near 100% (at 120MA), consider it a 'Safe Entry' for long-term holding.
|
||||
|
||||
# Constraints:
|
||||
- Reason: KOREAN only, max 50 chars. Explain the "Synergy" between scores and news.
|
||||
1. Target Isolation: You MUST ONLY extract facts related EXACTLY to [$stockName].
|
||||
2. No Mix-up: Do NOT attribute actions of other companies (e.g., unrelated capital increases or earnings of competitors) to [$stockName].
|
||||
3. Verify Numbers: Check if [$stockName]'s YoY profit is Positive (+) or Negative (-). If Negative, you MUST reflect it as a penalty in the score.
|
||||
|
||||
- Output: Strictly JSON format.
|
||||
# Critical Rules (Short-Circuit & Constraints):
|
||||
1. Short-Circuit: If [News Text] does NOT specifically mention [$stockName] or is general market/unrelated company news, DO NOT overthink. Immediately output:
|
||||
{"score": 50.0, "reason": "관련 뉴스 없음 (중립)"}
|
||||
2. Thinking Budget: Keep your internal thinking concise (under 50 words). Finish thinking quickly and output strictly valid JSON.
|
||||
3. Target Isolation: You MUST ONLY extract facts related EXACTLY to [$stockName]. Do NOT attribute actions of other companies (e.g., unrelated capital increases or earnings of competitors) to [$stockName].
|
||||
4. Verify Numbers: Check if [$stockName]'s YoY profit is Positive (+) or Negative (-). If Negative, reflect it as a penalty in the score.
|
||||
5. Reason: KOREAN only, max 50 chars. Explain the "Synergy" between scores and news.
|
||||
6. Output: Strictly JSON format.
|
||||
|
||||
# JSON Output:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user