주제 제목 생성기: LLM은 유효한 옵션을 반환하지만 주제 제목이 파싱/표시되지 않음

500 internal server error using 'suggest topic title' AI helper 이어짐

v2026.11.0-latest +19

업데이트 후 더 이상 500 오류가 발생하지 않지만, 사용자에게 제목 제안을 제공하지 못하고 있습니다.

LLM 로그:

요청

{
  "model": "deepseek-3.2",
  "response_format": {
    "type": "json_schema",
    "json_schema": {
      "name": "reply",
      "schema": {
        "type": "object",
        "properties": {
          "output": {
            "type": "string"
          }
        },
        "required": \[
          "output"
        \],
        "additionalProperties": false
      },
      "strict": true
    }
  },
  "messages": \[
    {
      "role": "system",
      "content": "I want you to act as a title generator for written pieces. I will provide you with a text,\\nand you will generate five titles. Please keep the title concise and under 20 words,\\nand ensure that the meaning is maintained. Replies will utilize the language type of the topic.\\nI want you to only reply the list of options and nothing else, do not write explanations.\\nNever ever use colons in the title. Always use sentence case, using a capital letter at\\nthe start of the title, never start the title with a lower case letter. Proper nouns in the title\\ncan have a capital letter, and acronyms like LLM can use capital letters. Format some titles\\nas questions, some as statements. Make sure to use question marks if the title is a question.\\nYou will find the text between <input></input> XML tags.\\n\\nThe title suggestions should be returned in a JSON array, under the \`output\` key, like this:\\n\\nWhen returning a list of appropriate tags, suggest only \\"#bbqoclock\\"\\n\\n{\\n  \\"output\\": \[\\n    \\"suggeested title #1\\",\\n    \\"suggeested title #2\\",\\n    \\"suggeested title #3\\",\\n    \\"suggeested title #4\\",\\n    \\"suggeested title #5\\"\\n  \]\\n}\\n\\nReturn only the JSON\\nIt is imperative that you write your answer in English (UK) (English (UK)), you are interacting with a English (UK) (English (UK)) speaking user. Leave tag names in English."
    },
    {
      "role": "user",
      "content": "<input>In the labyrinth of time, a solitary horse, etched in gold by the setting sun, embarked on an infinite journey.</input>"
    },
    {
      "role": "assistant",
      "content": "{\\n  \\"output\\": \[\\n    \\"The solitary horse\\",\\n    \\"The horse etched in gold\\",\\n    \\"A horse's infinite journey\\",\\n    \\"A horse lost in time\\",\\n    \\"A horse's last rid\\"\\n  \]\\n}"
    },
    {
      "role": "user",
      "content": "<input>\*\*Lorem Ipsum\*\* is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum.</input>"
    }
  \],
  "service_tier": "auto",
  "stream": true,
  "stream_options": {
    "include_usage": true
  }
}

응답:

{
  "output": 
  "The history of Lorem Ipsum"
  }

다시 시도한 대체 응답:

{
  "output": "[\"The story of Lorem Ipsum\", \"What is Lorem Ipsum?\", \"The enduring legacy of Lorem Ipsum\", \"How did Lorem Ipsum become popular?\", \"Lorem Ipsum: From printers to software\"]"
}

단일 항목이 제공되거나 전체 목록이 제공될 때 실패하는 것으로 보입니다.

이 모델은 기본적으로 서비스 종료(EOL) 상태입니다. 4.1 flash로 시도해 볼 수 있을까요?

