Find answers from the community

Updated 2 years ago

Ensure nodes appear

At a glance
Is there any way to ensure certain nodes always appear in a vector-search query? For example, in call transcripts, sometimes you want the first and last chunks to be included.
L
a
5 comments
Hmm you could maybe do something sneaky if you subclass a new retriever or query engine πŸ€”
Sneaky is good! @Logan M
Yeah I'll check those out, and if you have any suggestions / code samples, these would be helpful as well
Here's an example of a custom retriever

You can do anything you want here, as long as you return nodes πŸ’ͺ

https://github.com/jerryjliu/llama_index/blob/main/examples/query/CustomRetrievers.ipynb
@Logan M sweet thank you πŸ™
Add a reply
Sign up and join the conversation on Discord