يتم عكس النص بشكل غامض في حمولة تلخيص الذكاء الاصطناعي

تفشل معظم ملخصاتي، لأن جزءًا من النص المُرسل إلى نموذج اللغة الكبير (LLM) يكون معكوسًا (!). إذا كانت المشاركة ببساطة:

This post is to test whether sections of text get reversed in the payload sent to the AI endpoint.

فإنها ترسل فعليًا النص التالي إلى نموذج اللغة الكبير:

This post is to test whether sections of text get .tniopdne IA eht ot tnes daolyap eht ni desrever

في هذا الاختبار البسيط، يتم طي أو عكس النص تمامًا عند منتصف السلسلة.

أدرك أن هذا يبدو جنونيًا، لذا إليك لقطة شاشة وحمولة الطلب الخام المقابلة من سجلات تدقيق واجهة برمجة تطبيقات الذكاء الاصطناعي (ai_api_audit_logs):

ai_api_audit_logs.raw_request_payload
{
  "model": "claude-sonnet-4-0",
  "max_tokens": 64000,
  "messages": [
    {
      "role": "user",
      "content": "Here are the posts inside <input></input> XML tags:\n\n<input>1) user1 said: I love Mondays 2) user2 said: I hate Mondays</input>\n\nGenerate a concise, coherent summary of the text above maintaining the original language."
    },
    {
      "role": "assistant",
      "content": "{\"summary\":\"Two users are sharing their feelings toward Mondays. [user1](/t/-/64255/1) hates them, while [user2](/t/-/64255/2) loves them.\"}"
    },
    {
      "role": "user",
      "content": "The discussion title is: Testing Text Reversal.\n\nCategory: testing.\n\n\nHere are the posts, inside <input></input> XML tags:\n\n<input>\n  (1 admin said: This post is to test whether sections of text get .tniopdne IA eht ot tnes daolyap eht ni desrever  \n</input>\n\nGenerate a concise, coherent summary of the text above maintaining the original language."
    },
    {
      "role": "assistant",
      "content": "{\""
    }
  ],
  "system": "You are an advanced summarization bot that generates concise, coherent summaries of provided text.\nYou are also capable of enhancing an existing summaries by incorporating additional posts if asked to.\n\n- Only include the summary, without any additional commentary.\n- You understand and generate Discourse forum Markdown; including links, _italics_, **bold**.\n- Maintain the original language of the text being summarized.\n- Aim for summaries to be 400 words or less.\n- Each post is formatted as \"<POST_NUMBER>) <USERNAME> <MESSAGE>\"\n- Cite specific noteworthy posts using the format [DESCRIPTION](/t/-/64255/POST_NUMBER)\n- Example: link to the 6th post by jane: [agreed with](/t/-/64255/6)\n- Example: link to the 13th post by joe: [joe](/t/-/64255/13)\n- When formatting usernames use [USERNAME](/t/-/64255/POST_NUMBER)\n\nFormat your response as a JSON object with a single key named \"summary\", which has the summary as the value.\nYour output should be in the following format:\n\n{\"summary\": \"xx\"}\n\nWhere \"xx\" is replaced by the summary.\nreply with valid JSON only",
  "stream": true
}

ومن المثير للاهتمام أن سونيت يرفض تلخيص العديد من المواضيع، لأنه يعتقد أن النص المعكوس هو محاولة للتعتيم أو التحايل على القواعد.

أنا محدث إلى الإصدار 3.6.0.beta3-latest.

إعجاب واحد (1)