Knowledge Base acceptable input variable

2 weeks ago 18
ARTICLE AD BOX

I'm building Dify Knowledge Base pipeline. I'm new to Dify and RAG things.

I'm now struggling between Code Node and Knowledge Base Node.
Following JSON will come out from Code Node.

{ "chunks": [ { "content": "Employee Profile........", "metadata": { "employee_id": "20899", "employee_name": "YUME SAN", "gender": "Female", "joined_date": "2022-03-28T00:00:00", "age": 31, "section": "Employee Profile", "chunk_type": "section", "chunk_id": "20899_section_0" } }, . . . ] }

So I set Code Node's output variables as chunks Array[Object].
But in Knowledge Node's input variable, I can't choose chunks. I don't see nothing.
I see it is written as "The input variable of the knowledge base node is Chunks. The variable type is an object with a specific JSON Schema which must be consistent with the selected chunk structure."
I don't know which format exactly KB Node needs. Or Do I need another node between them?

Zin Win Htet's user avatar

2

Read Entire Article