Vibe Engines
YouTube
← All decks

LLM Engineering

Loading your review…

All 9 cards in this deck

Decoding, RAG, evals, and cost — building reliable products on top of models. Answer each question before you open it — then run the review above, which schedules every card with spaced repetition so it comes back right before you would forget it.

  1. What does temperature do in decoding?

    Divides the logits before softmax — low sharpens (safe/repetitive), high flattens (diverse/risky); near 0 is greedy.

  2. Top-k vs top-p (nucleus) sampling?

    Top-k keeps the k highest-probability tokens; top-p keeps the smallest set whose probability sums to p — top-p adapts to the distribution.

  3. What is chunking in RAG and why it matters?

    Splitting documents before embedding; chunk size/overlap decide retrieval quality — too big dilutes relevance, too small loses context.

  4. What does cosine similarity measure?

    Alignment of two vectors ignoring length — 1 identical, 0 orthogonal, −1 opposite; the core of embedding search.

  5. How is LLM API cost per call computed?

    input_tokens/1M × input_price + output_tokens/1M × output_price; output usually costs 3–5× input.

  6. What is LLM-as-a-judge?

    Using a strong model with a clear rubric to score outputs — scalable evaluation, but watch position, verbosity, and self-preference bias.

  7. What is cross-entropy loss?

    The negative log-probability the model gave the true class, −log(p[target]); near 0 when confident-right, huge when confident-wrong.

  8. Why does conversation history dominate agent cost?

    Each turn re-sends the whole history as input, so tokens grow super-linearly — trimming/summarizing history is often the biggest cost lever.

  9. What does IDF reward in TF-IDF?

    IDF (log N/df) rewards terms rare across the corpus and discounts words that appear everywhere.