Picture a bank in Dhaka. We will call it Bank K; it is fictional, but its problem is real. The IT team has picked a good language model and built a helpdesk chatbot for the staff. On the first morning an officer types: "What is the new daily cash-withdrawal limit?" The answer arrives in a second, in smooth and polite English, and it is wrong. The model has never seen Bank K's circular. It knows how to write, and it does not know this bank.
What can the team do? Four things, and this chapter is about those four. They can change the words they give the model: a clearer instruction, a few solved examples, a request to show its working. They can change the model itself, training it a little more on the bank's own examples. They can teach it which answers people prefer, so that it is polite, careful and honest by habit.
Or they can leave the model alone and let it look the answer up in the bank's documents before it replies. The names are prompting, fine-tuning (with LoRA), RLHF, and RAG. Each one is cheap or costly, quick or slow, good at one job and useless at another, and knowing which is which is the real skill.
By the end of this chapter you will be able to write a prompt with roles, examples and step-by-step reasoning, and say what each one does to the model. You will explain what fine-tuning changes and work out how many parameters LoRA trains. You will walk through RLHF, with its reward model and its KL penalty, and say how DPO shortens the road.
You will rank documents by keyword and by meaning, explain what a vector database and an approximate nearest-neighbour index do, and build a RAG pipeline by hand: chunk, embed, store, retrieve, augment, generate. You will choose between prompting, RAG and fine-tuning for a real need, and read a small knowledge graph written as triples.