Skip to content

Deep dive into LangChain building blocks: prompts, chat models (Gemini), output parsers, text splitters, embeddings/vector stores, retrievers, LCEL piping, and a tool-using agent.

Notifications You must be signed in to change notification settings

DrParthaMajumder/L5-Models-Langchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

L5 - Models

Overview

xplore configuring and comparing LLM backends with LangChain. Learn how temperature, max tokens, and model choice impact latency, cost, and quality. Run examples and exercises, swap providers, benchmark responses, and record results to make informed trade‑offs for production-ready model selections.

Contents

  • ex1.ipynb — prompt + chat model basics
  • ex2.ipynb — parameter sweeps and comparison utilities
  • ex3.ipynb — provider swap and lightweight benchmarking
  • Exports: models.html, models.pdf

How to Use

  • Open notebooks and run cells top-to-bottom.
  • Modify parameters (e.g., temperature) and model names to observe changes.
  • Record latency and response quality to compare providers and settings.

Setup

  • Environment variables (examples):
    • GOOGLE_API_KEY for Gemini models
    • Optionally OPENAI_API_KEY or others if you test multiple providers
  • Install:
    • pip install langchain langchain-google-genai python-dotenv
    • Add extras as needed for your experiments.

Models

  • Recommended: gemini-2.5-flash
  • Fallbacks (if not enabled): gemini-1.5-pro, gemini-1.5-flash

Exporting (optional)

  • HTML: jupyter nbconvert --to html models.ipynb
  • PDF (Chromium): jupyter nbconvert --to webpdf models.ipynb --WebPDFExporter.allow_chromium_download=True

Developer

  • Dr. Partha Majumder

About

Deep dive into LangChain building blocks: prompts, chat models (Gemini), output parsers, text splitters, embeddings/vector stores, retrievers, LCEL piping, and a tool-using agent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published