Skip to content

Narrative Generation After Data Analysis: Exploring Alternatives #14181

Answered by dosubot bot
mraguth asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it is okay to use both response_synthesis_prompt and response_synthesizer in your query. There are no explicit downsides mentioned in the provided documentation. The response_synthesizer is a flexible component that can be configured with various modes and custom prompts, including additional variables during query-time.

For example, you can customize the prompts used in the response synthesizer and add additional variables:

from llama_index.core import PromptTemplate
from llama_index.core.response_synthesizers import TreeSummarize

# NOTE: we add an extra tone_name variable here
qa_prompt_tmpl = (
    "Context information is below.\n"
    "---------------------\n"
    "{context_str}\n

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@dosubot
Comment options

@mraguth
Comment options

@dosubot
Comment options

Answer selected by mraguth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant