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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    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
    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
    models

    Models for the Constitutional AI chain.

    module
    base

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

    View source on GitHub