15. Generative AI, agentic AI and MCP
Answer as submitted
“Yes — RAG, embeddings, Llama-3 QLoRA fine-tuning, agentic workflows and MCP servers.”
Expanded answer
Yes — this is active practice, not theory. I build RAG pipelines (chunking strategy, embeddings, vector search over pgvector/FAISS-style stores, citation-forced prompting, context-window and cost control), run fine-tuning only where it earns its keep (QLoRA adapters on Llama-3-class models for style and format, never to patch missing knowledge), wire agentic workflows through MCP with schema-typed tools and confirmation on anything that writes, and put guardrails around the model: PII redaction before the prompt, prompt-injection checks on retrieved text, tool allow-lists and strict output schemas. Every prompt or model change is measured against a golden set with regression checks, and cost and latency are tracked per request.
| Decision | Typical implementation | Why it is done this way |
|---|---|---|
| Grounding | retrieve → prompt with context → cite the source | An answer the business can verify, instead of text from memory. |
| Retrieval | chunking with overlap, hybrid vector + keyword search | Puts the right passage in context and nothing else. |
| Fine-tuning | QLoRA adapter for style and format | Shapes output without pretending to add knowledge. |
| Agents | MCP tools with typed schemas | The model's reach is exactly the tool contract — no more. |
| Write actions | confirmation step + optimistic concurrency | Autonomy stays bounded where state actually changes. |
| Privacy & safety | PII redaction, injection checks, output schema | Guardrails around the model, not promises inside the prompt. |
| Quality gate | golden set + LLM-as-judge + regression | A prompt change is released with evidence, like any other change. |
Live GenAI delivery workflow proof
The running component below changes its decision/result view through real event binding. Select a step to see the technique, the reasoning behind it, and the measurement that keeps it honest.
Choose a GenAI step
Select a step to inspect the decision, the reasoning and the measured result.
$ embed(query) → vector search (top-k) → prompt with context → answer with citations
The model answers from retrieved context and cites it, instead of answering from memory. That is what makes an answer verifiable and auditable by the business.
top-8 of 12,400 chunks · recall@8 0.94 6 of 6 claims resolve to a source
Why the system is built this way
Source files
Select a file to inspect the proof with syntax highlighting and line numbers. The first file is the code running the component above; the other two are the production shapes of the same decisions.
Acceptance criteria
- Distinguishes retrieval, fine-tuning, agentic tool use, guardrails and evaluation.
- Requires a citation for every claim instead of answering from memory.
- Shows an interactive proof of choosing a GenAI step and reading its measurement.
- Keeps writes behind confirmation and output behind a strict schema.
- Defers pre-training, GPU infrastructure sizing and commercial terms to a later topic.