Skip to content

Instantly share code, notes, and snippets.

@luisjunco
luisjunco / python_virtual_environments__langchain02.md
Last active October 27, 2026 06:13
A document explaining how to setup Python Virtual Environments (with examples for langchain 0.2)

Python Virtual Environments

What is a virtual environment?

A virtual environment (venv) is an isolated Python environment that allows you to install packages for a specific project without affecting your system Python or other projects.

Virtual environments are particularly useful when different projects require different versions of the same library.

For example, one project can use LangChain 0.2 while another uses a newer version, with no conflicts between their dependencies.

@luisjunco
luisjunco / exercise-structured-outputs.md
Created October 14, 2026 07:54
Practice: Structured Outputs

Practice: Resume Parser with Structured Outputs

Instructions

For this exercise, your task is to turn free-text resumes (like the one shown below) into a Python object using Structured Outputs.

Starter code:

@luisjunco
luisjunco / exercise-prompt-engineering.md
Last active October 12, 2026 10:41
Practice: Prompt Engineering

Practice: Prompt Engineering in Action

Setup

from openai import OpenAI
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv())
@luisjunco
luisjunco / tips-and-recommendations--project-1-NLP-Automated-Customer-Reviews.md
Last active October 5, 2026 13:02
Tips & Recommendations for Project 1 (NLP Automated Customer Reviews)

Tips & Recommendations for Project 1 (NLP Automated Customer Reviews)


Dataset

@luisjunco
luisjunco / exercise-python-for-loop.md
Created September 14, 2026 10:08
Exercise to practice Python for loops

Practice: for loop

Iteration 1

You have a list of AI models. Print each one on its own line.

models = ["GPT-4", "Claude", "Gemini", "Llama", "Mistral"]

🔴 Red Team Challenge

Red teaming is the practice of deliberately trying to break, misuse, or bypass a system so its weaknesses can be found and fixed before they cause real problems.

In AI engineering, this means going beyond asking “Does the model work?” and asking:

  • “How could someone misuse this?”
  • “What assumptions is the developer making?”
  • “What happens when the user doesn't follow the intended path?”
  • “Can I make the model ignore its instructions?”
@luisjunco
luisjunco / exercise_NLP_evaluation_metrics.md
Last active November 3, 2026 08:00
Exercise NLP Evaluation Metrics (BLEU, ROUGE, LLM-as-a-judge)
@luisjunco
luisjunco / open-models-vs-closed-models.md
Last active July 30, 2026 09:30
Open Models vs. Closed Models

Open Models vs. Closed Models

Open-weight models (e.g. Kimi3, Llama, Mistral, Phi)

Advantages

  • Can fine-tune on your own data
  • More privacy and control (can run on your own infrastructure)
  • No per-token API costs (you pay for compute instead)
  • Can run offline or in air-gapped environments
  • Full control over model version and deployment
@luisjunco
luisjunco / langchain-versions-summary.md
Created July 29, 2026 10:44
A summary of different LangChain Versions (pre 0.1 / 0.1-0.3 / 1.x)

LangChain Versions: Evolution, Terminology, and Key Differences

LangChain has evolved significantly since its initial release. Rather than thinking in terms of dozens of individual releases, it's more useful to understand its development as three major eras.

Era Common name Approx. timeframe Main characteristics
Pre-0.1 Early LangChain 2023 Experimental framework centred around chains
0.1–0.3 LangChain v0 / LCEL LangChain 2024–2025 Introduction of LCEL and the Runnable architecture
1.x LangChain v1 2025–present Agent-first framework built on top of LangGraph
@luisjunco
luisjunco / exercise_langchain02_agents.md
Last active October 28, 2026 09:23
Exercise to practice LangChain Tools and Agents (LC<0.3)

Practice: LangChain Agents

Setup

Install dependencies:

#