The two-story structure with six side chambers and decorative pillars (none of the structures required beams to support their ceilings) was likely used for community meetings, sacrifices and religious ceremonies.
A massive stone table in the center suggests it might have been a banquet hall.
But the "palace's" function is as cryptic as that of Guyaju itself.
Some believe the compound is a bunker beneath a lost beacon tower of the Han Great Wall. Others contend it was a bandit lair or a military outpost during the Tang Dynasty (AD 618-907).
The most popular theory is that Guyaju was a haven for the ethnic Xi, a tribe that fled bondage or war under the Liao Dynasty (AD 916-1125).
Be they outlaws, war refugees, soldiers, or someone else altogether, it's almost certain they had little inkling they would literally shape curiosity about their lives a millennia later.
But that's exactly what these ancient people did when they chiseled the cliff-side dwellings that would become a heritage site for modern visitors to wonder at - and about.