Closed susht3 closed 1 month ago
Hey @susht3! Great to see you again! Thanks for reaching out. I'll take a look at your issue and provide a full answer shortly.
It's added to the text during embedddings and/or llm calls
Metadata in the LlamaIndex framework provides additional context and annotations for nodes, influencing both the embedding process and LLM (Large Language Model) calls.
excluded_embed_metadata_keys
and excluded_llm_metadata_keys
.Metadata not excluded by excluded_embed_metadata_keys
will be part of the content used to generate embeddings. For example:
node.metadata = {"file_name": file_name, "module": module_name}
node.excluded_embed_metadata_keys = ["file_name"]
Here, file_name
is excluded from embeddings, but module
is included.
Similarly, metadata not excluded by excluded_llm_metadata_keys
will be used in LLM prompts. For example:
node.metadata = {"file_name": file_name, "module": module_name}
node.excluded_llm_metadata_keys = ["file_name"]
Here, file_name
is excluded from LLM prompts, but module
is included.
Refer to the Advanced Metadata Customization section for more details and examples on customizing metadata for embeddings and LLM calls.
To continue the conversation, mention @dosu.
Question Validation
Question
i want to set some attributes for node,like this:
What role does metadata play? does it append "module" to origin text? i find the document:metadata - a dictionary of annotations that can be appended to the text.