New Beta feature in 3.9Rasa now supports using
EnterpriseSearchPolicy without an additional call to LLMs for response generation.
This feature is only a beta (experimental) and will change in future Rasa versions.How Extractive Search Works
Extractive Search requires documents to be ingested into a specific format so that answers can be reliably extracted by Rasa. These questions should be added as follows in the vector store:who_finley as the first result and Rasa can reliably extract the answer from metadata.answer key.
Explanations for all keys:
metadata: this is a mandatory field required by Enterprise Searchmetadata.title: [optional] could be useful as an ID field to refer to the QnA pairmetadata.answer: contains text or markdown used to create the response that is shown to the user.metadata.type: optional field, it is useful to filter relevant documents if the knowledge base contains other things too.page_content: contains the text Question from QnA pair, only this field is vectorised by the embedding model. Any search queryqwill be compared for similarity with this field in the payload.
Extractive Search should be used together with
vector_store.threshold so that only the high-confidence search results are used to respond to the user.Extractive Search Configuration
To configureEnterpriseSearchPolicy to use Extractive Search,
simply set use_generative_llm to false in the Assistant’s config.yml
config.yml
EnterpriseSearchPolicy returns the first search result to the chat without generating an answer with an LLM.
You can also connect to different search services using Custom Information Retrievers while using Extractive Search.