Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Месяц 5 — Сборник упражнений

🟢 Easy

LLM Fundamentals

  1. Сравните токены на английском и узбекском тексте через tiktoken.
  2. 5 моделей (GPT-4o-mini, Claude Haiku, Gemini Flash, Llama 3.1, Mistral) с одинаковым вопросом.
  3. Temperature 0, 0.5, 1.5 — посмотрите разницу ответов.

Prompt Engineering

  1. Zero-shot, few-shot, CoT — на одной и той же задаче.
  2. Structured Pydantic output через Instructor.
  3. Prompt + validation для JSON output.

APIs

  1. OpenAI streaming chat.
  2. Anthropic prompt caching.
  3. Function calling — 3 tool.

Vector DB

  1. 100 документов в ChromaDB.
  2. Qdrant Docker setup.
  3. pgvector Postgres extension.

RAG

  1. Naive RAG — 10 документов, query.
  2. Citation — формат [Source N].
  3. Сравнение стратегий chunking.

Agents

  1. Pydantic AI agent + 3 tool.
  2. CrewAI hello world.
  3. Простой workflow LangGraph.

Fine-tuning

  1. Загрузка pretrained Llama 1B.
  2. 50 синтетических dataset (через GPT).
  3. Понимание синтаксиса LoRA config.

🟡 Medium

Реальные проекты

  1. Multi-turn chatbot: сохранение history, управление context window.
  2. RAG over Wikipedia: 100 узбекских Wikipedia статей.
  3. PDF Q&A bot: PyPDF + Qdrant + Streamlit.
  4. Code review agent: GitHub PR diff → suggestions.
  5. Email summarizer: 50 email → daily digest.

Advanced techniques

  1. Multi-query RAG: с query expansion.
  2. HyDE: hypothetical embeddings.
  3. Hybrid search: dense + BM25.
  4. Reranking: через cross-encoder.
  5. Multi-agent: система из 3 agent CrewAI.

Fine-tuning

  1. TinyLlama: QLoRA с узбекским instruction dataset (Colab).
  2. OpenAI fine-tuning: customer support classifier ($1 budget).
  3. Синтетические данные: 500+ training pairs через GPT-4.

🔴 Hard (Production)

1. Documentation Q&A Bot

Требования:

  • Ingestion 100+ документов (PDF, markdown, websites)
  • Qdrant + FastAPI + Celery
  • Multi-query + reranking
  • Citation и source links
  • Streamlit UI
  • Langfuse observability
  • Cost tracking per user

2. AI Customer Support Agent

Требования:

  • Telegram bot (aiogram)
  • Multi-turn conversation
  • Tools: FAQ search, order lookup, refund process, escalate to human
  • LangGraph workflow
  • Postgres memory
  • Sentiment-based routing
  • Admin dashboard

3. RAG Evaluation Framework

Требования:

  • Создание test set (100+ Q&A pairs)
  • Automated evaluation через RAGAS
  • A/B testing framework
  • Continuous improvement loop
  • Grafana dashboard

4. Domain-specific Fine-tuning Pipeline

Требования:

  • Data collection + cleaning
  • Synthetic data augmentation
  • QLoRA fine-tuning (Llama 3.1 8B)
  • vLLM serving
  • Benchmark (vs base model)
  • Production rollout strategy

Мини-проекты

Мини-проект 1: Voice-to-Text Meeting Assistant

  • Whisper (audio transcription)
  • LLM summarization
  • Извлечение Action items
  • Slack integration

Мини-проект 2: Code Review Bot

  • GitHub webhook
  • Diff parsing
  • LLM analysis (security, performance)
  • Inline PR comments

Мини-проект 3: Personal Knowledge Base

  • Notion + Obsidian export
  • Vector DB ingestion
  • “Second brain” chatbot
  • Smart search

Мини-проект 4: Чатбот по узбекским государственным документам

  • Скрейпинг lex.uz, data.gov.uz
  • Multi-language (uz/ru)
  • Citation
  • Legal disclaimer

Quiz

LLM

  1. Token, context window, temperature, top_p — объясните каждый.
  2. Pretraining, SFT, RLHF — в какой последовательности?
  3. Что такое hallucination и как уменьшить?
  4. Proprietary vs Open Source LLM — критерии выбора?
  5. Как работает Prompt caching?

Prompt Engineering

  1. Zero-shot, few-shot, CoT — когда какой?
  2. Паттерны для structured output (JSON)?
  3. Prompt injection — угроза и защита?
  4. Техника Self-consistency?
  5. Intuition ReAct pattern?

RAG

  1. Разница RAG vs Fine-tuning?
  2. Trade-off стратегий chunking?
  3. Как работает алгоритм HNSW?
  4. Что такое Hybrid search?
  5. Почему Cross-encoder reranking даёт улучшение?

Agents

  1. Разница Agent и LLM call?
  2. ReAct pattern — Thought/Action/Observation?
  3. Когда нужен Multi-agent?
  4. Что такое MCP (Model Context Protocol)?
  5. Безопасность Agent — sandbox паттерны?

Fine-tuning

  1. Математический intuition LoRA?
  2. QLoRA — почему 4-bit?
  3. Стратегии synthetic data generation?
  4. RAG vs Fine-tuning — когда первое, когда второе?
  5. Почему vLLM быстрый в production?

✅ Чек-лист конца Месяца 5

  • Использую LLM API (OpenAI, Anthropic)
  • Знаю техники prompt engineering
  • Structured output (Instructor, Pydantic AI)
  • Знаком с Vector DB (хотя бы 2)
  • Создал полный RAG pipeline
  • Написал AI Agent (tool use)
  • Попробовал маленький fine-tuning через LoRA
  • Вывел в production (FastAPI + Docker)
  • Langfuse / observability
  • Capstone проект (chatbot/RAG)
  • Пост в LinkedIn

Поздравляю! Месяц 6 — MLOps и Production — самый важный месяц для вашей основной цели.