LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicchainsconstitutional_ai
    Module●Since v1.0

    constitutional_ai

    Constitutional AI.

    The Chain runs self-critique based on the Constitutional AI method proposed by (Bai et al., 2022).

    Modules

    module
    models

    Models for the Constitutional AI chain.

    module
    principles

    Constitutional principles.

    Constitutional principles from https://arxiv.org/pdf/2212.08073.pdf (Bai et al. 2022) UnifiedObjectives v0.2 principles ("uo-*") adapted from https://examine.dev/docs/Unified_objectives.pdf (Samwald et al. 2023).

    module
    prompts
    module
    base

    Chain for applying constitutional principles to the outputs of another chain.

    View source on GitHub