haystack
haystack copied to clipboard
Default `stop_words` for `Agent` `PromptNode`
Probably a quick with for user-friendliness with Agents. The same way we have zero-shot-react as the default PromptTemplate for Agents, why not have the default stop word be "Observation:"?
If the user is changing the template then they change the stop word too, but seems like we don't need them to manually input the stop word unless they're doing so.
Currently we need to don this:
prompt_node = PromptNode(model_name_or_path=prompt_model, stop_words=["Observation:"])
stop_words are so closely related to PromptTemplate that I suggest that stop_words could become part of PromptTemplate. An optional parameter in PromptTemplate. I linked this issue to the Prompt Hub epic.