A structured collection of concepts, examples, and projects to learn and apply LangChain — from fundamentals to building powerful AI agents and workflows.
LangChain is an open-source framework that helps developers build LLM-powered applications.
It provides building blocks to connect large language models (LLMs) with external data, memory, and tools, enabling applications like:
- Question Answering over documents
- Conversational chatbots
- Agents with tool usage
- Retrieval-Augmented Generation (RAG)
Modern LLMs (like GPT, Claude, Gemini) are powerful but limited in isolation. They:
- Forget context after a few turns
- Can’t directly access external data
- Struggle with reasoning beyond prompts
LangChain solves this by:
✅ Adding memory so apps remember past conversations
✅ Integrating with tools & APIs
✅ Supporting retrievers & vector databases for knowledge grounding
✅ Enabling agents that can act dynamically
This makes LangChain a key framework for building real-world, production-ready AI apps.
-
Chains
- Sequences of calls (LLM → prompt → output) that form workflows.
- Example: Summarize → Translate → Answer.
-
Prompts
- Templates that structure input to LLMs.
- Helps reuse and standardize queries.
-
Agents
- LLMs that decide which tool/action to take next.
- Example: Search → Retrieve Data → Generate Answer.
-
Tools
- External functions or APIs an agent can call.
- E.g., Google Search, calculator, database query.
-
Memory
- Store conversation history or context.
- Example: A chatbot remembering past user preferences.
-
Retrievers & Vector Stores
- Fetch relevant chunks from external knowledge.
- Powering Retrieval-Augmented Generation (RAG).
# Clone the repo
git clone https://github.com/alihassan-coder/langchain-concepts-projects.git
cd langchain-concepts-projects