Nearly-Headless Nick clearly presumes that knowledge of Hogwarts' huge house-elf population should be common knowledge to the average student when Hermione asks about them here:
"There are house-elves here?" she said, staring, horror-struck, at Nearly-Headless Nick. "Here at Hogwarts?"
"Certainly," said Nearly-Headless Nick, looking surprised at her reaction. "The largest number in any dwelling in Britain, I believe. Over a hundred."
"I've never seen one!" said Hermione.
"Well, they hardly ever leave the kitchen by day, do they?" said Nearly-Headless Nick. "They come out at night to do a bit of cleaning...see to the fires and so on...I mean you're not supposed to see them, are you? That's the mark of a good house-elf, isn't it, that you don't know it's there?" (Goblet of Fire, Chapter 12, The Triwizard Tournament)
Yet it's difficult to see how she or anyone else should be expected to know about them, considering that:
- As Nick says, house-elves are by their very nature secretive and would regard it as the height of tardiness to let themselves be seen by a student.
- From my knowledge, only Fred Weasley, George Weasley and James Potter are on record as ever making it down to the kitchens at this point. The other students seem to have the same attitude as Hermione has always had - they just eat the food that magically appears on their plates and don't ask questions about where it comes from.
- There appears to be no literary record of the house-elves' existance.
"It's all in Hogwarts: A History. Though of course, that book's not entirely reliable. "A Revised History of Hogwarts" would be a more accurate title. Or "A Highly Biased and Selective History of Hogwarts, Which Glosses Over the Nastier Aspects of the School"."
"What are you on about?" said Ron, though Harry thought he knew what was coming.
"House-elves!" said Hermione loudly and proving Harry right. "Not once, in over a thousand pages, does Hogwarts: A History mention that we are all colluding in the oppression of a hundred slaves!" (Goblet of Fire, Chapter 15, Beauxbatons and Durmstrang)
How was Hermione realistically supposed to know about the house-elves?