A Fire Upon the Deep by Vernor Vinge
Thousands of years hence, many races inhabit a universe where a mind's potential is determined by its location in space - from superintelligent entities in the Transcend, to the limited minds of the Unthinking Depths, where only simple creatures and technology can function. Nobody knows what strange force partitioned space into these 'zones of thought', but when the warring Straumli realm use an ancient Transcendent artefact as a weapon, they unwittingly unleash an awesome power that destroys thousands of worlds and enslaves all natural and artificial intelligence.
Fleeing the threat, a family of scientists, including two children, are taken captive by the Tines - an alien race with a harsh medieval culture - and used as pawns in a ruthless power struggle. A rescue party, not entirely composed of humans, must free the children - and retrieve a secret that may save the rest of interstellar civilization.