Basis Lab

Answers

Putting a model into service

Getting a trained model in front of people, paying for it, and knowing whether it is any good.

  1. Why does the model return JSON wrapped in extra text when I asked for JSON?A request for JSON does not force the model to return only JSON, so you need to validate the reply and repair it once rather than assume it will parse.
  2. Why do the numbers look good while users keep complaining?Because the score measures a fixed set of cases with a fixed rule, and the users are living through behaviour that the set and the rule never covered.
  3. How do I make the model answer from the documents I give it instead of its own memory?Fence the documents as labelled reference material, put them before the question, tell the model to prefer them over memory, and require a passage number for each claim.
  4. Why does the memory used by a model keep growing as the conversation gets longer?The model's weights do not grow. It keeps a cache of keys and values for every earlier token, so memory rises with conversation length and with how many conversations run at once.
  5. How many legitimate requests should I be willing to block in order to catch the bad ones?Block no more legitimate requests than one prevented harmful answer is worth: the break-even count is the harm cost divided by the refusal cost.
  6. What does a p-value actually tell me?A p-value is the chance of seeing a difference at least as large as yours if the change did nothing; it is not the chance the result was luck or that there is no effect.
  7. My score went up two points — is that a real improvement or just noise?No. At four hundred cases a two point gain is inside the noise, so treat it as no result.
  8. Why bother with a confidence interval when the result is already significant?A significant result only rules out zero; the interval shows how large the effect might be and whether it is worth acting on.
  9. What does the model actually see when I send a prompt?It sees one assembled string: your typed prompt is a small clause near the end of a document that code stitched together from instructions, examples, retrieved passages and earlier turns.
  10. Why does the model pick the wrong tool when two of them sound almost the same?The model only sees the written description, so when two descriptions overlap it cannot tell the tools apart and confidently picks the more familiar reading.
  11. At what point does the conversation history cost more than the model itself?With sixty-four conversations grouped together, reading their history overtakes reading the model at roughly six and a half thousand words per conversation.
  12. How can I tell if a prompt change actually helped or if I just got a lucky answer?Compare two versions on the same written set of cases, before and after, and call a change real only when it beats the wobble of that set.
  13. Why do I still need exact keyword search when I'm searching by meaning?Because meaning matching compresses text into a few hundred numbers and need not keep a rare part number or error code intact; exact keyword matching weights rare strings so heavily it finds them immediately.
  14. Why does a long conversation with a model use so much more memory than a short one?The model keeps a growing summary for every word inside every layer, so a long chat uses memory in proportion to its length, not to the size of its text.
  15. If someone fully jailbreaks the model, what actually stops it from deleting my database?Nothing in the model stops it. What stops it is your code: the delete tool either cannot name your database or cannot delete irreversibly.
  16. Why is writing a long answer slower than reading a prompt of the same length?Reading a prompt happens in one parallel pass, while writing a reply happens one word at a time, so the reply rereads the model for every word.
  17. How do I decide whether a small but significant win is actually worth shipping?Ship only if the chance the gain is real beats the cost of being wrong divided by that cost plus the gain. That bar is rarely five per cent.
  18. Why does one outlier weight wreck 4-bit quantization for the whole layer?A single huge value sets the rounding step for the whole layer, so ordinary weights fall below one step and round to zero.
  19. Can a web page my agent reads make it do something I never asked for?Yes. A fetched web page can contain a sentence aimed at the model, and nothing in the model's view marks it as different from something you wrote yourself.
  20. How do I stop a retrieved document from being read as an instruction?You cannot stop it completely, but fencing each passage in a labelled block, with a line saying it is information to use and not instruction to follow, makes the model far less likely to obey it.
  21. How do I write a safety rule I can actually test, instead of just saying 'be harmless'?Name the action, the cases it covers, the cases it deliberately leaves out and what happens when it fires; then check that two readers label the same twenty borderline requests the same way.
  22. How does a document the model retrieved end up giving it instructions?A retrieved document gives instructions because its text is pasted into the same prompt as your instructions, so the model cannot tell data from command.
  23. What's the difference between a model that refuses because of how it was trained and one that just gets blocked by a filter sitting in front of it?A trained refusal is a habit in the model's weights that an unusual framing can slip past; a filter is separate software that reads the text as data, so no wording reaches it.
  24. How do I tell whether a slow request spent its time waiting in line or actually being worked on?Time a request spent waiting is the total measured where it arrived minus the time anything was actually computing for it; whatever is left was queue.
  25. Why does promising that 99% of requests are fast cost so much more capacity than promising the average is fast?A promise about the slowest requests forces you to keep machines idle so queues never build, while an average promise can be met by making ordinary requests slightly faster.
  26. What do I actually lose by storing a model's weights in 8 bits instead of 16?Half the memory, and twice the speed for anything that was waiting on memory rather than arithmetic, at the cost of coarser stored numbers and a few values that no longer fit the format at all.
  27. What do the scale and zero-point actually do in 4-bit quantization?The scale sets the spacing between the sixteen levels, and the zero-point slides the whole grid so it lines up with the weights you actually have.
  28. Does a benchmark score tell you how good a model really is, or just how it did on those questions?No: a benchmark score is an average over chosen questions and a chosen marking rule, so it describes that test more than the model in general.
  29. Should my evaluation cases be real user queries or ones I write myself?Use real user queries, sampled by behaviour rather than at random, plus a held-out part nobody tunes on. Cases you invent measure what you imagined users ask.
  30. How many cases do I need before the evaluation can even see a small improvement?About four hundred cases per set can see only a six-point move; a two-point improvement needs roughly four thousand two hundred per set.
  31. Why does quantization-aware training use fake quantization instead of just quantizing at the end?Fake quantisation lets training see the rounded weights in the forward pass while still updating the exact weights, so the model learns weights that survive rounding instead of being rounded only after training.
  32. Why doesn't pruning half the weights make the model twice as fast?Because the zeros stay in the matrix: they are still stored and still multiplied, so the model is the same size and the same speed as before.
  33. Why can't I A/B test a change where users can affect each other?A split assumes one person's result does not depend on what version others got. When users compete for the same jobs or stock, the control group is changed by the treatment, so the comparison is biased.
  34. Why does detecting a small improvement take so many more users?Because the noise you are trying to see past shrinks only with the square root of the sample, so halving the change you want to spot takes four times the people.
  35. What's the difference between searching and just filtering a database?A filter returns every row that matches a condition you stated; a search returns a short ranked list of things that might answer you, so ordering, not matching, is the job.
  36. Why does the model have to be asked again after the tool hands back its result?Because a tool call is a request, not an answer. The result must be added to the conversation and the model called again to read it and reply.
  37. How do I know if a failed task was the model's fault or the tool's?You cannot tell from the reply alone: grade the final state of the data, log what each tool actually returned, and assign every failure to the model, a tool, or your own loop code.
  38. Can I judge my model's accuracy from the labels that come back first?No. Early labels are the failures, not a random sample, so an early accuracy figure is biased and usually makes the model look worse than it is.
  39. How small can my test set be and still catch a regression before a user does?About sixty auto-checked cases, run in two minutes on every change, blocking only on outright failures such as a case that used to pass now failing, never on a fall in the overall score.

The other subjects

If you want the whole thing

Behind every answer here is a course that works through its subject from the beginning, with problems under each idea and a reason rather than a tick when one is marked. An answer settles the question you came with; the course is what makes the next one easier.

The libraryAsk for a course