Building with LLMs
Prompts, context, RAG, and fine-tuning: the main ways people put LLMs to work.
Prompts and context
- What is prompt engineering? A gentle guide to clear promptsWhat prompt engineering means, the basic techniques the official guides share, a real test of a vague and a specific prompt, and where prompting falls short.
- What is context engineering? Choosing what an LLM seesContext engineering means deciding what an LLM sees at every step. Where the term came from, why longer context can hurt, and the techniques agents use.
- What is prompt injection? How hidden text takes over an LLMPrompt injection gets an LLM to obey instructions hidden in the text it reads. Where the name came from, a small model demo, and what defenses can and can't do.
RAG and vector search
- What is RAG? A plain guide to retrieval-augmented generationWhat RAG means, why language models need to look things up before they answer, how search and generation fit together, and a small example you can run.
- What is a vector database? How AI apps find similar thingsWhat a vector database is, how ANN and HNSW find the closest embeddings fast, how it differs from a regular database, and when plain numpy is enough.
- What is semantic search? A plain guide to search by meaningSemantic search ranks results by how close their meaning is to a query. How it differs from keyword search and BM25, and where hybrid search and rerankers fit.
Fine-tuning and training
- What is fine-tuning? Adapting a trained model to your taskFine-tuning trains an existing model a little more on your own data. How it works, why LoRA makes it cheap, and when a prompt or RAG is the better choice.
- What is RLHF? How human preferences shape a language modelRLHF tunes a language model on the answers people prefer. The three steps, why it was needed, how DPO and AI feedback changed it, and where it falls short.