← API reference
Query / aiml

retrieveKnowledge

The retrieval (RAG) entry point. Given the entities in context (seeds) and an optional query, returns the most relevant knowledge in two buckets — graph-reached and semantically-supporting — each ranked by a blended relevance score. Requires knowledgeNote:read permission.

Arguments

seeds[ID!]!

Entities the caller is currently working with, as TypeIDs (e.g. "wcr_01K…"); each prefix names the entity kind. Retrieval expands the situational graph outward from these to find related knowledge.

queryString

Optional free-text intent. Ranks results by semantic similarity and pulls in graph-unreached notes as supporting.

limitInt

Maximum number of notes to return per bucket.

Returns KnowledgeRetrieval!

Explore in a view

AI and ML
View exact SDL
"""
The retrieval (RAG) entry point. Given the entities in context (`seeds`) and an optional `query`, returns the most relevant knowledge in two buckets — graph-reached and semantically-supporting — each ranked by a blended relevance score. Requires knowledgeNote:read permission.
"""
retrieveKnowledge(
  """
  Entities the caller is currently working with, as TypeIDs (e.g. "wcr_01K…"); each prefix names the entity kind. Retrieval expands the situational graph outward from these to find related knowledge.
  """
  seeds: [ID!]!
  """
  Optional free-text intent. Ranks results by semantic similarity and pulls in graph-unreached notes as `supporting`.
  """
  query: String
  """Maximum number of notes to return per bucket."""
  limit: Int
): KnowledgeRetrieval! @topic(names: ["aiml"])

Schema reference describes the API contract. Actual access is checked by the platform for every operation.