Home / Function/ get_default_prompt() — langchain Function Reference

get_default_prompt() — langchain Function Reference

Architecture documentation for the get_default_prompt() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  74eaaa83_d684_f950_85cd_4c9a2a9ab8bc["get_default_prompt()"]
  a7263d7d_0589_b165_d427_bc9abc8de112["XMLAgent"]
  74eaaa83_d684_f950_85cd_4c9a2a9ab8bc -->|defined in| a7263d7d_0589_b165_d427_bc9abc8de112
  style 74eaaa83_d684_f950_85cd_4c9a2a9ab8bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/xml/base.py lines 52–57

    def get_default_prompt() -> ChatPromptTemplate:
        """Return the default prompt for the XML agent."""
        base_prompt = ChatPromptTemplate.from_template(agent_instructions)
        return base_prompt + AIMessagePromptTemplate.from_template(
            "{intermediate_steps}",
        )

Subdomains

Frequently Asked Questions

What does get_default_prompt() do?
get_default_prompt() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/xml/base.py.
Where is get_default_prompt() defined?
get_default_prompt() is defined in libs/langchain/langchain_classic/agents/xml/base.py at line 52.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free