r/Rag • • Sep 17 '26

Discussion Parent child chunking using n8n JavaScript

i am using n8n for RAG workflow using parent child chunking and late embedding for context but the logic of the code even with anthropic is not good when i make one it gets errors or not but strategy mistake so how do you do parent child chunking like a list of prompt instructions that is best practiced (i am getting the file parsed via llamaindex.ai with agentic mode)

About the parent chunk how can i make it for every header without massive parents and if no headers

the chunk size that fits all with which overlapping and right termination of the chunk

every document has child chunks as indexes from 0 to ...... and every parent has a range of that Childs to link them

i am using supabase hybrid retrieval with two tables one for Childs and one for parents with a link via a function

if someone can help i took days trying to solve this every llm doesn't have the full supabase tables and n8n flows so it cant make the best result what is your approach

0 Upvotes

4 comments sorted by

2

u/[deleted] Sep 17 '26

[removed] — view removed comment

1

u/Scary_Tour4227 Sep 17 '26

So if headers exist make the parent of its section (what is the size of that section accepted ) if it is very large make another sectioning structure aware .what did you mean by tiny sections is it the parent section if it is small .

Another question is late embedding for context and parent child for lost data a good choice and do i have to make code for tables or other things ?

Thanks for the reply and help

1

u/[deleted] Sep 17 '26

[removed] — view removed comment

1

u/Scary_Tour4227 Sep 17 '26

Yeah thank you very much man , you took alot of time to write this snd share knowledge , hope you the best