In the mathematical area of graph theory, a clique is a subset of vertices of an undirected graph where every two distinct vertices are adjacent, meaning there is a direct edge connecting them. In other words, a clique is an induced subgraph that is complete.
In practical terms, cliques are used to identify tightly-knit communities within a network, as they represent groups of nodes with strong mutual connections. This concept is crucial in community detection, where nodes in a clique exhibit high levels of interaction or communication based on the edges connecting them.
Although cliques are similar to similarity searches in vector databases, which identify closely related data points, they focus on the structural connectivity within a graph rather than on vector similarity.