Our paper is accepted by AAAI 2025 👏👏👏.
Comparison of 1-w 1-d Graph RAG (a), n-w Graph RAG (b), n-d Graph RAG (c) and n-w n-d Graph RAG (d, Ours)
- For graph2text mode, please download the model(T5 sft): https://drive.google.com/file/d/1812Hy9eMHa_h7dQn70N6eQAmKR_x7WDH/view?usp=sharing
- You can load the neo4j database of Wikidata from here: https://drive.google.com/file/d/1Vrdt86zqG2M1apaSAUciuqXx9BwQKd1g/view?usp=sharing
- Given query and the subjectival entity:
python fasttog.py \
--query "What is the climate of the area where Pennsylvania Convention Center belong ?" \
--entity "Pennsylvania Convention Center" \
--base_path . \
--llm_api https://xxxx \
--llm_api_key xxxx \
--graph2text_path Path_of_Graph2Text_Model \
--kg_api neo4j://xxxx \
--kg_user xxxx \
--kg_pw xxxx \
--kg_graph_file_name visulize \
--community_max_size 4
- query question you want to ask
- entity subjectival entity of you question. You should check the entity exist in the KG before running the script
- base_path path for the files of solution
- graph2text_path path for your download or pretained graph2text model. If none, T2T mode will be adopted.
- kg_graph_file_name image name of communities visulization (generated in the base_path)
query: "What is the climate of the area where Pennsylvania Convention Center belong ?"
entity: "Pennsylvania Convention Center"
status: Status.OK
answer:humid continental climate
The visulize.png in the path 'Pennsylvania_Convention_Center-1725603642' for solving this query is:
This project uses the Apache 2.0 protocol. The project assumes no legal responsibility for any of the model's output and will not be held liable for any damages that may result from the use of the resources and output.