בעיית השימוש לאחר שימוש בתרגום AI

סיכום מבוסס בינה מלאכותית

The user co_choa is experiencing an issue with AI translation in Discourse, where after two days of processing, only input tokens are being used without any output. They suspect the previous posts may have already been translated. nat advises checking the configuration, particularly the AI translation backfill hourly rate, which was initially set too high at 1,000, and recommends lowering it to 50 to avoid rate limits. They also suggest using the data explorer plugin to analyze the AiApiAuditLog and verify translation activity. co_choa confirms they are using GPT-4.1 Nano for Japanese and English translations, but the query returns no results, possibly due to missing the data explorer plugin. nat confirms the query should work if the plugin is installed. co_choa plans to install it later, as the forum is currently in use.

I followed the official tutorial to configure Discourse AI for translation and set it to translate all past posts over a span of days. Indeed, this resulted in a substantial amount of input and output tokens. However, after two days, I encountered a situation where only input tokens were being processed without any output. I am unsure of the cause—could it be that all the previous posts have already been translated? If so, what measures can I take to reduce token input and thereby conserve costs?

Hey there, have you followed these recommendations?

The usage graph definitely looks concerning. Can you try out this data explorer query:

SELECT 
  a.id,
  a.language_model,
  LENGTH(p.raw) as raw_length,
  a.response_tokens,
  a.raw_request_payload,
  a.raw_response_payload,
  a.topic_id,
  a.post_id
FROM ai_api_audit_logs a
LEFT JOIN posts p ON p.id = a.post_id AND p.deleted_at IS NULL
LEFT JOIN topics t ON t.id = a.topic_id AND t.deleted_at IS NULL
WHERE a.created_at > CURRENT_DATE - INTERVAL '1 days'
AND p.deleted_at IS NULL
AND t.deleted_at IS NULL
AND p.user_deleted = false
AND a.feature_name = 'translation'
AND LENGTH(p.raw) < 1000
AND a.response_tokens > 10000
ORDER BY a.created_at DESC
LIMIT 100

The query should show you the number of response tokens used based on the post’s raw length. Ideally you should see a similar number, not more than 1.5x tokens. The AiApiAuditLog will help with determining what is going on.

Additionally please share,

  • What model are you using?
  • What’s your backfill hourly rate? I suggest to keep it to a low value, like 50 for starters.
  • How many languages are you supporting? Does your selected model support them?

הגדרתי את GPT-4.1 Nano כמודל התרגום. קצב ה-backfill השעתי נקבע בעבר על 1,000, אך היום התאמתי אותו ל-100. הפעלתי תמיכה הן ביפנית והן באנגלית, ומודל זה אכן תומך בשפות אלו.

כן, 1000 זה כנראה לא רעיון טוב ואני צריך להוסיף כאן מגבלה של הגדרות אתר.

אני לא בטוח איך ה-API של OpenAI מתמודד עם פגיעה של כ-3000 פעמים בשעה. בעצם עבור ההגדרה שלך, לכל פוסט אנו מבצעים: 1: זיהוי שפה, 2: תרגום ליפנית, 3: תרגום לאנגלית.

אני מציע להוריד את זה עדיין ל-50 ולראות איך זה הולך.

נחיל דרך להציג את התקדמות התרגום של כל האתר גם בעתיד הקרוב.

Furthermore, when I execute the query command you provided, the database returns no results. Is there perhaps a need for some customization or modification?

מעניין, השאילתה הזו אמורה לעבוד. האם יש לך את התוסף discourse-data-explorer?

בסדר גמור, אני אנסה זאת קודם. תודה.

אני אתקין אותו לאחר מכן ואנסה שוב. כרגע, בנייה מחדש של הפורום אינה אפשרית מכיוון שהמשתמשים עדיין משתמשים בו באופן פעיל.