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

feat: initialize rag based on HugeGraph #20

Merged
merged 5 commits into from
Oct 26, 2023
Merged

Conversation

Ling-Yuchen
Copy link
Contributor

@Ling-Yuchen Ling-Yuchen commented Oct 20, 2023

close #19
Feature: utilize relevant data in the graph database as context for llm to response to the natural langauge query (RAG).

Steps involved:

  1. Extract keywords: extract and expand the keyword set from the query sentence by llm
  2. Query graph: get center nodes by matching keywords, extract a sub-graph with a certain deep as "knowledge"
  3. Synthesize answer: get answer from llm through the original query and knowledge from graph

All the data required and generated in the whole process is transfered through a dict "context", explained in examples/graph_rag_test.py.

Copy link

@javeme javeme left a comment

Choose a reason for hiding this comment

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

LGTM

@simon824 simon824 merged commit 31b1720 into apache:main Oct 26, 2023
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.

[Feature] rag based on HugeGraph
3 participants