Dataset Diversity: Fixing Repetitive Synthetic Generations
Cranking temperature does not make synthetic data diverse. Injecting randomness into the prompt does. Here is the technique, with code.
Deep explorations of agentic AI, RAG architectures, and production engineering.
64 articles
Cranking temperature does not make synthetic data diverse. Injecting randomness into the prompt does. Here is the technique, with code.
Most agents fail for boring, fixable reasons. Here are the practices that make an agent reliable: fewer LLM calls, tools that explain themselves, and a debugging ladder to climb when it misbehaves.
When retrieval fails in your domain or language, you can prompt a large model to generate training data for a custom retriever, matching thousands of hand-labels for tens of dollars.
You can prompt a model to produce labeled examples on demand: test fixtures, eval sets, cold-start training data. Here is how to do it well and where the sharp edges are.
Your few-shot examples carry hidden biases. The distribution and order of them can nudge the model toward a label before it reads the input. Here is how to spot it and fix it.
Models hallucinate because they are built to sound coherent, not to be right. Here are three prompt-level moves that reduce made-up answers, plus where prompting stops working.
Prompt injection, prompt leaking, and jailbreaking are three different attacks with three different fixes. Here is how each one works and what defence actually holds.
Graph prompting feeds a model structure, not just prose: entities as nodes, relationships as edges. Here is what the idea is, where it comes from, and when it pays off.
smolagents ships two agent classes that act in completely different ways: one writes Python, one emits structured JSON. Here is how each works, what each is good and bad at, and when to reach for which.