Release 2023.7
Learn what features we added in the July 2023 release.
Here's what we've recently added:
Hallucinations Detection
A new node called HallucinationDetector detects hallucinations in your retrieval augmented generative question answering systems. It identifies the parts of the answer based on your documents, the parts that aren't, and the parts that contradict what's in your documents. This way, you know if the answer is reliable.
Check also our tutorial on how to create a generative QA app that detects hallucinations: Tutorial: Building a Robust RAG System.
Easy Experimenting with Prompts
Say hello to Prompt Explorer your sandbox environment for prompt testing. Compare up to three pipelines and see how your prompt impacts the answers.
Don't know where to start? We've added a library of prompts for various NLP tasks that you can use and modify as you like. You can also save your own prompts for future use.
PromptNode Changes
We've simplified PromptTemplate used by PromptNode. No more hassles with the name
and prompt_text
parameters. Now it's just prompt
and an optional output_parser
. Here's how you can now create your own prompt:
components:
- name: qa_template # This section configures the new prompt template
type: PromptTemplate
params:
output_parser:
type: AnswerParser
prompt: "You are a financial analyst. You are provided with the following\
\ context: \"\"\" {contexts} \"\"\" Please answer the following question truthfully\
\ based on the context above: {questions} Answer: \n"
- name: PromptNode
type: PromptNode
params:
default_prompt_template: qa_template
What changed:
- The
prompt_text
parameter was replaced with theprompt
parameter. - The
name
parameter was deleted.
Note that your deployed pipelines will continue running as before. But if you undeploy a pipeline, you'll need to update the Prompt Template to the new format before redeploying.
Updating template structure
The deprecated PromptTemplate looked like this:
- name: qa_template # This section configures the new prompt template
type: PromptTemplate
params:
name: qa
output_parser:
type: AnswerParser
prompt_text: "You are a financial analyst. You are provided with the following\
\ context: \"\"\" {contexts} \"\"\" Please answer the following question truthfully\
\ based on the context above: {questions} Answer: \n"
The new structure should be:
- name: qa_template # This section configures the new prompt template
type: PromptTemplate
params:
output_parser:
type: AnswerParser
prompt: "You are a financial analyst. You are provided with the following\
\ context: \"\"\" {contexts} \"\"\" Please answer the following question truthfully\
\ based on the context above: {questions} Answer: \n"
For details, see Prompt Templates.
Models Hosted on SageMaker
You can now use open source large language models hosted on Amazon SageMaker. This way, you can use much larger models and they run in your own AWS account. Contact us: we'll deploy the model in SageMaker and come back with the model name you should pass in the model_name_or_path
parameter of PromptNode.
Updated 9 months ago