Excellent application context! This is a fascinating use case because librarians' classification logic often follows institutional coherence rather than pure semantic similarity - they're optimizing for patron discovery patterns and shelf organization, not just conceptual proximity.
For this "imitative subject classification" scenario, I'd strongly recommend higher max_neighbors with moderate ef_search (e.g., max_neighbors=32-48, ef_search=50-100). Here's my reasoning:
Why dense graph structure suits library classification:
-
Transitivity of classification schemes: Library classifications often follow hierarchical or faceted structures where "if A is classified like B, and B like C, then A should be classified like C." Dense connections better preserve these transitive relationships through multiple direct paths.
-
Clustering of institutional practices: Documents that librarians classify similarly tend to form tight, well-defined clusters based on established cataloging rules. For your robotics example, all automation-related papers would ideally form a dense neighborhood regardless of whether they emphasize AI, mechanical engineering, or control systems. High max_neighbors ensures these institutionally-defined clusters remain strongly interconnected.
-
Boundary precision matters: When a document sits at the boundary between "automation systems -- robot technologies" and "artificial intelligence -- machine learning applications," librarians need to see the most relevant precedents from their institution's past decisions. Dense graphs excel at surfacing these critical boundary cases because they maintain rich local structure.
Why moderate (not maximum) ef_search is sufficient:
The library's existing corpus represents a curated, rule-governed space rather than an open-ended semantic space. You're not exploring for novel connections but rather finding the most applicable existing precedent. A moderate candidate list ensures you explore enough to avoid obvious local minima while trusting the dense graph to guide you to the established classification patterns.
Practical configuration suggestion:
space: cosine # normalized for consistent classification regardless of document length
max_neighbors: 40 # dense enough for transitive classification patterns
ef_construction: 200 # invest in quality graph construction since the corpus is relatively stable
ef_search: 75 # moderate exploration, trusting the dense structure
This configuration essentially says: "Build a richly connected map of our institutional classification practices, then efficiently navigate to the most relevant neighborhood when classifying new documents."
The key insight is that you're modeling classificatory practice rather than pure semantic similarity - the dense graph better captures how librarians consistently apply rules across similar documents.