AI & Data
Build products on LLMs: prompts, context, RAG, agents, MCP, evals and safe production use.
A path for developers who want to ship features powered by large language models. It goes from how LLMs work and how to prompt them, through context engineering, embeddings and retrieval, to agents, the Model Context Protocol, safety, observability and evals. Each subject links the provider or project documentation.
The subjects follow the roadmap.sh AI Engineer roadmap.
AI engineering is building products on top of pre-trained foundation models rather than training models from scratch. The work is mostly software engineering: calling model APIs, shaping context, wiring tools and data, and measuring quality so features can ship and improve safely.
A developer who turns model capabilities into reliable features: picking models, writing prompts and tools, building retrieval, and setting up evals and monitoring. Strong backend skills matter more than deep ML maths.
ML engineers collect data, train and serve their own models; AI engineers mostly adapt existing foundation models through prompts, retrieval and occasionally fine-tuning. The line blurs when you self-host or fine-tune.
Prototypes take days instead of months, but outputs are probabilistic, so teams need eval sets, guardrails, fallbacks and cost budgets before launch. Product decisions now include model choice and latency trade-offs.
Designing prompts and context, integrating model APIs and tools, building RAG pipelines, owning evals and regression tests, watching cost, latency and safety in production, and keeping up with new model releases.
The vocabulary used everywhere else in the field. Most terms describe either how a model is built (training, fine-tuning), how it runs (inference, context window) or how applications feed it information (embeddings, vector databases, RAG).
Today's AI systems are narrow or general-purpose tools that still fail in odd ways; AGI means human-level ability across virtually any task. Treat AGI claims as marketing unless backed by evals.
A transformer network trained on huge text corpora to predict the next token, then tuned to follow instructions. Everything else on this roadmap is about using one well.
Fixed-length numeric vectors that place similar meanings close together in space, produced by an embedding model. They power search, clustering and retrieval.
Pre-training learns general language from trillions of tokens; post-training (instruction tuning, RLHF) makes the model helpful and safe. Both are done by labs at enormous cost, not by application teams.
Running a trained model to produce output. You pay for it per token or per GPU-hour, and it dominates latency: time to first token plus generation speed.
Databases built to store embeddings and answer nearest-neighbour queries quickly, usually alongside metadata filters.
Retrieval-augmented generation: fetch relevant documents at question time and put them in the prompt so answers are grounded in your data, not just the model's memory.
The maximum number of tokens a model can read and write in one call, ranging from tens of thousands to over a million. Quality often degrades well before the limit.
Further training a pre-trained model on your own examples to change its style or teach a narrow task. Cheaper methods like LoRA update only small adapter weights.
Making self-hosted models fast and cheap to serve: batching, KV caching, quantisation, speculative decoding and GPU autoscaling. Engines like vLLM and TGI do much of the heavy lifting.
An LLM reads the whole input as tokens, computes a probability distribution over the next token, picks one, appends it and repeats. Sampling settings decide how that pick is made, which is why the same prompt can give different answers.
The sub-word pieces models read and write; an English word averages a bit over one token, and other languages and code often cost more. Pricing, limits and latency are all counted in tokens.
Everything the model sees on a call: system prompt, conversation history, retrieved documents and tool results. The model has no memory beyond it, so what you put there decides what it knows.
Knobs that shape how the next token is chosen from the distribution: temperature, top-k, top-p, penalties and max tokens. Some reasoning models fix or ignore them.
Scales the distribution before sampling: near 0 almost always picks the top token (good for extraction and classification), higher values give more varied, creative output and more mistakes.
Samples only from the k most likely tokens. A blunt cut-off that ignores how confident the model is; often left at its default.
Nucleus sampling: keep the smallest set of tokens whose probabilities sum to p and sample within it. Adjust either temperature or top-p, rarely both.
Frequency and presence penalties lower the score of tokens already produced, discouraging loops and repeated phrases. Too high and the model avoids words it legitimately needs.
Writing instructions and examples so a model reliably does the task. Good prompts are clear, give context and success criteria, show the expected output and are versioned and tested like code.
How you lay out the prompt matters: separate instructions from data with XML tags or delimiters, put long documents before the question, and label each part.
The system message sets persistent rules, persona and output conventions for the whole conversation, separate from user turns. Keep it stable so it can be cached.
Giving the model a role ("a senior tax accountant reviewing…") and describing desired behaviour, tone and what to do when unsure shifts its defaults more than vague adjectives do.
Explicit limits on length, format, language, allowed sources and topics to refuse. State them positively ("answer in two sentences") and explain why when it matters.
Asking for JSON that matches a schema so code can parse the reply. Use the provider's native structured-output or JSON-schema mode instead of hoping the text parses.
Asking for the task with instructions only, no examples. Modern models handle most tasks this way; add examples only when outputs drift.
Including a handful of input–output examples to pin down format and edge cases. Vary the examples, or the model copies their surface details.
Chain-of-thought: let the model reason step by step before answering, which helps on maths and multi-step logic. Reasoning models do this internally; for others, ask for thinking in a separate tag.
Reason + Act: the model alternates between thinking, calling a tool and reading the observation until it can answer. The pattern underneath most agents.
You describe functions with JSON schemas; the model replies with a structured call, your code runs it and returns the result for the next turn. The model never executes anything itself.
Providers can reuse the processed prefix of a prompt across calls, cutting cost and latency for long, stable system prompts and documents. Put static content first and dynamic content last.
Receiving tokens as server-sent events while they are generated, so users see text immediately. Your code must handle partial JSON and tool-call deltas.
Deciding, on every model call, exactly which instructions, data, history and tool results go into the limited context window. As agents run longer, this curation matters more than wording any single prompt.
Prompt engineering polishes the instructions; context engineering manages the whole input over time — what to retrieve, summarise, drop or hand to a sub-agent across many turns.
The component between your data and the model that collects candidate information, ranks and trims it, and assembles the final input. It can be your own code or a dedicated platform.
Documents, databases, code, tickets, user profiles and earlier tool outputs. Each differs in freshness, permissions and format, so normalise and filter before anything reaches the prompt.
A standard protocol for plugging tools and data sources into any compatible AI app, so the context layer can reach many systems through one interface.
Retrieved text is untrusted input: it can carry injected instructions or leak data a user should not see. Enforce permissions at retrieval time and keep secrets out of the context.
Measuring whether the right information reached the model: retrieval recall and precision, token cost per answer, and whether answers stay faithful to the supplied context.
Concrete ways to keep the context small, relevant and correct: retrieve selectively, persist memory outside the window, summarise old turns and isolate work in sub-agents. Most long-running agents combine several.
Retrieve only what the current step needs, narrowed by metadata such as tenant, date or permission, instead of stuffing every possibly relevant document in.
Storing facts, preferences and past outcomes outside the context window — files, a database or a vector store — and recalling them when relevant. Needs rules for what to save and when to forget.
Summarising or pruning older turns and bulky tool outputs once the conversation grows, keeping decisions and open questions while dropping raw detail.
Working with very large inputs: place documents before the question, ask the model to quote relevant passages first, and verify recall rather than trusting the advertised window.
Tracking task state explicitly — progress notes, todo lists, structured state objects — so the agent can resume after compaction or a restart without rereading everything.
Deciding what each agent sees: pass concise briefs and results between agents rather than full transcripts, and keep a shared store for facts every agent needs.
Running sub-tasks in separate contexts (sub-agents, sandboxes) so exploration noise never pollutes the main thread; only a summary comes back.
Poisoning (a wrong fact repeated as truth), distraction (too much irrelevant text), confusion (conflicting tools or docs) and plain overflow. Each shows up as degraded answers, not errors.
Platforms that catalogue an organisation's data and expose it, with ownership and lineage, to AI agents. Worth knowing when agents must answer from company data rather than a few documents.
A commercial context warehouse that learns business meaning from how a company already uses its data — queries, models, dashboards — and serves agents just the relevant slice.
An open-source metadata platform from LinkedIn that maps datasets, lineage and ownership; agents can use it to find trustworthy tables before querying.
A commercial data catalogue and governance platform with search, lineage and quality signals, usable as a vetted context source for agents.
An open-source product analytics suite whose event data, replays and business context can be queried by agents through its MCP server; it also has LLM analytics.
Models differ in who controls the weights, how they are accessed and what they cost. The main split is closed models behind a vendor API versus open-weight models you can download and run.
Models already trained by a lab and ready to use as-is, prompt or fine-tune. Choosing and adapting them, rather than training, is the AI engineer's default.
Closed models usually lead on capability and need no infrastructure, but your data leaves your network and pricing is the vendor's call. Open-weight models give control and privacy at the cost of hosting.
Running open weights on your own GPUs or laptop with tools like Ollama or vLLM. Watch VRAM needs, quantisation quality loss and the operational load.
Pick by testing on your own eval set, then weigh quality against cost per task, latency, context length, modality, data-residency rules and licence. Start with a strong model to prove the feature, then try cheaper ones.
Claude models (Haiku, Sonnet, Opus tiers) are strong at coding, long documents and agentic tool use, available via Anthropic's API, AWS Bedrock and Google Vertex AI.
Google's natively multimodal family with very long context windows, served through the Gemini API and Vertex AI; Flash variants are notably cheap and fast.
The GPT line for general chat and multimodal work and the o-series reasoning models; the most widely integrated API, with many tools copying its request format.
An enterprise-focused provider whose Command models target RAG and tool use, and whose Embed and Rerank models are popular in retrieval pipelines.
A French lab offering both open-weight and commercial models through La Plateforme; a common choice when European hosting matters.
Meta's open-weight family, the base for countless fine-tunes; check the custom licence's terms before commercial use at scale.
A Chinese lab releasing strong open-weight models, including reasoning models, at very low API prices. Consider where your data goes if you use the hosted API.
Alibaba's open-weight family covering many sizes plus coder, vision and embedding variants, popular for self-hosting and fine-tuning.
Google's small open-weight models built from Gemini research, sized to run on a single GPU or on-device.
The central hub of open AI: hosted models, datasets and demo Spaces plus the libraries (Transformers, Datasets, Diffusers) most open work is built on. Usually the first stop when evaluating an open model.
A catalogue of ML tasks — text classification, summarisation, speech recognition, image segmentation and more — each with explanations and recommended models.
Git-based repositories for models, datasets and Spaces, with model cards, licences and download stats. Use huggingface_hub or hf CLI to pull files.
Runs many Hugging Face models directly in the browser or Node.js via ONNX Runtime, with WebGPU support — no server needed for small models.
A tool for running open-weight models locally with one command (ollama run llama3.2). It handles downloading quantised weights and exposes a local REST API, including an OpenAI-compatible endpoint.
A desktop app for discovering, downloading and chatting with local models, with a built-in server that speaks the OpenAI API. Friendlier than the CLI for trying many models.
A gateway that exposes hundreds of models from many providers behind one OpenAI-compatible API and one bill, with routing and fallbacks between providers. Handy for comparing models without many accounts.
Every provider offers an HTTP API and official SDKs. Learn one deeply — messages, tools, streaming, errors and rate limits — and the others map across easily.
OpenAI's current endpoint for text, tools and multimodal input; it can keep conversation state server-side and includes built-in tools like web and file search.
Anthropic's stateless endpoint: send a system prompt and the full messages list, get content blocks back (text, tool use, thinking). Requires max_tokens on every call.
Google's generateContent API with the Google Gen AI SDKs, supporting text, images, audio, video and PDFs in one request plus structured output and function calling.
InferenceClient (Python) and @huggingface/inference (JS) call thousands of hosted models through Inference Providers with one token.
Many servers (Ollama, vLLM, OpenRouter, Groq, Gemini) accept OpenAI's request format, so switching is often just a base_url change — though features beyond basics vary.
An embedding turns text, an image or audio into a vector so that similarity of meaning becomes distance in space, usually measured with cosine similarity. Compare only vectors from the same model.
Finding documents by meaning instead of keywords: embed the query and return nearest neighbours. Pair with keyword search (hybrid) for names and exact terms.
Train a small classifier on embeddings, or compare to labelled examples, to tag tickets, reviews or documents cheaply without calling an LLM per item.
Recommend items whose embeddings sit close to what a user liked or viewed. Works for cold-start content because it needs no interaction history.
Flag items whose embeddings lie far from every cluster — unusual transactions, logs or messages — as candidates for review.
Choose on retrieval quality for your language and domain, vector size (storage cost), max input length and price. Re-embedding everything is required whenever you change model.
text-embedding-3-small and -large, with a dimensions parameter that shortens vectors to save storage with modest quality loss.
Google's multilingual embedding model with task-type hints (retrieval query vs document) and adjustable output size.
The standard Python library for open embedding and reranking models; runs locally on CPU or GPU and can fine-tune on your own pairs.
Thousands of open embedding models (BGE, E5, GTE, Nomic and more) ranked on the MTEB leaderboard; check licence, size and supported languages.
Jina AI's embedding and reranker models, with long inputs, multilingual and multimodal options, available as an API and as open weights.
Stores that index embeddings for fast approximate nearest-neighbour search, with metadata filtering, updates and deletes. Pick one that fits your scale and stack — Postgres with pgvector is often enough.
Exact search compares against every vector and does not scale; vector databases use ANN indexes (HNSW, IVF) that trade a little recall for big speed gains, plus filters and persistence.
An open-source, developer-friendly vector store that runs embedded in Python or JS or as a server — the quickest way to prototype.
A fully managed, serverless vector database: no infrastructure, namespaces for multi-tenancy, and built-in hosted embedding and reranking.
An open-source vector database with built-in hybrid (vector + BM25) search and modules that call embedding models for you.
Meta's C++/Python library for similarity search; not a database, but the fast in-memory index many tools are built on.
An embedded, serverless vector database on the columnar Lance format, storing vectors with raw data on local disk or object storage.
A Rust vector database with rich payload filtering, quantisation and a managed cloud; strong when filters are complex.
Hosted Postgres with pgvector, so embeddings live next to your relational data and row-level security applies to retrieval.
Atlas Vector Search adds a vector index to MongoDB collections, queried with the $vectorSearch aggregation stage alongside normal filters.
Embed each chunk, store the vector with its text and metadata, and build an ANN index. Tune index parameters (e.g. HNSW m, ef_construction) for recall versus memory.
Embed the query with the same model, ask for top-k by cosine or dot product with metadata filters, then optionally rerank the results with a cross-encoder.
A RAG pipeline indexes your documents once, then at query time retrieves the most relevant chunks and asks the model to answer from them, citing sources. It keeps answers current and grounded without retraining.
Internal knowledge assistants, support bots over help centres, search over contracts or code, and any answer that must cite a source or reflect data newer than the model.
RAG adds knowledge that changes and needs citations; fine-tuning changes behaviour, style or format. They combine well, and RAG is usually tried first.
Splitting documents into pieces small enough to retrieve precisely but big enough to make sense alone; split on structure (headings, paragraphs) with some overlap.
Turning each chunk into a vector with an embedding model, often prefixed with document title or a short context line to improve retrieval.
Where the chunk vectors and metadata live; it answers the similarity queries at question time and must be kept in sync as source documents change.
Rewrite or expand the query, run vector and keyword search, merge and rerank, then keep the top few chunks. Most RAG quality problems are retrieval problems.
Put retrieved chunks in the prompt with clear instructions to answer only from them, cite sources and say when the answer is not there.
You can hand-write the pipeline with provider SDKs or use a framework that bundles loaders, splitters, retrievers and integrations. Frameworks speed up prototypes but add abstraction you must debug through.
An embedding API, a vector store client and a chat API are enough for a clear, debuggable pipeline of about a hundred lines — often the best place to start.
A large framework of composable components for models, retrievers, tools and agents, with integrations for nearly every provider and vector store.
A framework focused on connecting LLMs to data: document loaders, many index types, query engines and agent workflows.
deepset's open-source framework for building search and RAG as explicit pipelines of components — production-minded and easy to inspect.
An open-source RAG engine with a web UI, strong parsing of complex documents (tables, scans) and visible chunking you can correct.
An agent is a model running in a loop, choosing tools and acting on their results until a goal is met. Prefer simple, predictable workflows and add autonomy only where the task truly needs it.
Coding assistants, research over many sources, customer-support resolution, data analysis and browser or computer automation — tasks with many steps that cannot be scripted in advance.
Prompting the model to interleave a thought, an action and the observation it returns; native tool calling now handles the action part for you.
Tools are the agent's hands. Give each a precise name, description and schema, return concise results and errors the model can act on, and keep the set small.
An orchestrator delegating to specialised sub-agents that work in parallel. Helps for broad research, but multiplies token cost and coordination bugs.
Agents can be a hand-written loop or built on an SDK that supplies the loop, tool execution, handoffs, tracing and guardrails. Learn the manual version first so the frameworks make sense.
A while loop: call the model with tools, run any tool calls it returns, append the results, stop when it answers or a step limit hits. Complete control, no hidden behaviour.
The Agents SDK (Python and JS) gives agents, tools, handoffs, guardrails and tracing; AgentKit adds a visual builder and embeddable chat UI on top.
The harness behind Claude Code as a library: file, shell and web tools, sub-agents, permissions, MCP and automatic context compaction.
Google Cloud's managed suite for building, deploying and governing agents, including a hosted runtime for agents built with ADK and other frameworks.
Agent Development Kit: Google's open-source, code-first framework for single and multi-agent systems, model-agnostic but tuned for Gemini.
An open protocol that standardises how AI applications connect to tools, data and prompts. Write a server once and any MCP-capable client — Claude, ChatGPT, IDEs — can use it.
The AI application the user works in, such as Claude Desktop or an IDE. It manages one client per server and decides what reaches the model.
The connector inside the host that holds a one-to-one session with a single server, negotiating capabilities and relaying requests.
A program exposing tools (actions), resources (readable data) and prompts (templates) to clients, wrapping an API, database or filesystem.
The JSON-RPC 2.0 messages that define the protocol: lifecycle and capability negotiation, tools/list and tools/call, resources, prompts and notifications.
How messages move: stdio for local subprocess servers, Streamable HTTP for remote ones, with OAuth-based authorisation for remote servers.
Use an official SDK (TypeScript, Python and others), register tools with schemas and handlers, and test with the MCP Inspector before connecting a client.
Connect to a server, list its tools, pass them to the model as tool definitions and forward the model's tool calls back to the server.
The host launches the server as a subprocess over stdio, configured with a command, args and env vars — e.g. in Claude Desktop's config file.
Point the client at an HTTPS URL; the server runs elsewhere, usually behind OAuth, so users can add it without installing anything.
LLM features can be manipulated, leak data, produce harmful or biased output and mislead users with confident errors. Treat model output as untrusted, limit what it can do, and test for abuse before attackers do.
Instructions hidden in user input or retrieved content that override yours. No prompt fully prevents it, so limit tool permissions, require confirmation for risky actions and isolate untrusted text.
Sensitive data sent to providers, leaking system prompts or other users' data, insecure handling of model output and excessive agent permissions. Check retention and training terms.
Models reflect skews in training data and can treat groups unequally in hiring, lending or moderation. Evaluate outputs across demographics and keep humans in high-stakes decisions.
Classifiers that flag harassment, self-harm, violence and similar categories in inputs and outputs, used as a cheap screening layer before or after the main model.
Passing a hashed per-user identifier in API requests (e.g. OpenAI's safety_identifier, Anthropic's metadata.user_id) lets providers trace abuse to one account instead of blocking your whole key.
Red-teaming: deliberately try jailbreaks, injections, data extraction and abuse cases, and keep the failures as regression tests.
Clear role, scope and refusal rules, delimited untrusted input, and checks on output — written so ordinary edge cases do not knock the model off task.
Scope the feature to known users and intended tasks; require sign-in, rate-limit and narrow the domain so misuse is harder and easier to spot.
Limit input length, use dropdowns or validated fields over free text where possible, enforce output schemas and allow-lists, and validate before acting on anything.
Recording every model call, tool call and retrieval with inputs, outputs, tokens, latency and cost, so you can debug bad answers and spot regressions in production. Standard logging misses most of this.
Nested spans for each step of a request — retrieval, prompt, model call, tools — with full payloads, so one bad answer can be replayed and explained.
Track tokens, spend and time-to-first-token per feature, user and model; set budgets and alerts, and use caching and smaller models where quality allows.
Watch error and refusal rates, user feedback and online eval scores over time; sample real traffic into review queues and eval datasets.
LangChain's hosted tracing, evaluation and prompt-management platform; works with or without LangChain itself.
Open-source, self-hostable LLM observability with traces, prompt versioning, datasets and evals, built on OpenTelemetry.
An open-source proxy-based gateway: change the base URL and every request is logged with cost and latency, plus caching and rate limits.
An ML and LLM observability platform; its open-source Phoenix offers tracing and evals locally on OpenTelemetry.
Evals are test suites for model behaviour: a dataset of realistic inputs plus a way to score outputs. They turn "seems better" into numbers, guiding prompt, model and retrieval changes.
Code-based checks: exact match, regex, JSON schema validity, required keywords, tool-call correctness. Fast, cheap and repeatable — use them wherever possible.
LLM-as-judge: a model grades outputs against a rubric for qualities code cannot check. Calibrate judges against human labels and watch for bias toward longer answers.
Experts or users rate outputs, often by pairwise comparison. Slow and costly, but the ground truth that automated graders are measured against.
Accuracy, pass rate, faithfulness, answer relevance, retrieval precision and recall, plus cost and latency. Pick a few tied to user value and track them per release.
An open-source, pytest-style eval framework with many ready metrics (faithfulness, hallucination, G-Eval) and synthetic data generation.
An open-source library focused on RAG metrics such as context precision, context recall and faithfulness, plus test-set generation from your documents.
Re-running your eval suite on every prompt, model or pipeline change, in CI, and blocking merges when scores drop. Model upgrades silently change behaviour, so pin versions and re-test before switching.
Models that take or produce more than text: images, audio, video and documents. Many frontier models accept images and PDFs natively, while generation of images, speech and video still often uses dedicated models.
Reading receipts and forms, describing images for accessibility, transcribing meetings, voice assistants, video summarisation and generating marketing images.
Sending images (base64 or URL) with a question for captioning, OCR, chart reading or visual QA. Resolution affects both token cost and accuracy.
Creating or editing images from text prompts with diffusion or native multimodal models; check usage rights, content policies and watermarking.
Models such as Gemini sample frames and audio from video to summarise, answer questions or find timestamps; long videos consume many tokens.
Transcription, translation, speaker separation and audio-native models that reason over speech directly, including real-time voice APIs.
Generating natural speech from text with selectable voices and styles; streaming output keeps voice agents responsive.
Turning audio into text with timestamps, for subtitles, search and voice input; accuracy varies with accent, noise and domain vocabulary.
The APIs, open models and frameworks used to wire images, audio and video into applications. Most follow the same pattern: upload or inline the media, then prompt as usual.
GPT models accept images as input parts in the Responses and Chat APIs; a detail setting trades accuracy for token cost.
OpenAI's Images API, originally built on DALL·E and now also serving the GPT image models, for generating and editing images from prompts.
"Nano Banana" is the nickname for Gemini's native image generation and editing model, reached through the Gemini API; good at consistent characters and targeted edits.
OpenAI's speech recognition model, available through the audio transcription API and as open weights you can run locally.
Open models for vision, speech and image generation (CLIP, Whisper variants, Stable Diffusion) runnable with Transformers or Diffusers.
LangChain messages carry image, audio and file content blocks in a provider-neutral format, so the same chain can switch multimodal models.
Multimodal LLM classes and indexes that store image and text embeddings together for retrieval over mixed documents.
AI coding assistants that read your repository, edit files and run commands. Using them well — clear tasks, good project instructions, reviewing every diff — is now part of the job.
Anthropic's agentic coding tool for the terminal, IDEs and web; reads CLAUDE.md for project rules and supports MCP servers, hooks, skills and sub-agents.
Gemini CLI is Google's open-source terminal agent with a generous free tier, MCP support and project instructions in GEMINI.md.
OpenAI's coding agent, available as an open-source CLI, IDE extension and cloud agent that works in sandboxes and opens pull requests.
An open-source terminal coding agent that works with many model providers, including local models.
A VS Code-based editor built around AI: tab completion, inline edits and an agent mode with project rules files.
A browser-based IDE and hosting platform whose Agent builds and deploys whole apps from a prompt — fast for prototypes.