Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKGet startedIntroductionInstallationQuickstartLangChain Expression LanguageInterfaceHow toCookbookLangChain Expression Language (LCEL)Why use LCEL?ModulesModel I/‚ÄãORetrievalChainsMemoryAgentsCallbacksModulesSecurityGuidesAdaptersDebuggingDeploymentEvaluationFallbacksLangSmithRun LLMs locallyModel comparisonPrivacyPydantic compatibilitySafetyAmazon Comprehend Moderation ChainConstitutional chainHugging Face prompt injection identificationLogical Fallacy chainModeration chainMoreGuidesSafetyConstitutional chainOn this pageConstitutional chainThis example shows the Self-critique chain with Constitutional AI.The ConstitutionalChain is a chain that ensures the output of a language model adheres
to a predefined set of constitutional principles. By incorporating specific rules and guidelines,
the ConstitutionalChain filters and modifies the generated content to align with these principles,
thus providing more controlled, ethical, and contextually appropriate responses.
This mechanism helps maintain the integrity of the output while minimizing the risk of generating
This example shows the Self-critique chain with Constitutional AI.
This example shows the Self-critique chain with Constitutional AI. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKGet startedIntroductionInstallationQuickstartLangChain Expression LanguageInterfaceHow toCookbookLangChain Expression Language (LCEL)Why use LCEL?ModulesModel I/‚ÄãORetrievalChainsMemoryAgentsCallbacksModulesSecurityGuidesAdaptersDebuggingDeploymentEvaluationFallbacksLangSmithRun LLMs locallyModel comparisonPrivacyPydantic compatibilitySafetyAmazon Comprehend Moderation ChainConstitutional chainHugging Face prompt injection identificationLogical Fallacy chainModeration chainMoreGuidesSafetyConstitutional chainOn this pageConstitutional chainThis example shows the Self-critique chain with Constitutional AI.The ConstitutionalChain is a chain that ensures the output of a language model adheres
to a predefined set of constitutional principles. By incorporating specific rules and guidelines,
the ConstitutionalChain filters and modifies the generated content to align with these principles,
thus providing more controlled, ethical, and contextually appropriate responses.
This mechanism helps maintain the integrity of the output while minimizing the risk of generating