Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[FEATURE] GraphRAG + Flowise

Open Iternal-JBH4 opened this issue 1 year ago • 17 comments

GraphRAG (https://github.com/microsoft/graphrag) shows great promise of a more improved and effective method of RAG beyond simple document chunking.

With the introduction of more cost effective models such as GPT-4o-mini and future generations the cost of a GraphRAG approach to indexing can be significantly reduced.

Request is to add a GraphRAG component to flowise that can accept a multi-document / multi-source input which on upsert runs the GraphRAG indexing, and then can be queried like any other Flowise RAG chatflow for use with standard chat bots, chains, and Agents.

Thank you!

Iternal-JBH4 avatar Jul 20 '24 11:07 Iternal-JBH4

+1

delinecnlin avatar Jul 21 '24 12:07 delinecnlin

+1 gpt4omini is already in main branch, just wait for graphRag now.

Mzaxd avatar Jul 22 '24 04:07 Mzaxd

+1

lucasbuges avatar Jul 22 '24 07:07 lucasbuges

As the indexing seems very complex to build plus it requires a graph database I wonder if you have tried out indexing your data through the solution accelerator provided by MS?

@HenryHengZJ correct me if I'm wrong but the best way to tackle this would be to have an Azure AI Search (as they have for Langchain python now) Tool. At least we could then query that graph index.

I'll try playing around with this architecture this week. But as of now I think the indexing is too complex to be a out-of-the-box no-brainer for flowise.

sirsimonson avatar Jul 22 '24 07:07 sirsimonson

Hope this helps https://js.langchain.com/v0.2/docs/tutorials/graph/

zryf2000 avatar Jul 22 '24 07:07 zryf2000

yeah we are still tinkering how to make it easy to do it on Flowise, as GraphRAG does involves much more technnical challenges

HenryHengZJ avatar Jul 22 '24 12:07 HenryHengZJ

I cannot wait to see this feature for flowise Thank you all Devs

asrguru20 avatar Jul 23 '24 08:07 asrguru20

+1

Pierre-Cyber avatar Jul 31 '24 09:07 Pierre-Cyber

+1

Hbmr9000 avatar Aug 03 '24 08:08 Hbmr9000

+1

chen-friedman avatar Aug 07 '24 18:08 chen-friedman

+1

ysatnaf avatar Aug 08 '24 01:08 ysatnaf

Just to keep you up to date: https://neo4j.com/developer-blog/global-graphrag-neo4j-langchain/

Check out this blog post which goes in detail into how to build a proper graph using langchain that's like MS Paper. It's expensive.. and somewhat complex. At least the indexing

sirsimonson avatar Aug 10 '24 00:08 sirsimonson

FYI I've been testing graphRAG with GPT4-turbo and GPT4o-mini, switching from GPT4 to 4o-mini reduced cost from $50 indexing cost, down to ONLY $0.37 for same size indexing. Cost should no longer be a major factor in this type of approach, especially for static datasets.

I'm open to putting a bounty on this if anyone is interested.

Iternal-JBH4 avatar Aug 18 '24 16:08 Iternal-JBH4

+1

kstan79 avatar Aug 24 '24 13:08 kstan79

+1

haimco50 avatar Aug 30 '24 15:08 haimco50

GraphRAG (https://github.com/microsoft/graphrag) shows great promise of a more improved and effective method of RAG beyond simple document chunking.

With the introduction of more cost effective models such as GPT-4o-mini and future generations the cost of a GraphRAG approach to indexing can be significantly reduced.

Request is to add a GraphRAG component to flowise that can accept a multi-document / multi-source input which on upsert runs the GraphRAG indexing, and then can be queried like any other Flowise RAG chatflow for use with standard chat bots, chains, and Agents.

Thank you!

Yes PLEASE!

googlepoke avatar Sep 04 '24 06:09 googlepoke

+1

haimco50 avatar Sep 07 '24 18:09 haimco50

+1

gianlucagilardi avatar Nov 07 '24 15:11 gianlucagilardi

+1 I tried creating a custom JS function to query a Neo4j database but sadly that does not work either....

TS-Eichhorn avatar Nov 14 '24 09:11 TS-Eichhorn

Thanks for the update 🫡

On Thu, 14 Nov 2024 at 17:54, TS-Eichhorn @.***> wrote:

+1 I tried creating a custom JS function to query a Neo4j database but sadly that does not work either....

— Reply to this email directly, view it on GitHub https://github.com/FlowiseAI/Flowise/issues/2837#issuecomment-2475890607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4KSFUYUSDPSOITZSQXAL32ARXOLAVCNFSM6AAAAABLF34PFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVHA4TANRQG4 . You are receiving this because you commented.Message ID: @.***>

-- Kind Regards, Manie +61 416 824 559

googlepoke avatar Nov 15 '24 00:11 googlepoke

@googlepoke

Update. I got a connection with neo4-j working on a local version of Flowise. I followed this tutorial: https://www.youtube.com/watch?v=vmKLAeyLXy8 to add neo4j-driver as an external dependency. This allowed me to create a custom tool that queried a neo4j database and retrieved graph information.

FYI: In my setup the creation and filling of the graph database is not done by LLMs due to having structured data, so I have not tested transforming documents into graphs using Flowise.

TS-Eichhorn avatar Nov 15 '24 09:11 TS-Eichhorn

@TS-Eichhorn Thank you! I was looking for Neo4j support for Flowise! Will explore more and see if get transforming documents into graphs using Flowise

manjunathshiva avatar Nov 17 '24 02:11 manjunathshiva

I just use graphlit to build the Graph and then use a flowise tool to query the GraphRAG. Pretty straightforward actually

dentroai avatar Nov 20 '24 14:11 dentroai

@googlepoke

Update. I got a connection with neo4-j working on a local version of Flowise. I followed this tutorial: https://www.youtube.com/watch?v=vmKLAeyLXy8 to add neo4j-driver as an external dependency. This allowed me to create a custom tool that queried a neo4j database and retrieved graph information.

FYI: In my setup the creation and filling of the graph database is not done by LLMs due to having structured data, so I have not tested transforming documents into graphs using Flowise.

That is great. I am using LightRAG to populate neo4j. LightRAG can use ollama. So cost is not a concern any more. I will try your method to pull data from neo4j in using the flowise custom tool. will it be possible for you to share a brief explanation of your code. Thank you.

RadaKichenin avatar Nov 20 '24 17:11 RadaKichenin

I just use graphlit to build the Graph and then use a flowise tool to query the GraphRAG. Pretty straightforward actually

Could you share some details on you did this 😊?

boble23 avatar Dec 28 '24 19:12 boble23

+1 any successes?

Noel-Hol avatar Jul 05 '25 12:07 Noel-Hol

has this endeavor been abandoned?

iotnxt avatar Sep 08 '25 19:09 iotnxt

No progress updates?

ncmkno avatar Sep 18 '25 05:09 ncmkno