Retrieve relevant context from a context vault based on a prompt.
rerank is enabled, the system also analyzes the prompt for example for bullet points or enumerated instructions (e.g., “1) Look at this, 2) Include this as well, 3) This is also important”). These bullets are used to rerank the retrieved nodes so that the final context better reflects the user’s priorities and instructions.API key for the Qontext API
The id of the workspace that the context vault belongs to.
"ws_123e4567-e89b-12d3-a456-426614174000"
The id of the vault from which to retrieve context.
"kg_681c0068-b589-4923-ac4a-73040fab7a45"
The prompt to retrieve context for.
"Give me the following information regarding Harry Potter. 1) Who is he?, 2) What is his relationship with Gryffindor Inc., Weasleys Wizard Wheezes, and Ollivanders?"
Number of nodes to consider at the first level of the knowledge vault.
5
Depth of nodes to retrieve from the graph.
1
Whether to rerank results for relevance.
true
Context successfully retrieved
The retrieved and relevant context.
[
"*Harry Potter -> Gryffindor Inc. (works_at)*: Harry Potter works at Gryffindor Inc. as Project Lead.",
"*Harry Potter*: Harry Potter is a contact with email [email protected]; he entered the system on 2025-09-01, had first outreach on 2025-08-11, was last contacted on 2025-08-28, and is in the lead lifecycle stage.",
"*Harry Potter -> Weasleys Wizard Wheezes (advisor_to)*: Harry Potter is advising Weasleys Wizard Wheezes on new product launches.",
"*Weasleys Wizard Wheezes*: Weasleys Wizard Wheezes is a magical joke shop company co-founded by Fred and George Weasley, specializing in prank and novelty products for wizarding customers.",
"*Harry Potter -> Ollivanders (consulted_for)*: Harry Potter consulted for Ollivanders regarding wand customization strategies.",
"*Ollivanders*: Ollivanders is a wand-making company with a legacy spanning centuries, providing premium wands to witches and wizards globally."
]