Hello, Codeforces!
For the new members of the community, I would like to remind you that Polygon (https://polygon.codeforces.com/) is a system developed and maintained by Codeforces for preparing programming problems. It is there that authors and coordinators develop all the problems for the rounds. Moreover, I believe a significant (large?) portion of the problems for other competitions is also developed there: various stages of ICPC, national competitions of different levels, educational problems for various courses, etc. In 2023, more than 50000 problems were prepared in Polygon (only those for which a package was compiled are counted)!
Large language models are becoming an increasingly integral part of our lives, taking over routine and monotonous tasks.
With their help, problems created in Polygon will now have fewer typos and incorrect language constructions.
We have recently implemented three features in Polygon to ease routine tasks:
- Translation of solutions into another programming language
- Translation of problem statements into another language
- Advice on improving the texts of problem statements
All these features operate on request and typically take 30-120 seconds for a response from the AI service (currently, only OpenAI GPT in our case).
While waiting for translations of solutions and statements is acceptable, waiting for advice on improving text was too tiresome.
I recently developed several problems and, despite my experience in writing statements (and even having the highly recommended Grammarly plugin in my browser), the automatic advice tool for improving text helped enhance them.
Another example: I checked the working versions of the Hello 2024 problems about a day before the round started and took the time to manually launch the edit prompter. In most (almost all?) problems, it indeed suggested errors or deficiencies in English/Russian. The corrections were minor, but why leave mistakes if they can be fixed?
Indeed, such a tool can greatly improve the grammar of statements, but using it on demand was tiresome.
As a result, I implemented background processing of the problem statements to simplify and speed up the application of this feature. Now, Polygon analyzes problem statements in the background to find shortcomings. If any are found, you will see a similar block in the problem's sidebar.
Clicking on the review link will open a tool for merging changes.
I circled one of the triangles. Click on them to transfer the proposed changes (on the right) to the text of the statement (on the left). You can only transfer for a whole paragraph at a time (that's how the tool works), but you can manually correct the left if you want to transfer part of the changes or modify them.
At the bottom of the form is a Save button that will save the updated statement.
I hope that authors and coordinators will not neglect this feature and that there will now be fewer typos and language errors in statements.
I would like to note that I see no reason to worry about data leakage when processing statements with the AI service. For example, OpenAI explicitly states that data from API requests cannot be used for training: https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance. After all, we've been googling problem ideas for many years to ensure the problem is new. It seems to be a similar case.
However, if you are still concerned and want to explicitly disable this feature, it can be done:
- For a problem: via the Advanced link on the General info tab.
- In user settings: disable this feature for all new problems you create.
Thanks for reading! Stay tuned for more updates.
Very cool!
Fun fact:
It seemed that way to you :)
(actually, I fixed it, thanks)
vrintle
Ah yes, just few days ago on Polygon, we were talking about how cool it is. I didn't expect we were trying out a beta feature though.
[the post has been edited, this comment does not make sense anymore]
I was confused about this comment at first, but then I noticed that there is no "history" link for blogs written by MikeMirzayanov, unlike blogs written by community members, so we have no way of seeing the edit history. I wonder if this is a bug or a feature 🤔
EDIT: I found that this blog has the option to view history. I guess it's a toggleable option, then?
This comment has been deleted.
This AI suggestion confuses me — do I need to add a comma before “and”? Sometimes I didn’t, and it suggested me to add; sometimes I did, but it suggested me to remove.
I’m Chinese and not familiar with English and now I’m not sure I should use “apples, bananas and grapes” or “apples, bananas, and grapes”.
I think this comma is optional, and both variants are almost always permissible. You can read https://en.wikipedia.org/wiki/Serial_comma. Advice from AI should be taken as hints, not as instructions for action. It's normal to have both false positives and false negatives.
It's such a happy thing to find that we're going to have a powerful tool with AI in it -- Polygon.
So thank you mike.
Cool) I would like to see a dark theme in codeforces.... Sometimes it happens, my eyes hurt at night because of the bright website.
There is a plugin for that plugin post
You can just use Dark Reader
thank you so much
That's great :)
Please implement so that AI can solve the problem and fully prepare it.
Are there some good tutorials on how to use polygon? Just want to try it.
https://quangloc99.github.io/posts/polygon-codeforces-tutorial/
cool!
Banger features from Polygon devs again!
I still love Polygon, but I still has some concern using it. I'm not sure where to ask, so I'll write it here instead. Occasionally, Polygon has zero invokers, making everything unoperational. The most reason post about this problem I can find is here https://codeforces.net/blog/entry/122626.
Just wondering, any plans to improve the system's reliability? It’s a bummer when things go unresponsive while I’m prepping my problems.
Still, huge thanks for bringing in those awesome game-changing features!
I've implemented a lot of changes in transport and scheduling algorithms for invokers. Now I'm monitoring the situation.
I tried to use automatic translation from Python to C++ and it's very good. Still I have found a test case (with recursive generators of infinite sequences) where it does not work at all and some cases where complexity changes from linear to quadratic. Is there a standard way to contribute the code to improve the AI algorithm?
cool
Yekjd
Going with trend!!!!!! Cool!!!