A large data set on stomach content (over 27,000 individual fish) – collected in the Barents Sea in 2015 – was used to examine ontogenetic and interspecific changes in diet with size for 35 fish species. The analysis combined the use of hierarchical clustering and random forest. Two different diet metrics were used (% weight of prey types per weight of stomach content or per weight of fish, the latter reflecting also feeding intensity), and data were analysed based on average diet of predator groups (species and size groups) across the entire sample series (from the whole Barents Sea in different seasons), or for data broken down by geographical areas and seasons. Similar trophic groups (clusters) were identified for the various data sets suggesting that the results on trophic structure were robust. The trophic groups including size information were broadly similar to groups found earlier with data averaged at species level. Hierarchical clustering produces a hierarchy of trophic groups (or trophic guilds) at various levels of diet dissimilarity. With 12 clusters identified, one cluster had fish as dominant prey, and 5–6 others had either plankton or benthos as dominant prey. The clusters tended to be distinct and homogenous with one dominant prey category in average diet (often > 60 %). This was especially the case for the plankton clusters, with copepods, euphausiids, hyperiid amphipods, or gelatinous zooplankton as dominant prey in each of 4 trophic groups. The benthos clusters tended to be less dissimilar with more overlap in diet composition, with predominance of either hard-shelled forms (echinoderms and molluscs) or softer prey (polychaetes and crustaceans) for groups of clusters. There were clear patterns of ontogenetic shifts in fish diet. Fish that clustered as piscivores at larger size tended to grow from being planktivores when smaller. Smaller species of planktivores or benthivores shifted position among trophic groups but remained within the categories of planktivores or benthivores, respectively. Taxonomy (species) tended to be more important than size for explaining the diet composition of the different clusters of fish predators.