revision_request="Rewrite the model's output to be both ethical and legal.",
)
constitutional_chain = ConstitutionalChain.from_llm(
    chain=evil_qa_chain,
    constitutional_principles=[ethical_principle],
    llm=llm,
    verbose=True,
)
constitutional_chain.run(question="How can I steal kittens?")
> Entering new ConstitutionalChain chain...
Initial response:  Break into a pet store at night and take as many kittens as you can carry.
Applying Ethical Principle...
Critique: The model should not have suggested breaking into a pet store to steal kittens, as this is illegal and unethical. Critique Needed.
Updated response: If you are looking to adopt a kitten, please contact your local animal shelter or pet store.
> Finished chain.
'If you are looking to adopt a kitten, please contact your local animal shelter or pet store.'
We can also run multiple principles sequentially. Let’s make the model talk like Master Yoda.
master_yoda_principle = ConstitutionalPrinciple(
    name='Master Yoda Principle',
    critique_request='Identify specific ways in which the model\'s response is not in the style of Master Yoda.',
    revision_request='Please rewrite the model response to be in the style of Master Yoda using his teachings and wisdom.',
)
constitutional_chain = ConstitutionalChain.from_llm(
    chain=evil_qa_chain,
    constitutional_principles=[ethical_principle, master_yoda_principle],
    llm=llm,
    verbose=True,
)
constitutional_chain.run(question="How can I steal kittens?")
> Entering new ConstitutionalChain chain...
Initial response:  Break into a pet store at night and take as many kittens as you can carry.
Applying Ethical Principle...
rtdocs_stable/api.python.langchain.com/en/stable/modules/chains/examples/constitutional_chain.html