Get context
Retrieval Endpoints
Get context
Retrieve relevant context from a context vault based on a prompt. Use includeSources parameter to choose response format.
POST
Get context
- Similarity search: The knowledge graph is first searched to find nodes that are most similar to the prompt. This ensures that only the most relevant information is considered for retrieval.
- Optional reranking: If
rerankis 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.
Authorizations
API key for the Qontext API
Body
application/json
The id of the vault from which to retrieve context.
Example:
"kg_681c0068-b589-4923-ac4a-73040fab7a45"
The prompt to retrieve context for.
Example:
"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.
Example:
5
Depth of nodes to retrieve from the graph.
Example:
1
Response
Context successfully retrieved