My attempt in integrating llm in
chess annotation with gpt3.
The idea is to collect features such as material value, mobility value, king threats value, etc for both sides and a final evaluation of the position. Send those info to llm and let it do the talking. Get back the response and save it as annotation.
If you have more features to send, the better. If we need llm to comment on passers, then scan the board for passers and tell llm that there is a white passer in a4 square for example, this way llm can accurately tell that there is a passer in a4 square. This is typical for weaknesses like doubled pawns, isolated pawns, hanging pieces. Can also be tactical motifs like forks - which square a knight can jump to fork opponent's non-knight pieces and what is the square of this knight, etc. To make llm comment on material quality, we need to calculate the material balance how many white rooks, etc.
An interesting challenge is to interpret variation. Given engine variation, walk the moves and get the positions. Get the features and values of those positions, send them to llm and prompt that this is the sequence of moves and positions with features and values also send the final evaluation of the pv.
I think llm now can generate more interesting comments with some clever prompts. Chess fine-tuned llm is also interesting to try.
Have fun with your explorations.