Find answers from the community

Updated 10 months ago

Hey guys, I have a question regarding

Hey guys, I have a question regarding document metadata - in all examples/tutorials metadata is presented as a list of simple {key}:{value} string pairs. But what about more complex cases, let's say:
  1. value is a list of strings
  2. value is a dict
  3. value is a list of dicts
Are there ways to represent such metadata in LlamaIndex Documents to make sure it is understood/handled properly by the embedder and LLM?
W
d
L
4 comments
Currently Metadata is in the form of Dict only.

Did you try passing your cases like
key: lIst of strings
key: dict
key: list of dict
?
That sure is the first/simplest idea that comes to mind but I was wondering if lists/dicts represented as strings (specifically, all the punctuation chars such as { } [ ] , : ) will be handled properly by embedder/LLM
it will just be converted/casted as string
so if the LLM/embed model has seen code before, it should be fine
Add a reply
Sign up and join the conversation on Discord