Seven of Nine, along with Voyager's encounter with the Borg, to me anyway, seems to quite suddenly appear. Out-of-universe, what was the reason to introduce the new character of Seven-of-Nine midway through the series Voyager?
In an interview with Stephen Poe, this very issue was raised:
Q: Why was Seven (Jeri Ryan) a Borg picked as the new character? Was is sex appeal or something else? Pat
SP: Good question. Seven functions on two levels. First, she provides the perfect foil for Janeway- something Voyager did not have previously. Kirk had Spock, Picard had Data, but Janeway's foil was missing. The result is, Janeway's character has been strengthened significantly. This is very apparent throughout this current season. Second, Seven is a perfect example of something Star Trek has always done superbly well: force each of us as viewers to look in the mirror again and realize this too is part of what it's like to be human. In this case, it forces us to confront old ideas, stereotypical images, pre-conceived notions. At first look, Seven appears to be blatant T&A aimed squarely at the male demographic. But if we can get past that "image" what do we see? A character who, because she was raised by the Borg, has not got a clue as to what effect her appearance might have on a male crewmember. In that sense she is sexless. What we then discover is here is a FEMALE character (do I have to shout Hooray!?) who is strong-willed, independent, tough, takes no crap from the Captain, calls everyone on their hypocrisies and silliness ---whoa! That's one heck of a role model for women everywhere. Jeri Ryan told me one day when we were discussing this point that she gets a lot of mail from women and the letters generally all start out the same way: "I really, really, really did not want to like your character - but I do. "
However, I suspect aiming to improve ratings was probably also one of the angles. Considering that Seven essentially replaced Kes, if things had been working well, there probably wouldn't be a need to change the format. As explained in this article from the time, the ratings of Voyager were increased by 60 percent following Seven's introduction.