Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memo: graphrag #421

Merged
merged 4 commits into from
Nov 7, 2024
Merged

memo: graphrag #421

merged 4 commits into from
Nov 7, 2024

Conversation

nnhuyhoang
Copy link
Contributor

What's this PR do?

  • memo for GraphRAG


## Why Knowledge Graph is used in RAG?

Naive RAG systems built with keyword or similarity search-based retrieval fail in complex queries that require reasoning. Suppose user asks a query: "Who directed the sci-fi movie where the lead actor was also in The Revenant?", a standard RAG system will retrieve documents about The Revenant, then find information about cast and crew members, but it will fail identiy the lead actor, Leo DiCaprio who starred in other movies but not existed in the query to retrieve document. However, taking advantage of knowledge graph, the ideally process will be: identify the lead actor of The Revenant, then find other movies he starred in, then find the sci-fi movie which meet ciriteria.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Naive RAG systems built with keyword or similarity search-based retrieval fail in complex queries that require reasoning. Suppose user asks a query: "Who directed the sci-fi movie where the lead actor was also in The Revenant?", a standard RAG system will retrieve documents about The Revenant, then find information about cast and crew members, but it will fail identiy the lead actor, Leo DiCaprio who starred in other movies but not existed in the query to retrieve document. However, taking advantage of knowledge graph, the ideally process will be: identify the lead actor of The Revenant, then find other movies he starred in, then find the sci-fi movie which meet ciriteria.
Naive RAG systems built with keyword or similarity search-based retrieval fail in complex queries that require reasoning. Suppose user asks a query: "Who directed the sci-fi movie where the lead actor was also in The Revenant?", a standard RAG system will retrieve documents about The Revenant, then find information about cast and crew members, but it will fail to identify the lead actor, Leo DiCaprio who starred in other movies but not existed in the query to retrieve document. However, taking advantage of knowledge graph, the ideally process will be: identify the lead actor of The Revenant, then find other movies he starred in, then find the sci-fi movie which meet criteria.

AI/Building LLM system/graphrag.md Outdated Show resolved Hide resolved
AI/Building LLM system/§ Building LLM System.md Outdated Show resolved Hide resolved
@zlatanpham zlatanpham merged commit cd7f9c1 into master Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants