This sound a lot like what JL2579 does in this video:
Basically, it's a room, where a certain # of Villagers and Doors exist, creating an impromptu "Village". When the button is pressed, a villager gets picked up by a Minecart, and travels by rail to an "Examination" zone, where it's determined whether the trade is good or not. If it is, by way of levers and curved rails, it is conducted to the appropriate holding pen. If it's not, the Villager is killed to make room for other villagers to spawn, with better trades.
Keeping the population of villagers below what the "village" can support is essential, because it makes it so that villagers keep generating. This is also a VANILLA setup, so it has a LOT of room for improvement with the mods FTB adds.