haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Default `stop_words` for `Agent` `PromptNode`

Open TuanaCelik opened this issue 2 years ago • 1 comments

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:"])

TuanaCelik avatar Mar 09 '23 15:03 TuanaCelik

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.

julian-risch avatar Mar 29 '23 13:03 julian-risch