179 questions
No questions match those filters.
What is DSPy, and how does it change prompt engineering...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe core idea worth internalizing is the separation of concerns DSPy imposes: your code declares what the task is (a signature like question -> answer, or text -> category) and how it should reason (Predict for a direct call, ChainOfThought for reasoning-then-answer, ReAct for tool-using agents), while the optimizer owns the wording of the actual prompt sent to the model. That’s a meaningful inversion of manual prompt engineering, where the wording and the logic are the same artifact and every change to one risks silently breaking the other.
BootstrapFewShot works by running your program against the training examples, checking which generated reasoning traces actually score well on your metric, and keeping those as the few-shot examples baked into the compiled prompt — effectively bootstrapping good demonstrations from the model’s own successful attempts rather than requiring you to hand-write them. MIPRO goes further and jointly searches over both the instruction text and the example selection, using the metric as the sole judge of quality rather than a human’s intuition about what “sounds right.”
The realistic way to sell this in an interview is honestly, not as magic: DSPy doesn’t eliminate the need for a labeled example set or a well-defined metric — a bad metric will get you a prompt that’s very good at gaming that metric and mediocre at the actual task. What it eliminates is the multi-day manual loop of writing a prompt, testing on ten examples, tweaking wording, testing again — replacing it with a repeatable, automatable process that survives model swaps.