# LearningAI — Personal AI Engineering Lab

A hands-on learning platform covering 4 core AI engineering topics. Each kit has a Jupyter notebook you run top-to-bottom, with a built-in LLM assistant to answer follow-up questions as you go.

## Kits

| Kit | Notebook | Topic |
|-----|----------|-------|
| `Langgraph/` | `telemetry_deep_dive.ipynb` | Multi-node agents, checkpointing, LangSmith/Langfuse observability |
| `MCP/` | `mcp_deep_dive.ipynb` | Model Context Protocol, FastMCP, Claude tool integration |
| `RAG/` | `rag_deep_dive.ipynb` | Chunking, hybrid search, reranking, RBAC, evaluation |
| `Otel/` | `otel_deep_dive.ipynb` | OpenTelemetry parsing, OTLP/X-Ray/Azure normalization |

## Setup (one time)

```bash
# 1. Create a virtual environment at the repo root
python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

# 2. Install all dependencies
pip install -r requirements.txt

# 3. Add your API key
cp .env.example .env
# Edit .env and set ANTHROPIC_API_KEY=sk-ant-...

# 4. Launch Jupyter Lab
jupyter lab
```

Jupyter Lab will open at `http://localhost:8888`. Navigate to any kit's `notebooks/` folder and open the deep-dive notebook.

## Environment Variables

All notebooks load from the single `.env` at this root. See `.env.example` for all available keys. Only `ANTHROPIC_API_KEY` is required to run any notebook.

## Ask Follow-up Questions

Every notebook has a final **"Ask Follow-up Questions"** cell at the bottom. Edit the question string and re-run the cell — the LLM assistant answers in the context of that kit's topic.

```python
from shared.llm_qa import ask
ask("What's the difference between LangSmith and Langfuse for production use?")
```

## Adding a New Kit

1. Create a folder `YourTopic/your_kit/` with source files and a `notebooks/` subfolder
2. Add any new dependencies to the root `requirements.txt`
3. Load env with `from dotenv import load_dotenv, find_dotenv; load_dotenv(find_dotenv())`
4. Import the Q&A assistant with `from shared.llm_qa import ask`
