Find answers from the community

Updated 2 months ago

Configuring Response Synthesizer With Custom Query Template

At a glance

The community member found that the RetrieverQueryEngine does not support the "custom_query_template" feature, which they believe is a documentation issue. However, they found a way to add their own template by passing it to the response_synthesizer. In the comments, another community member explained that the response synthesizer is the component that uses the templates, and that passing the template to the query engine arguments would not work since the response synthesizer takes priority.

I found that RetrieverQueryEngine does not support "custom_query_template". I think the document is wrong. However I found a way to add my own template by passing it to response_synthesizer

# configure response synthesizer response_synthesizer = get_response_synthesizer(text_qa_template=custom_query_template)
L
J
2 comments
Yea, the response synthesizer is the thing that ends up using the template.

You can technically pass it into the query engine args, but since you are alredy passing in the response synthesizer, that takes priority (since thats the component that uses the templates)
Add a reply
Sign up and join the conversation on Discord