LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    โŒ˜I

    Chat LangChain

    What can I help with?

    Enter to sendยทShift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coredecisionstypesNoul
    Classโ—Since v1.8

    Noul

    Copy
    Noul()

    Bases

    BaseModel

    Used in Docs

    • Google Gemini Decisions integration
    • TypeSafe integrations

    Attributes

    View source on GitHub
    attribute
    model_config
    attribute
    type: Literal['noul']
    attribute
    instructions: Content
    attribute
    criteria: NoulCriteria | None

    Ask a binary question and receive the probability that its answer is yes.

    Use Noul when the probability itself is useful to application code, such as deciding whether a message reports a bug or requests a refund. A value near 1 indicates strong support for yes, a value near 0 indicates strong support for no, and a value near 0.5 indicates uncertainty. Noul answers do not include a separate confidence value.

    Detect an urgent support request
    from langchain_core.decisions import Noul
    
    response = classifier.invoke(
        {
            "state": "Production is down. Please help immediately.",
            "questions": {
                "urgent": Noul(
                    instructions="Does this message require an urgent response?"
                )
            },
        }
    )
    urgency = response.nouls["urgent"].noul
    
    if urgency >= 0.8:
        page_on_call_engineer()

    Wire discriminator for a binary question.

    Complete yes/no judgment to make about the input state.

    Instructions may be text or structured JSON. Write the full question here even when its ID in ClassifierRequest.questions appears self-explanatory.

    Optional descriptions that define what the yes and no outcomes mean.