Step 2 of 6 in Build AI Apps and Agents.
Technical AIintermediateVideo + quiz
Ask AI About Your Own Documents (RAG)
For developers and data analysts who already call language model APIs.
Watch the first lesson freeWelcome · 3 minSign in to watch one lesson from this course free.
What you will be able to do
Chunk documents by tokens and embed them with a suitable modelStore document vectors with version metadata in a pgvector storeRetrieve with filters so answers use the right document versionWrite a grounded prompt that returns checked citationsBuild a thirty question evaluation set and diagnose failing answers from tracesMake one measured improvement, such as hybrid search or reranking
Skills you will gain
- Chunking Strategy
- Text Embeddings
- Vector Indexing
- pgvector
- Similarity Search
- Metadata Filtering
- Prompt Assembly
- Reranking
- RAG Evaluation
- Faithfulness Scoring
- LangChain Retrieval
- LlamaIndex Query Engines
About this course
For developers and data analysts who already call language model APIs. Build a retrieval augmented generation pipeline step by step over a real document set: token based chunking, embeddings, a pgvector store with version metadata, filtered retrieval, a grounded prompt with checked citations, a thirty question evaluation set, trace based diagnosis, and one measured improvement such as hybrid search or reranking.
Technical AI
Curriculum
Requirements
Python, or SQL if you prefer
How to call a model API from code
The basics of running a Postgres database
Python 3 and pip
Postgres with the pgvector extension
Node.js 20 or later for the hands on lab
An OpenAI API key, for embeddings
An Anthropic API key, for the answers in the lessons
A free Groq key for the lab, no card needed
Common questions
Do I need a dedicated vector database, or can I use pgvector inside Postgres I already run?
For a small-to-mid corpus, pgvector, an open-source Postgres extension supporting vectors of up to 16,000 dimensions, is usually the lowest-friction starting point if your team already operates Postgres. A dedicated system like Pinecone or Weaviate earns its cost once you need index types or scale that pgvector cannot offer.
Will RAG stop the model from hallucinating?
No. Even Anthropic's own tests, which combined contextual embeddings, lexical matching, and a reranking step, reduced their measured retrieval failure rate by 67 percent rather than to zero, and explicitly noted this did not eliminate retrieval failures entirely. RAG reduces ungrounded answers; it does not guarantee they cannot happen, which is why this course covers evaluation as its own module.
How do I pick a chunk size before I have real usage data?
Start with fixed-size chunking in the 128 to 1024 token range that Pinecone recommends, with a common default around 512 tokens and 10 to 15 percent overlap. Treat this as a starting point to test against your own documents and queries, not a fixed rule.
How is a RAG answer's faithfulness actually measured?
The Ragas faithfulness metric breaks a generated response into individual claims and checks whether each one can be inferred from the retrieved context, then scores the response as the ratio of supported claims to total claims. A score of 1 means every claim in the answer is backed by what was retrieved.
What is the difference between a two-step and an agentic RAG pipeline?
In two-step RAG, retrieval always runs once before generation, which is predictable and is the default architecture most applications use. In agentic RAG, an agent reasons step by step and decides when and how to retrieve during the interaction, which is more flexible but slower and harder to test.
What you walk away with
A Yallo AI Academy certificate of completion, issued when every lesson is complete and the final assessment is passed at 70% or aboveA public verification page, so a stranger can check the certificate without asking you for a filePDF download, and a one-click share to your LinkedIn profile
Yallo AI Academy certifies completion of
Ask AI About Your Own Documents (RAG)