I think a better term to use most of the time would be technological refinement, since much of what would be applicable to gameplay would be refinement of current technology rather than advancing to a whole new level. (Mostly semantics I know, but it serves better to make sure people don't get the wrong idea and immediately think gunpowder/rifles!?! etc.) Scratch that, after reading through my own post I realized this is obviously not feasible xP
Something similar to what Brandon posted earlier sounds alright, although I'd add the limitation that you can't order your dwarves to commit to researching new stuff, but rather keep it something that happens naturally depending on the resources you have available, how much actual stuff you craft with them and the personality of the dwarf doing it. If you have a lot of metals available and craft a lot of weapons, you'd be more likely to have a particularly creative dwarf try to mix some other types of metals in, thus discovering a new alloy that might be both better or worse for the weapon in question. That way, having a creative dwarf go about experimenting could be both good or bad. Iff he actually manages to discover something useful it'd be a great boon to your fortress, but you'd also risk losing precious materials without learning anything and end up with sub-par equipment.
Balancing the whole system would of course be of utmost importance. Discovering new stuff would have to give enough of a boon to be of interest, without being so strong that you'd feel you have to maximize everything to stand a chance. This is something I'm a bit annoyed at with the current game regarding quality levels. It's faaar too easy to get max lvl craftdwarves to crank out loads of masterwork stuff that you often feel using sub-par equipment isn't worth it. It should be balanced to higher level equipment/technology is more of a subtle boon that's awesome to have, but hard to reach, thus keeping lower tier stuff still useful.
Losing technology is also an interesting prospect. For those familiar with Tolkien and The Silmarillion/The Children of Húrin we have there the "petty dwarves". Having been banished and moving west they settled in the caves of Nargothrond (Nulukkhizdīn in their language), where they eventually lost much of their lore in smithcraft and mining, instead slowly delving to perfect the natural caverns of the area, until they were later driven out and hunted near extinction by the elves. Having some dwarf civs similar to this could provide a very different and challenging game, settling in caves or entrances to the underground, living off herbalism and slowly delving out homes for themselves. It'd also lend for a natural development of alternate human and elf civs, for example we could get mining elves similar to dark elves of many fantasy settings, living in the underground either in mined dwellings or withing "mushroom retreats".
Setting up distinct tech levels as someone suggested would be a good way to accomplish this, as you could link certain types of architecture and site alghorithms to the tech levels and civ in question (ofc mixing some randomization into it as well). One could then set it up to not be too mindboggingly confusing for new players, for example having a 1-10 lvl for each tech type, such as mining, masonry, farming, smithing, magic etc. Within each lvl there'd be a set of different available refinements, and different parameters needed to advance or decline. For example, in metallurgy or smithcraft depending on how you'd want to split it up, you could different metals and alloys being allowed for each lvl, as well as certain techniques granting higher quality lvls, less wasted materials, bonuses to certain attributes such as piercing for weapons, or arrow deflection for armor. To reach a higher lvl you'd need to know a certain amount of the sub-set of the current lvl, but not all, leaving room for civs that while highly skilled in smithing might lack the skill to work a certain metal, either due to lacking the raw materials or just bad luck. To spice things up a bit each "tech" could also grant some minor flavor text or similar to the item affected, or different graphics/colors if applicable.
It should also be balanced to that genning a longer world wouldn't automatically make civs reach higher tech lvls. The "cap" so to speak should be reachable withing the first hundred years, and after that you'd reach some overall equilibrium, with certain civs lower than they started, some higher. This should also provide ample material for lost fortresses etc containing old lore to find in adventure mode, or from fortress mode by paying mercenaries/adventurers to seek lost treasure.
It's also very important to balance the rate at which you can advance within fortress mode. It's obviously important to make sure you can advance your own civ at a decent pace by playing, and not just relying on world gen to randomly give you a maxed out civ for those inclined to seek such games. If one dedicates ones fortress to knowledge by building libraries, training a plethora of skilled craftsmen and trading with other cultures from far and wide, it should be possible to end up with your fortress as the hub of knowledge in the known world, with scholars coming from far and wide to research its vast libraries and young children being sent for tutilage from one of your many legendary craftsmen. This should be of course require a lot of hard work, and also attract A LOT of unwanted attention from various factions, but probably be one of the more rewarding end goals to reach.
Or, if you're more of the brute force type, just train the best military in the world, find the most advanced civ, then go and plunder their cities for knowledge and burn the remains ^^