Retrieval and knowledge (RAG)
Retrieval-augmented generation: when, chunking, embeddings, vector and hybrid search, citations, evaluation.
12 skills · 4 stages each
Skills
- When RAG, and when notFor engineersStart hereChoosing between retrieval, long context, fine-tuning, tools and plain prompting for a knowledge problem, based on corpus size, freshness, cost and accuracy needsneeds: Your first API call110 questions
- Parsing and chunking for retrievalFor engineersTurning PDFs, slides, tables, HTML and scans into clean text and well-sized chunks that carry the metadata retrieval needsneeds: When RAG, and when not110 questions
- Embedding modelsFor engineersChoosing, testing and maintaining the embedding model that turns chunks and queries into vectorsneeds: When RAG, and when not110 questions
- Vector searchFor engineersStoring and querying embeddings in pgvector or a dedicated vector database, with the right index, distance metric and filtersneeds: Embedding models110 questions
- Hybrid search and rerankingFor engineersCombining keyword and vector search, reranking candidates with a second model and enriching chunks with context to raise retrieval qualityneeds: Vector search110 questions
- Query rewriting and routingFor engineersTurning messy user questions into good search queries: rewriting, expanding, decomposing and sending each to the right index or toolneeds: Vector search110 questions
- Grounded answers with citationsFor engineersMaking answers come only from retrieved sources, cite them precisely and say so plainly when the sources do not contain the answerneeds: Hybrid search and reranking110 questions
- Agentic retrievalFor engineersLetting an agent decide what to search, read results, judge them and search again across indexes, files and the webneeds: Query rewriting and routing110 questions
- Evaluating retrievalFor engineersMeasuring retrieval and answer quality separately with labelled questions, retrieval metrics, faithfulness checks and LLM judgesneeds: Grounded answers with citations110 questions
- Securing RAG: permissions, injection and poisoningFor engineersKeeping retrieval inside each user's access rights and defending against injected instructions, poisoned documents and leaks through the indexneeds: Vector search110 questions
- Ingestion pipelines and index freshnessFor engineersKeeping a RAG index in sync with its sources: incremental updates, deletions, deduplication, versions and monitoringneeds: Parsing and chunking for retrieval110 questions
- Retrieval over structured data and graphsFor engineersAnswering questions from databases, spreadsheets and knowledge graphs with text-to-SQL, entity lookups and GraphRAG instead of plain text chunksneeds: Query rewriting and routing110 questions
Scenarios using this domain
Where to study
- Ingestion pipeline (LlamaIndex docs) (opens in a new tab)DocsFree
Shows a document store that hashes documents so unchanged ones are skipped on re-runs.
- Delete records (Pinecone docs) (opens in a new tab)DocsFree
Delete by id, by id prefix or by metadata filter, and what a delete does and does not remove.
- Art. 17 GDPR: Right to erasure (opens in a new tab)StandardFree
The legal text behind erasure requests: when data must be erased and the stated exceptions.
- Change and deletion detection in blob indexing (Azure AI Search) (opens in a new tab)DocsFree
A managed indexer's approach to change tracking and soft-delete markers for removed source files.
- Update and upsert data (Chroma docs) (opens in a new tab)DocsFree
How upsert by id replaces a record, which is the basis of idempotent re-ingestion.
- Deduplicating Training Data Makes Language Models Better (Lee et al.) (opens in a new tab)PaperFree
Shows near-duplicate text is common in large corpora and how exact and fuzzy matching find it.
- MTEB embedding leaderboard (opens in a new tab)ToolFree
Compare embedding models per task and language, and filter to the tasks that resemble your corpus.
- Sentence Transformers documentation (opens in a new tab)DocsFree
Reference for loading open-weight embedding models, encode_query and encode_document, and truncation.
- Matryoshka Representation Learning (opens in a new tab)PaperFree
The paper behind truncatable vectors: why the first dimensions of some embeddings carry most of the signal.
- Vector embeddings guide (OpenAI API docs) (opens in a new tab)DocsFree
A hosted-API view of embeddings: model choice, dimensions parameter and usage.
- MTEB: Massive Text Embedding Benchmark (opens in a new tab)PaperFree
Explains what the benchmark measures and why no single model wins every task.
- Binary and Scalar Embedding Quantization (Hugging Face) (opens in a new tab)ArticleFree
Worked numbers for int8 and binary quantization: size, speed and retained retrieval quality.