Find answers from the community

Updated 9 months ago

Hi! Is possible to format the text of

Hi! Is possible to format the text of context that used in prompt? I want to add a information for each context retrieved
L
M
4 comments
Sounds like a good use case for a custom node-postprocessor, and adjust the text content of each node retrieved?

https://docs.llamaindex.ai/en/stable/module_guides/querying/node_postprocessors/#custom-node-postprocessor

index.as_query_engine(...., node_postprocessors=[my_postprocessor])
When I used set_global_handler I noticed that the context comes with the location path. Is it possible to remove this and leave only the context text recovered?
yes. On the nodes/documents, you can set node.excluded_llm_metadata_keys = ["key1", ...]
Add a reply
Sign up and join the conversation on Discord