d0fc0114da66
Find nearest-neighbor concepts to a candidate
Returns the top-K active concept nodes most similar to a candidate concept by symmetric cosine similarity over the node embedding column. The App Modeling Agent uses this to see the nearest existing concepts when resolving a candidate, and judges whether the candidate is the same concept, a variant, or genuinely new. No score threshold is applied — every returned neighbor is ranked, none filtered out. The candidate is embedded server-side using the same symmetric document format as the stored embeddings (title: <label>: <candidate_name> | text: <candidate_text>) with RETRIEVAL_DOCUMENT task type, so candidate-vs-stored cosine distance is meaningful. When candidate_text is omitted, the candidate name alone is used as the embedding text. Writer-only endpoint (consumes embedding API quota); concept_type is restricted to the agent's writable labels (Page, Workflow, Feature). Returns 503 when the embedding service is unavailable, so the caller treats it as a transient failure rather than reading an empty neighborhood as "this candidate is unique".
Request body
Response
Top-K similar nodes (may be empty when no concepts of the given label exist).