Find answers from the community

Updated 2 months ago

Hey ya ll I m super excited to be diving

Hey ya'll! I'm super excited to be diving into in-context training and am loving llama_index. I'm wondering if anyone can help point me in the right direction for a response synthesis that is additive as opposed to refining. For example: I have a retriever with similarity_top_k=5 and I would like to generate 5 items for each set of nodes retrieved. I was trying to get this to work using Refine and modifying the refine_template but it really doesn't seem to want to attach a new answer to the old one in the response. Should I try a different response synthesizer (like maybe Tree Summarize?) or should I keep working with my prompts?
L
P
9 comments
Currently no "additive" approach, but might make for a cool PR!

I think you were slightly on the right track with the templates, but you'll probably want to modify the refine_template instead instead of the text_qa_template
Ok cool! Any suggestions on how to approach a PR here? I'm just not really sure where to even begin. What all would need to change?
I think I would start by adding a new response mode (maybe "accumulate" ?) . Then from there, I think it's just a matter of implementing the the response builder for that mode

Starting somewhere around here, I think most work can be done in this file:
https://github.com/jerryjliu/llama_index/blob/beb2892ac7e4704834e66056bc1dda0a04a83595/llama_index/indices/response/response_builder.py#L591
sweet thank you!
Wow! Super fast!
Crazy! :dotsCATJAM: :dotsHARDSTYLE:
haha well it was a blocker for my project so πŸ€·β€β™‚οΈ
Haha blockers are the best motivation i guess 🫑
Add a reply
Sign up and join the conversation on Discord