learntodriveai.dev/Machine Learning/Bridging Embeddings and Classical ML with Delegated Agents
Machine Learning·Project 16·6 units

Bridging Embeddings and Classical ML with Delegated Agents

**Track:** Machine Learning

§ Brief

You're building a property valuation model that combines structured features with text embeddings for Kerem Yilmaz at Emlak Vizyon, a proptech company in Istanbul. The current model uses tabular features and ignores the listing descriptions, where most of the price-discriminating information actually lives.

The discipline skills: embedding-based features feeding a classical regressor (the bridge), a feature store with embedding-version pinning, hybrid retrieval applied to a similar-listings feature, an ablation that defends the comparison claim cleanly, multi-service orchestration across an embedding service and a classical training service, and per-segment evaluation that shows where the bridge actually pays off.

The AI-direction lesson: full verification autonomy and your first delegated agent. Through P15 you directed AI inside a session — every catch happened in real time. Now you configure a Codex CLI agent (system prompt, scope, capability limits) and let it run a component on its own. Verifying a delegated agent's output is a different act than verifying in-session work — the verification architecture has to be designed before the agent runs.

Your Role

Bridge ML engineer on a regression problem with a hybrid feature stack and a delegated worker on a second AI tool. You handle the system-type call from a Slack thread, the embedding model selection on a bilingual corpus, the feature store, the ablation, the multi-service stack, the first custom agent, and project memory across sessions.

The scaffolding shifts. P15 gave you primer files and a senior colleague across the whole engagement. P16 withdraws the primer files and narrows the colleague to a single seam — you are the architect from first contact. What's independent: retrieval, embeddings, evaluation, project memory from P14-P15. What's guided: delegation by design (new) and the bridge feature engineering (architecturally new). A senior evaluation consultant is reachable on-demand for one thing only — whether your bridge ablation actually proves its claim — and she won't volunteer or hand you answers. For everything else, when you're stuck you consult AI itself; meta-prompting is the consultation channel.

What's New

Last time you built a RAG pipeline for Yuki Nakamura — hybrid retrieval, groundedness verification, the first paid API call, three-failure-mode evaluation. Embeddings, hybrid search, and held-out evaluation are floor now.

This time embeddings stop being for retrieval and become features. A sentence-transformer turns each listing description into 768 numbers; those numbers sit next to eight structured features in one training matrix; a gradient-boosted regressor learns from both. The bridge claim — "embeddings + structured beats structured-only" — has to be proved on a clean ablation with per-segment metrics. And for the first time you delegate: you write a Claude Code agent for one component, then a Codex CLI agent for another. Same delegation pattern, two configuration syntaxes.

The hard parts are scoped quietly. A 768-dim dense block concatenated next to 8 structured features without scaling silently dominates the regressor. A default English embedding model mishandles a corpus that is 80% Turkish. A version drift between training and serving embeddings silently breaks every prediction. A delegated agent with broad tool access can poison training data before you see it. Each is a catch the verification architecture has to anticipate before the work starts.

Tools

  • Claude Code — primary AI agent, project memory carried forward and extended; first custom agent authored in .claude/agents/ (familiar, deeper)
  • Codex CLI — second AI tool with richer agent configuration: model selection, reasoning effort, sandbox mode, per-agent MCP connections (new)
  • Python / pandas — corpus inspection, ablation reporting, feature analysis (familiar)
  • scikit-learn — Pipeline, preprocessing, the consumer of embedding features (familiar)
  • LightGBM or XGBoost — the gradient-boosted regressor on the hybrid feature matrix (familiar)
  • sentence-transformers — frozen multilingual encoder for Turkish-and-English listings (familiar, deeper)
  • rank_bm25 — keyword retrieval paired with vector search for the similar-listings feature (familiar)
  • A small feature store — written by you; pins embedding model version and writes Parquet artefacts (new)
  • MLflow — tracks the ablation runs; the MLflow MCP server reachable from both Claude Code and Codex CLI (familiar, deeper)
  • Docker Compose — orchestrates the embedding service, feature store, and training/serving service (familiar, deeper)
  • pytest — extended with ablation-validity tests and feature-version-pinning tests (familiar)
  • Git/GitHub — familiar

The unit that introduces each new tool walks through setup.

Materials

You receive:

  • A listings-corpus/ of mock real estate listings — around 50,000 rows, structured features plus free-text descriptions, mixed Turkish and English
  • Your CLAUDE.md and AGENTS.md carried forward, with an empty section "Bridge-specific rules — to extend during this project"
  • A feature_store_skeleton.py — class structure with method signatures and a TODO at each method body
  • An eval-set/held-out-properties.json template, with language and text-density tags you populate during discovery
  • A docker-compose.yml skeleton with three services declared (embedding-service, feature-store, training-and-serving) and TODO comments at the integration points
  • A .env.example showing how to wire any API keys without committing them

The senior-colleague handle on this project is narrow: an on-demand evaluation consultant for the bridge-ablation seam only. For everything else, when you're stuck, you ask AI directly.