Welcome to the LangChain Learning Guide β a comprehensive, beginner-friendly resource to help you master LangChain, one of the most powerful frameworks for building applications with LLMs (Large Language Models).
- π Introduction
- βοΈ Environment Setup
- π§ͺ Tutorials
- π Resources
- π Contributing
- π License
LangChain is a powerful framework for developing applications powered by language models. It enables developers to connect LLMs with external data, tools, and APIs, allowing you to build things like:
- Chatbots
- RAG (Retrieval-Augmented Generation) systems
- Document QA systems
- Autonomous agents
- Text summarizers, and more
This repository is structured to help you understand and experiment with LangChain core concepts through hands-on tutorials.
To get started:
git clone https://github.com/Arbazkhan-cs/GenAI.git
cd GenAIMake sure Python 3.8 or higher is installed.
pip install -r requirements.txtCreate a .env file in the root directory and add your credentials:
OPENAI_API_KEY=your_api_key_here
GROQ_API_KEY=your_api_key_here
HUGGINGFACE_API_ACCESS_KEY=your_api_key_here # optionalYou may also configure model paths if running local models:
export LANGCHAIN_MODEL=<path/to/your/model>This guide includes modular tutorials categorized by LangChain components:
| Directory | Description |
|---|---|
| Agents | Learn to build autonomous agents that make decisions using tools and memory. |
| ChatModels | Work with chat-optimized language models (like OpenAI's ChatGPT). |
| Chains | Compose sequences of calls (chains) to models and tools. |
| EmbeddingModels | Generate and use embeddings for vector search and retrieval. |
| OutputParsers | Parse and format outputs into structured formats (e.g., JSON). |
| Prompts | Craft and manage prompt templates for dynamic use cases. |
| RAG | Build Retrieval-Augmented Generation pipelines with vector stores. |
| Runnables | Combine components like chains and models into composable functions. |
| StructuredOutput | Enforce structured output from LLMs using schemas and validations. |
- π LangChain Documentation
- π¬ LangChain Discord Community
- π GitHub Issues
Found a typo? Have suggestions for a new tutorial?
We welcome contributions! Feel free to open a pull request or raise an issue.
This project is licensed under the MIT License β see the LICENSE file for details.
β If you find this project helpful, consider giving it a star on GitHub!
Happy building! π