Gen-AI Developer Classroom notes 31/Aug/2026

Messages in langchain

  • when we are interacting with model we have following options

    • system prompt: This sets the system instructions for a model
    • human prompt: This is users question
    • llm response: This is response from llm
    • tool message: This represents tool response.
  • According to langchain terminology

    • System Prompt => SystemMessage
    • HumanPrompt => HumanMessage
    • LLM Response => AI Message
    • Tool Response => ToolMessage

Preview

Lets see all messages in action

  • note: agent takes messages as input
  • Refer Here for messages demo

  • Note: Model responds to messages passed, it doesn’t remember anything, so while building agents managing memory is our problem.

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading