When the resulting knowledge retrieval, has “content”, “files”, and “metadata”
i put the knowledge retrieval’s result as the context.
but it doesn’t input the whole thing, only the “content”
how do i make metadata seen by the llm ? instead of just the content ?
Use code to package the return result into a dict, then feed it to the LLM.
Thank you!
for reference, i’m gonna put some example here.
add template node, and put this into the code
{% if arg1 and arg1|length > 0 %}
{% for item in arg1 %}
=== SUMBER DOKUMEN ===
Dataset : {{ item.metadata.dataset_name }}
Nama Dokumen : {{ item.metadata.document_name }}
Posisi Segmen : {{ item.metadata.segment_position }}
Skor Relevansi : {{ "%.3f"|format(item.metadata.score) }}
=== ISI DOKUMEN ===
{{ item.content }}
--------------------
{% endfor %}
{% else %}
(Tidak ada dokumen relevan ditemukan)
{% endif %}