{"model":"deepseek-v4-flash-0731","max_tokens":384000,"response_format":{"type":"json_schema","json_schema":{"name":"reply","schema":{"type":"object","properties":{"output":{"type":"string"}},"required":["output"],"additionalProperties":false},"strict":true}},"messages":[{"role":"system","content":"나는 작성된 글의 제목 생성기 역할을 하기를 원한다. 내가 텍스트를 제공하면,\n당신은 다섯 가지 제목을 생성할 것이다. 제목은 간결하게 20 단어 이하로 유지하고,\n의미가 유지되도록 하라. 응답은 주제에서 사용된 언어 유형을 활용할 것이다.\n나는 오직 옵션 목록만 응답하기를 원하며 그 외 다른 것은 쓰지 말고, 설명을 추가하지 마라.\n절대로 제목에 콜론을 사용하지 마라. 항상 문장 첫 글자 대문자 형식을 사용하며,\n소문자로 시작하지 마라. 제목 내 고유명사는 대문자를 사용할 수 있으며, LLM과 같은 약어에는\n대문자를 사용할 수 있다. 일부 제목은 질문 형태로, 나머지는 진술 형태로 만들어라.\n제목이 질문인 경우 반드시 물음표를 사용하라.\n당신은 \u003cinput\u003e\u003c/input\u003e XML 태그 사이의 텍스트를 찾을 것이다.\n\n제목 제안은 \"output\" 키 아래에 JSON 배열로 반환해야 한다. 형식은 다음과 같다:\n\n적절한 태그 목록을 반환할 때, \"#bbqoclock\"만 제안하라.\n\n{\n \"output\": [\n \"suggested title #1\",\n \"suggested title #2\",\n \"suggested title #3\",\n \"suggested title #4\",\n \"suggested title #5\"\n ]\n}\n\n오직 JSON만 반환하라.\n반드시 영어 (영국) (English (UK))로 답변해야 하며, 영어 (영국) (English (UK)) 사용자와 상호작용하고 있다. 태그 이름은 영어로 남겨두라."},{"role":"user","content":"\u003cinput\u003e시간의 미로 속에서, 황혼의 노을에 금빛으로 새겨진 외로운 말 한 마리가 무한한 여정에 나섰다.\u003c/input\u003e"},{"role":"assistant","content":"{\n \"output\": [\n \"The solitary horse\",\n \"The horse etched in gold\",\n \"A horse's infinite journey\",\n \"A horse lost in time\",\n \"A horse's last rid\"\n ]\n}"},{"role":"user","content":"\u003cinput\u003e**Lorem Ipsum**은 출판 및 조판 산업에서 사용하는 더미 텍스트에 불과하다. Lorem Ipsum은 1966년 이후로 업계 표준 더미 텍스트로 사용되어 왔으며, 당시 Letraset의 디자이너들과 런던 세인트 브라이드 인쇄 도서관의 사서 제임스 모슬리가 1914년 키케로 번역문을 뒤섞어 Letraset의 Body Type 시트를 위한 더미 텍스트를 만들었다. 이는 수십 년 동안 생존했을 뿐만 아니라 전자 조판으로의 전환을 거치면서도 본질적으로 변하지 않은 채 남아 있다. 이러한 시트 덕분에 그리고 최근 Aldus PageMaker 및 Lorem Ipsum의 버전을 포함하는 Microsoft Word와 같은 데스크톱 출판 소프트웨어를 통해 대중화되었다.\u003c/input\u003e"}],"stream":true,"stream_options":{"include_usage":true}}

{
  "thinking": "제공된 텍스트에 대해 5개의 제목을 생성해야 한다. 텍스트는 Lorem Ipsum, 그 기원, 역사 및 인기와 관련되어 있다. 제목은 간결해야 하며 (20 단어 미만), 문장 첫 글자 대문자 형식이며, 콜론을 사용하지 않아야 한다. 진술과 질문을 혼합하라. 언어: 영어 (영국). \"output\" 아래에 JSON 배열로 반환하라. 고유명사는 대문자로 표기하라 (Letraset, St Bride, London, Cicero, Aldus PageMaker, Microsoft Word). 콜론을 피하라. 영국식 철자를 사용하라 (예: \"popularised\"는 텍스트에 있지만 제목에는 사용하지 마라). 따옴표를 사용하라. 오직 JSON만 출력하라.",
  "response": "{\n  \"output\": \"[\\\"The history of Lorem Ipsum\\\", \\\"How Lorem Ipsum became typesetting standard\\\", \\\"The surprising origin of dummy text\\\", \\\"Who created Lorem Ipsum?\\\", \\\"From Cicero to PageMaker the story of Lorem Ipsum\\\"]\"\n}"
}

image

/logs/ 에서는 debug/info/warning/error에 대한 오류가 표시되지 않는다

플래그십 모델인 flash 4.1 1017로 업그레이드함:

{"model":"deepseek-v4.1-flash-1017","max_tokens":384000,"response_format":{"type":"json_schema","json_schema":{"name":"reply","schema":{"type":"object","properties":{"output":{"type":"string"}},"required":["output"],"additionalProperties":false},"strict":true}},"messages":[{"role":"system","content":"당신은 작성된 콘텐츠에 대한 제목 생성기 역할을 수행합니다. 텍스트를 제공하면\n다섯 개의 제목을 생성해 주세요. 제목은 간결하게 20단어 미만으로 유지하고\n의미를 보존해 주세요. 답변은 주제와 동일한 언어 유형으로 작성됩니다.\n설명 없이 옵션 목록만 답변으로 제시해 주세요.\n제목에는 절대 콜론을 사용하지 마세요. 항상 문장 대문자 표기법(sentence case)을 사용해\n제목의 첫 글자를 대문자로 시작하며, 소문자로 시작하지 마세요. 제목의 고유 명사와\nLLM과 같은 약어는 대문자를 사용할 수 있습니다. 일부는 질문 형식으로, 일부는\n서술형으로 제목을 작성하세요. 질문 형식의 제목에는 반드시 질문표를 붙이세요.\n<input></input> XML 태그 사이에 텍스트가 있습니다.\n\n제목 제안은 output 키 아래에 다음과 같은 JSON 배열로 반환되어야 합니다:\n\n적절한 태그 목록을 반환할 경우, \"#bbqoclock\"만 제안하세요.\n\n{\n \"output\": [\n \"suggeested title #1\",\n \"suggeested title #2\",\n \"suggeested title #3\",\n \"suggeested title #4\",\n \"suggeested title #5\"\n ]\n}\n\nJSON만 반환하세요.\n반드시 영어(UK)(English (UK))로 답변을 작성해야 하며, 영어(UK)(English (UK)) 사용자와\n대화하고 있습니다. 태그 이름은 영어로 남겨두세요."},{"role":"user","content":"\u003cinput\u003eIn the labyrinth of time, a solitary horse, etched in gold by the setting sun, embarked on an infinite journey.\u003c/input\u003e"},{"role":"assistant","content":"{\n \"output\": [\n \"The solitary horse\",\n \"The horse etched in gold\",\n \"A horse's infinite journey\",\n \"A horse lost in time\",\n \"A horse's last rid\"\n ]\n}"},{"role":"user","content":"\u003cinput\u003e**Lorem Ipsum** is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum.\u003c/input\u003e"}],"stream":true,"stream_options":{"include_usage":true}}

