I continue to work on a personal project focused on big cats. As a result of my work, I have recently launched a newsletter featuring big cat news in English. Feel free to subscribe on Facebook, Bluesky, Twitter, or Telegram at @BigCatsNews.
Lately, I have concentrated on developing a reliable system for automatically translating news from English to Ukrainian using various AI models. The process begins with a basic translation model, which is then followed by an analysis step that checks for translation issues and provides suggestions for improvement. These suggestions are applied using a simpler and more cost-effective model. If the advanced model fails to detect translation issues in two consecutive iterations or reaches 16 iterations, the system repeats the process using an even more advanced model.
For the initial translation and analysis, I used DeepSeek R1 for over a month. Although this model offered a good balance between cost and quality, it made several errors, did not always follow instructions, and required frequent prompt adjustments.
Recently, I di
... show moreI continue to work on a personal project focused on big cats. As a result of my work, I have recently launched a newsletter featuring big cat news in English. Feel free to subscribe on Facebook, Bluesky, Twitter, or Telegram at @BigCatsNews.
Lately, I have concentrated on developing a reliable system for automatically translating news from English to Ukrainian using various AI models. The process begins with a basic translation model, which is then followed by an analysis step that checks for translation issues and provides suggestions for improvement. These suggestions are applied using a simpler and more cost-effective model. If the advanced model fails to detect translation issues in two consecutive iterations or reaches 16 iterations, the system repeats the process using an even more advanced model.
For the initial translation and analysis, I used DeepSeek R1 for over a month. Although this model offered a good balance between cost and quality, it made several errors, did not always follow instructions, and required frequent prompt adjustments.
Recently, I discovered that Google’s new Gemini 2.5 Pro, as seen on LiveBench, scores highly in language tasks. I decided to replace DeepSeek R1 with Gemini 2.5 Pro, and the results have been significantly improved with fewer issues. I am now considering reducing the number of instructions in the prompt. It is interesting to note that I attempted to use Gemini 2.0 Pro last month, but it did not perform well with Ukrainian text. The progress made in just the past month and a half is remarkable.
For the analysis phase, I initially relied on DeepSeek V3 and V3–0324. However, these models occasionally removed unexpected text and introduced typos, failing to adhere to instructions fully. As a result, I switched to Gemini 2.0 Flash, which performs better, is more cost-effective, and follows all advanced model instructions.
Integrating Google AI into my Laravel project was challenging since it is not compatible with the OpenAI PHP library. To overcome this, I used Laravel’s HTTP request tools instead of the Google AI-specific library, which required different formatting.
Since switching to simple HTTP requests, I have implemented caching for prompts used in the final analysis, which is done with Anthropic’s Claude 3.7 Sonnet in thinking mode, which supports a 64k token limit. Although this limit is expensive and only slightly cheaper than o1-preview, it has allowed me to modify the prompt for analysis and translation suggestions effectively.
Caching requires using the messages endpoint, which differs from OpenAI’s chat completions endpoint. The system prompt now includes multiple parts, with only the static sections being cached. To ensure proper handling of tenses and chronology, I include the news date separately, without caching it, after the initial cached prompt with instructions.
This approach has proven successful, and I have also implemented asynchronous batch requests in the background to reduce costs further by half. I hope to continue optimizing these processes in the near future.
The combination of Gemini 2.5 Pro and Claude 3.7 Sonnet now provides excellent translation results in most cases, often eliminating the need for manual editing. You can review the results on the website https://bigcats.org.ua/news by looking at articles from today and yesterday.