The community member is having an issue with the context_str variable in their project. They have metadata with filename and page information, and when they send a query, the prompt injects the context_str in a specific format. However, the community member finds that the language model sometimes gets confused and doesn't answer correctly. They mention that if they send the context as a JSON-formatted string, it always works.
In the comments, another community member suggests that the community member can customize how each document/node looks when it is converted to text, and they can also customize which metadata is used for embeddings and the language model. They provide a link to a guide that may help with this.
Another community member also mentions that they have a video on this topic, which the original community member says is exactly what they need.
You can customize what each document/node looks like when it converts to text. You can even customize which metatdata is used for emebeddings and the llm