Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Tutorial 2: Working with Language Models

Welcome to Tutorial 2. We go deeper into LangChain's model abstraction — prompt templates, LCEL chains, output parsers, and best practices for prompting.

What you'll learn

  1. Connecting to Groq models via ChatGroq
  2. PromptTemplate and ChatPromptTemplate — dynamic prompt construction
  3. LCEL chains: prompt | llm | OutputParser
  4. Output parsers: StrOutputParser, CommaSeparatedListOutputParser
  5. Prompt engineering best practices

Prerequisites

  • Completion of Tutorial 1
  • Virtual environment active with dependencies installed
  • Groq API key in .env — see Tutorial 1 for setup

Running the notebook

cd Tutorial02
jupyter notebook Tutorial_2_Working_with_Language_Models.ipynb