This repo is built to be a hands-on learning repo to help you understand LangChain, LLM providers, vector stores, and basic RAG/back-end patterns through Jupyter notebooks and small scripts.
The project is structured around modules in notebooks/ and supporting utilities in scripts/, with tests in tests/ to verify your solutions.
notebooks/: Guided notebooks for LangChain fundamentals, chains, tools, RAG, and simple apps.scripts/: Helper scripts for running or checking notebook code from the CLI.tests/: Pytest-based checks for your solutions, useful for self-evaluation and CI.resources/: Reference material to guide you throught the course.submissions/: Place your own implementations or checkpoint notebooks here if you are following as a course.docs/: Product-style docs such asproduct_overview.mdandpricing_faq.mdused as realistic content for RAG experiments..env.example: Template for API keys and environment configuration.requirements.txt: Dependency list for notebooks, API backends, and tooling.
- LangChain ecosystem:
langchain,langchain-openai,langchain-anthropic,langchain-communityfor building LLM chains and tools. - LLM providers:
openai>=1.0.0,anthropicfor hosted models. - Vector and document stack:
faiss-cpu,chromadb,pypdf,python-docxto build simple RAG pipelines. - Web backend:
fastapi,uvicorn[standard],pydantic>=2.0.0,requestsfor minimal LangChain-powered APIs. - Dev experience: Jupyter stack (
jupyter,jupyterlab,notebook,ipython,ipykernel,ipywidgets) plus testing and linting (pytest,pytest-asyncio,pytest-cov,black,flake8,mypy,pylint).
git clone https://github.com/bdaccell-nitw/langchain-primer.git
cd langchain-primermacOS
python3 -m venv .venv
source .venv/bin/activate Windows (PowerShell)
python -m venv .venv
.venv\Scripts\Activate.ps1Windows (CMD)
python -m venv .venv
.venv\Scripts\activate.batpip install --upgrade pip
pip install -r requirements.txt- Copy the example env file:
macOS (terminal) :Windows (Powershell):cp .env.example .env
copy .env.example .env
- Edit
.envand set keys such asOPENAI_API_KEY,OPENROUTER_API_KEY, and any other required credentials used inside the notebooks or FastAPI examples.
From the project root:
jupyter lab # or: jupyter notebookThen open the notebooks under notebooks/ and follow the instructions in each module.
- To run a single test
pytest tests/test_filename.py- To run all tests under tests/.
pytest -
Start with the earliest module in
notebooks/. -
Create a new .ipynb file following the format _0.ipynb
Eg: easy_01.ipynb -
Copy the template code in modules and paste it in your newly created file under submissions folder
-
Implement the TODOs
-
Run
pytestto check correctness. -
If all tests pass ,Open a Pull Request on your with the below format
fix(module_<module_no.>): <difficultylevel>
Eg: fix(module_3): easy
- Note : Follow this guide for commit message conventions