Overviewlangchain-models is a curated collection of Python implementations designed to master the Model I/O component of the LangChain ecosystem. This repository serves as a bridge between raw data and semantic intelligence, showcasing how to leverage industry-leading LLMs and local embedding models.From simple text completions to complex Semantic Search systems, this project provides a modular approach to understanding AI model integration.
π Key Features: π€ LLM Mastery: Direct integration with Large Language Models for deterministic text generation. π¬ Structured Conversations: Advanced chat interfaces using System, Human, and AI message schemas. π Semantic Intelligence: Generating high-dimensional vector embeddings using OpenAIβs text-embedding-3-large. π Vector Similarity: Implementing Cosine Similarity to perform semantic search across custom datasets (e.g., Cricketer profiles). π Hybrid Approach: Seamlessly switching between cloud-based (OpenAI) and local (Hugging Face) models. ποΈ Project StructureThe architecture follows a clean, numbered organization for step-by-step learning:
π¦ langchain-models: β£ π 1.LLMs/ # Basic Large Language Model implementations β£ π 2.ChatModels/ # Conversational schemas and Chat-based logic β£ π 3.EmbeddedModels/ # The core of Semantic Search & Vector Analysis β β£ π 1_embedding_openai_query.py β β£ π 2_embedding_openai_docs.py β β£ π 3_embedding_hf_local.py β β π 4_document_similarity.py # Main script for Semantic Search (Cricketers Dataset) β£ π .env # Configuration & API Keys (Strictly Git-ignored) β£ π .gitignore # Protection against secret leaks and heavy venv β£ π requirements.txt # Unified dependency list β π README.md # Project Documentation
Created with β€οΈ by @aliza-dev