Find answers from the community

Updated 2 months ago

Index Retriever

Hello , is there a way to not pass node.text when synthesizing a response from TextNode(BaseNode) ? I had built a custom node for this use case before but trying to avoid that if possible. I want to pass the metadata only as default but the text is being passed as well with node.get_content() . Queried kapaai earlier and was looking at the index github but couldnt get a clear direction. Any guidance would be greatly appreciated, thanks!
W
J
5 comments
I think you can create a retriever using your index and first retrieve the similar nodes.
Extract the metadata from those nodes and then simply call llm from your side basically like llm.complete(YOUR_FORMATTED_SENTENCE_TO_LLM_HERE)
got it, so would need to customize in some way after retrieval
Yep doing it this way, your code won't be making any calls to llm with the unwanted text.
Just need to format the query in the way you want to send to llm!
Add a reply
Sign up and join the conversation on Discord