When I was in middle school I remember reading a lovely book about a girl who was raised by a robot. She has braids and there was artwork at the beginning of each chapter. She has to escape her home when an alien attacks her home, I think it was looking for her because she was the last human? Her "mother" robot (I remember it had a name like mother, but it stood for something) is broken and she travels either looking for a way to fix her with a very tall alien or to look for the people on the cover of her old book that has a robot, girl, and an alien on the cover.
I think this might be The Search for WondLa by Tony DiTerlizzi, first published in 2009.
Eva Nine is a curious and sensitive twelve-year-old who has existed only in a subterranean home called Sanctuary, cared for by a robot named Muthr. Eva's great desire is to go aboveground, and her wish comes true, though not as she had imagined. On the surface, Eva goes in search of other humans--she has never met one--and soon meets both friend and foe.
One of the reviews mentions the attack
Eva Nine's house goes under siege by a a large monster-like hunter and everything she knows is destroyed. She must make her way in a new world and find where she came from and maybe make some interesting friends along the way.
There are illustrations mentioned in that review, and they can be found online.
I can't talk about this book without talking about Tony DiTerrlizzi's beautiful illustrations. They are through-out the book and they add such a wonderful element to the reading experience. You get to look at the author's creations through their eyes and I was very happy for it. I wish more books would do this.