Building Knowledge base for the RAG

I am trying to build a RAG Knowledge base using the file in my file system. There are multiple folders and sub folders containing different file types e.g. PDFs, Excels, PPTs etc. I like to recursively read all the files under a given folder path. Once N8N has access to these files, I like to tokenize these documents for my embedding model. Do we have a template that can recursively read all the files and do the file splitting?

I am using the n8n locally on my laptop.
Goals:
a) Read the files recursively from sub folders
b) Split the documents for the embedding model
c) apply meta data to each chunk

Please find the sample code here. I am not able to extract the contents of the file. The output gives out the file path and not the contents. Please refer to the code below:

Hey @Ketanpuri

I would try something like this to read all the relevant files from a directory:

Then use the vector store node to load those files into your vector store. Check this RAG starter template: https://n8n.io/workflows/5010-rag-starter-template-using-simple-vector-stores-form-trigger-and-openai/

Hope this helps!