A knowledge graph represents entities as nodes and their relationships as edges, making linked facts directly queryable rather than merely similar to a prompt. section 12.2.5
Answering a multipart question
For “What is Gal Gadot’s husband’s current job?”, a knowledge graph can connect Gal Gadot to Jaron Varsano and then to his occupation. A similarity-based vector search may retrieve many articles about Gal Gadot without reliably finding the intermediate relationship. section 12.2.5
Use knowledge graphs when relationship-aware retrieval matters, while accounting for the added engineering work:
- Query a graph database such as Neo4j to traverse connected entities and answer complex, multipart questions. section 12.2.5
- Translate prompts into graph queries, often treating query generation as an NLP problem that LLMs can help solve. section 12.2.5
- Expect more data-modeling effort and expertise than embedding documents for vector search. section 12.2.5











