Cost: 10 operations per call. Available on Starter plan and above.
POST /brain/retrieve/graph-qa
Graph QA is the highest-intelligence retrieval mode. Instead of simple vector similarity, it:
- Finds seed entities — uses vector search to locate the starting nodes most relevant to your question
- Traverses the graph — BFS expansion up to
max_hopshops from each seed - Grounds the answer — passes only the traversed facts to the LLM, forcing a fact-grounded response with zero hallucination
Request body
Response
Code examples
Graph QA vs. regular retrieve
Use
retrieve when you want to control the LLM call yourself. Use graph-qa when you want Atlas to answer the question directly.
Example — building a Q&A agent
Guardrails
Graph QA has built-in prompt injection protection:- Facts are numbered and sandboxed — the LLM is instructed to cite by number, not quote
- Instructions embedded in stored facts (e.g. “ignore previous instructions”) are stripped before being passed to the LLM
- Results are scoped to your
user_id— the traversal query includesuser_idfilters at every hop, so cross-tenant leakage is impossible at the database level