I've heard from dating coaches that it's important to compliment a girl but also denigrate her sometimes, usually in a playful way. Or in a form of teasing. The so called "push pull" technique. One of those coaches once gave a model called "you are so X, it's just like Y". For example, "you are so cute, you are like my little sister". "you are so cute" is a compliment, but "you are like my little sister" is denigrating. So it's a pre made model for you to use it. And I think I came up with another model.

So I was talking to this girl in class today, we were doing an assignment together. She was telling me how she prefers to read all the chapters of the book and then do the exercises, bla bla bla, she is a good student. Then suddenly I said "Well, at least you are persistent and put a lot of effort." (I'm trying to translate from my language what I said. That's as close as it gets.) And then she became intrigued. She said - while smiling - "wait, what do you mean I'm persistent ?". "Are you saying I'm stupid but at least I'm persistent ?" - but she wasn't angry, she was smiling to me while she tried to figure out what I meant but that. I didn't give an answer to her because I wanted to keep her intrigued.

The "At least" suggests something denigrating, but not clear what. Then you just follow up with a compliment:

"At least you are (insert compliment here)."