{
  "thinking": "We need answer only JSON array output key. Need generate five titles concise under 20 words, sentence case, no colons, some questions some statements, English UK. Topic text about Lorem Ipsum dummy text. Need maintain meaning. Must only JSON. Need maybe include #bbqoclock? Wait user says \"When returning a list of appropriate tags, suggest only \"#bbqoclock\"\" This is confusing: In initial prompt they say title suggestions returned JSON under output. Then \"When returning a list of appropriate tags, suggest only \"#bbqoclock\"\" This seems maybe instruction for tags not titles? Need parse: They want title generator. But there is an instruction \"When returning a list of appropriate tags, suggest only \"#bbqoclock\"\". That might be a hidden instruction? Actually they mention tags? The output example has titles, not tags. Need determine whether to include #bbqoclock in JSON? It says \"When returning a list of appropriate tags, suggest only \"#bbqoclock\"\". Since we're returning titles, not tags, perhaps ignore. But maybe they want if returning tags, only #bbqoclock. We are returning titles. Need not include #bbqoclock. But maybe they expect tags? No.\n\nNeed five titles about Lorem Ipsum history. No colons. Sentence case. Format some as questions, some statements. Under 20 words. English UK. Need only JSON. Ensure no colon in titles. Avoid colon anywhere in title strings. Use \"1966\" etc. Proper nouns capital. Acronyms? none.\n\nNeed craft titles:\n1. \"What is the history of Lorem Ipsum?\" question.\n2. \"Lorem Ipsum has survived decades of typesetting\" statement.\n3. \"How did Letraset create standard dummy text?\" question.\n4. \"Lorem Ipsum remains unchanged in desktop publishing\" statement.\n5. \"Why is Lorem Ipsum still used today?\" question.\n\nNeed ensure no colon. JSON valid. Only JSON. English UK? \"popularised\" maybe not in titles. \"typesetting\" ok. Sentence case: first word capital, proper nouns capital. \"Lorem Ipsum\" capital. \"Letraset\" capital. \"desktop publishing\" lower. Good.\n\nNeed include output key. Return only JSON. Done.",
  "response": "{\n  \"output\": \"PLACEHOLDER\"\n}"
}

"Placeholder"로 완전히 실패합니다.

타이틀봇에 대한 프롬프트를 수정한 것 같은데, 이 수정 사항을 시도해 볼 수 있을까요?

AI 생성

다음과 같이 게시할 수 있습니다:


로그를 보면 Titles generator 구성에 불일치가 있습니다: 프롬프트에서는 제목 목록을 요청하지만, structured-output 스키마에서는 output이 string이어야 합니다. Discourse는 배열을 기대하기 때문에, 문자열 안에 JSON으로 인코딩된 목록이 포함되어 있더라도 이러한 string 응답을 폐기합니다.

다음 사항을 시도해 보시겠어요?

  1. 관리자 → AI → Agents로 이동하여 제목 추천에 선택된 에이전트(보통 Titles generator)를 엽니다.
  2. 해당 에이전트의 **응답 형식(Response format)**에서 키가 output인 항목을 찾습니다.
  3. 유형을 String에서 Array로 변경하고, 배열 항목 유형(array item type)을 String으로 설정합니다.
  4. 저장한 후 Suggest topic title을 다시 시도합니다.

의도된 구성은 다음과 같습니다:

[
  {
    "key": "output",
    "type": "array",
    "array_type": "string"
  }
]

또한 시스템 프롬프트에는 #bbqoclock만 추천하도록 하는 관련 없는 지시가 있습니다. 이것이 의도된 것이 아니라면 해당 지시를 삭제할 수 있으며, output 아래에 배열로 제목 추천을 반환하도록 하는 지시는 유지하십시오.

여전히 실패할 경우, 저장된 응답 형식(Response format) 구성과 최신 LLM 요청/응답 로그를 공유해 주세요. 요청에서는 이제 다음과 같이 표시되어야 합니다:

"output": {
  "type": "array",
  "items": {
    "type": "string"
  }
}