All Lie algebras in this question are finite-dimensional and defined over a field $k$ of characteristic $0$ which I'm happy to take to be $\mathbb{R}$ or $\mathbb{C}$.

$\DeclareMathOperator\gr{gr}$Let $L$ be a nilpotent Lie algebra. It is then filtered by its lower central series, and we have an associated graded nilpotent Lie algebra $\gr L$. It is definitely not the case that $L$ and $\gr L$ have to be isomorphic; see Malcev Lie algebra and associated graded Lie algebra for some examples.

Question: what kinds of conditions can I put on $L$ that ensure that it is isomorphic to $\gr L$? E.g. if the field is $\mathbb{R}$ are the there geometric/topological/algebraic conditions on the associated simply-connected nilpotent Lie group that ensure this?

`\DeclareMathOperator`

, as in $\DeclareMathOperator\gr{gr}$$\gr L$`$\DeclareMathOperator\gr{gr}$$\gr L$`

(or its one-shot version $\operatorname{gr} L$`\operatorname{gr} L`

) instead of $\text{gr} L$`\text{gr} L`

. I have edited accordingly. $\endgroup$