AI Hints
Home›NLP Tutorial›Myths and Hard Questions
NLP · Lesson 99 of 106

Hard NLP Questions

With full answers.

⏱ 2 min read▶ Video at 2:50:28🎓 Free
Watch this lesson in the NLP courseWatch on YouTube ↗Full NLP course

Here are some questions which strong candidates often stumble on. Try to answer each one yourself, before you listen.

Hard NLP Questions
From the video: Hard NLP Questions
  • Strong candidates stumble
  • Try each one
  • Then listen

Your RAG bot gives wrong answers. How do you debug it?

Split the problem. First, is the right passage being retrieved? If not, it's a search problem. So look at chunking, embeddings, and hybrid search. If it is retrieved, it's a generation problem, so look at the prompt. Measure each one separately. Never tune everything at once.

Retrieval or generation?split first
Wrong passagefix search
Right passage, wrong answerfix the prompt
One thing at a timemeasure each

How do you reduce an LLM bill by 80 percent?

Layer it. Handle the easy cases with rules, and with small models. Cache repeated answers, and use prompt caching. Shorten your prompts, and retrieve less. Use a smaller model for routing. Batch whatever can wait. And measure quality at each step, so that you know what's been lost.

Rules and small modelseasy cases
Cachingrepeat answers
Shorter contextfewer tokens
Batchwhat can wait

Your classifier is 95 percent accurate. Ship it?

Ask more questions. What's the base rate? If one class is ninety five percent of the data, this model may be doing nothing. Look at precision and recall for each class. What does a mistake cost? Was the test data similar to live data? Accuracy alone is never an answer.

Base rate?could be doing nothing
Per-class scoresprecision and recall
Cost of errorswhich matters?
Same data?train versus live

Summary

Split the problem, and ask what's behind the number. You're ready. Next, your capstone.

Key takeaways
  • Retrieval or generation?
  • Layer to save money
  • Accuracy needs context
Next up: Capstone: Designing Scribe — bringing it all together