With the right prompt, I get the following results for a few examples I tried (first attempts, no cherry-picking).
Input: ( ) ( ( ) )
Output: Balanced
Input: ( ) ( ( )
Output: Unbalanced
Input: ) (
Input: ( ) ( ) ( )
So it is definitely able to learn balancing a small number of parentheses.
With the right prompt, I get the following results for a few examples I tried (first attempts, no cherry-picking).
Input: ( ) ( ( ) )
Output: Balanced
Input: ( ) ( ( )
Output: Unbalanced
Input: ) (
Output: Unbalanced
Input: ( ) ( ) ( )
Output: Balanced
So it is definitely able to learn balancing a small number of parentheses.