graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

[Issue]: <title> how to use csv with multiple columns

Open JadeXIN opened this issue 2 years ago • 11 comments

Do you need to file an issue?

  • [ ] I have searched the existing issues and this bug is not already filed.
  • [ ] My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
  • [ ] I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.

Describe the issue

i have seen the source code csv.py for loading csv, but I see that it can only handle csv file with source and text columns. but in practice, the csv files often contain many columns. how to handle this type of csv file with rag. how to modify the settings.yaml file.

Steps to reproduce

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:

JadeXIN avatar Aug 26 '24 07:08 JadeXIN

virus?

PetricaR avatar Aug 26 '24 08:08 PetricaR

virus?

it seems you are correct....who knows the solution

JadeXIN avatar Aug 26 '24 09:08 JadeXIN

What are you looking to do with the additional columns? If you have multiple fields of text that you want as input to the graph extraction, you can concatenate them in a pre-processing script. But we don't currently support any form of metadata/column-based filtering, so I'm not sure what the use case is.

natoverse avatar Sep 10 '24 22:09 natoverse

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Sep 18 '24 01:09 github-actions[bot]

Curious what the point of supporting CSV is if you cant select which columns to use?

matbeedotcom avatar Sep 18 '24 20:09 matbeedotcom

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Sep 26 '24 01:09 github-actions[bot]

What are you looking to do with the additional columns? If you have multiple fields of text that you want as input to the graph extraction, you can concatenate them in a pre-processing script. But we don't currently support any form of metadata/column-based filtering, so I'm not sure what the use case is.

Hi,

I have some CSV files with multiple columns. I want graphRAG can help me to understand them. for example, given a report about occupation safety, we have a list of accidents record, it can analyse that what type of the accident is tend to happen in which conditions. but I find graphRAG cannot understand the csv file with multiple columns.

JadeXIN avatar Sep 26 '24 03:09 JadeXIN

Curious what the point of supporting CSV is if you cant select which columns to use?

i hope graphRAG can understand the file considering multiple columns. because many reports contain more than 2 type of columns but I find currently graphRAG can only include 2 columns?

JadeXIN avatar Sep 26 '24 03:09 JadeXIN

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Oct 04 '24 01:10 github-actions[bot]

This issue has been closed after being marked as stale for five days. Please reopen if needed.

github-actions[bot] avatar Oct 10 '24 01:10 github-actions[bot]

Perhaps you can merge all of your columns together as text columns and then describe the combined content separately

zhuwanfeng007 avatar Oct 24 '24 10:10 zhuwanfeng007