
This trailer gives a short look at the whole course: 60 lessons in 12 modules, about 19 hours in total, and a final project on a fictional warehouse handbook that ends with a sealed test opened once. It walks through what you will practice, from preparing documents and building context you can check, through retrieval, memory, tools, long tasks and safety, to measuring changes, reading research and building a full system. The clips come from the course's own lesson recordings. It is an overview, so there is nothing to build along with it.
Music credits:
Lesion X - Biohazard is under a YouTube Free license.
https://www.youtube.com/channel/UCwMU7NiWvoN6qPp1uMh3YAA
Music powered by BreakingCopyright: https://youtu.be/vDNi_P_B3ow
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
This video explains, before you invest the time, what the course expects from you. It builds on Context Engineering, Part I, and it is written for people who write code or are ready to learn as they go. It also covers the setup (a Linux shell, Python 3.12 and Codex CLI with your own account, plus a paid embedding service in a few lessons that also comes with saved responses) and what makes the course demanding: real runs under budgets, test sets opened once, and research papers you read and test yourself.
Music credits:
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You create three short documents for a fictional business, Northstar Office, and ask Codex a customer question that links an order to its product and its delivery rule. You check each part of the answer, and the source line it cites, against the source text. A second question asks for a calendar arrival date, which shows why a delivery rule that starts "after shipment" cannot answer it for an order that has only been packed. An exercise with a fictional workshop lets you repeat the comparison yourself; the lesson assumes Context Engineering, Part I.
Sources:
- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/config-file/config-basic
- https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You set up a small Python project with uv and read what pyproject.toml, uv.lock, .python-version and the .venv folder each do. Codex helps you write a one-line program, and you run it through uv and check the exact output and Python version. You then copy only the program and the three settings files into a new folder and rebuild the environment there to confirm the result is the same. The lesson was recorded on Linux with Python 3.12.3 and uv 0.12.15, and it assumes no programming knowledge beyond what it explains.
Sources:
- https://docs.astral.sh/uv/getting-started/installation/
- https://docs.astral.sh/uv/guides/projects/
- https://astral.sh/blog/uv
- https://docs.python.org/3/faq/general.html
- https://www.python.org/community/logos/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You read a short Python program line by line: it reads a document, takes the first line as the title, and counts the characters in the whole text. Before each run you predict the output, then compare your prediction with the real result. Changing the input document shows how the outputs respond, and a change that keeps the character count but reverses an instruction shows what a count cannot tell you. The practice files use a fictional workshop check-in document.
Sources:
- https://docs.python.org/3.12/library/pathlib.html
- https://docs.python.org/3.12/library/stdtypes.html#str.splitlines
- https://docs.python.org/3.12/library/functions.html#len
- https://peps.python.org/pep-0428/
- https://www.python.org/community/logos/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You read a small JSON file of records that each have an identifier, a kind and, usually, content. You follow a loop and two conditions that print matching records and warn about a record with no content field, predicting each result before you run it. Changing the requested kind, and then giving one record an empty string, shows that a presence check does not tell you whether a value is useful. The lesson keeps missing information visible instead of guessing it.
Sources:
- https://www.json.org/json-en.html
- https://www.rfc-editor.org/rfc/rfc8259
- https://docs.python.org/3.12/library/json.html
- https://docs.python.org/3.12/tutorial/controlflow.html
- https://docs.python.org/3.12/library/stdtypes.html#mapping-types-dict
- https://docs.python.org/3.12/whatsnew/2.6.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You define a function that looks up a record by its identifier and returns either the record or an error message. You call it four ways: with an identifier that exists, one that does not, a number instead of text, and an empty string, and you read what comes back each time. The lesson separates returning a value from printing it, and a missing record from an invalid request. In the exercise you reuse the same function on a fictional workshop collection.
Sources:
- https://docs.python.org/3.12/tutorial/controlflow.html#defining-functions
- https://docs.python.org/3.12/library/functions.html#isinstance
- https://docs.python.org/3.12/library/json.html#json.dumps
- https://docs.python.org/3.12/tutorial/errors.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You save a Git baseline of a small project, deliberately change one comparison in the lookup function, and read the diff to see exactly what changed. You then restore only that file from the saved commit and run the program again to confirm the original result returns. The lesson explains the working tree, the staging area and commits, and why a clean status is not proof that the code works. It uses a local repository only and was recorded with Git 2.43.0.
Sources:
- https://git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git
- https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F
- https://git-scm.com/install/
- https://git-scm.com/install/linux
- https://git-scm.com/docs/git-init/2.43.0
- https://git-scm.com/docs/git-status/2.43.0
- https://git-scm.com/docs/git-config
- https://git-scm.com/docs/git-diff
- https://git-scm.com/docs/git-restore
- https://git-scm.com/docs/gitignore
- https://git-scm.com/community/logos
Git Logo by Jason Long, CC BY 3.0: https://creativecommons.org/licenses/by/3.0/ . Used unchanged to identify Git.
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You write a small set of development questions and a fixed rubric before asking the system anything, and you reserve two separate questions for a later test. A deliberately simple baseline supplies only the first record as context, and you record which questions pass and why. In the example, one question fails because the needed record was never supplied, while a question whose fact is not in any record is correctly answered with insufficient information. You finish with a results table that keeps the failure as evidence instead of reducing it to one accuracy number.
Sources:
- https://scikit-learn.org/stable/common_pitfalls.html
- https://scikit-learn.org/stable/modules/cross_validation.html
- https://inria.github.io/scikit-learn-mooc/python_scripts/cross_validation_train_test.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a small catalog of policy documents that records an owner, a version, an approval status, a validity period and the roles allowed to read each one, along with two practice identities set by the code. A Python filter selects the permitted, approved, currently valid sources before the model sees anything, and you compare the packets built for a public user and a staff user for the same question. A sentence such as "I am staff" in the question does not change the identity, and you check why. All rules and dates are synthetic, and the lesson makes no claim to be a production authentication system.
Sources:
- https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html
- https://docs.python.org/3.12/tutorial/controlflow.html
- https://docs.python.org/3.12/tutorial/datastructures.html
- https://docs.python.org/3.12/library/stdtypes.html#comparisons
- https://www.w3.org/TR/prov-overview/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You extract text from a real teaching PDF with pypdf 6.19.0 and compare the result with the original pages. The table's column labels are an image, so the extracted text has numbers with no names; you restore the labels by hand in a separate reviewed file that keeps page references, while the raw extraction stays unchanged. An image-only scan is left explicitly unprocessed, because the lesson does not include OCR. The exercise repeats the process on a workshop guide.
Sources:
- https://pypdf.readthedocs.io/en/6.19.0/user/extract-text.html
- https://pypdf.readthedocs.io/en/stable/meta/history.html
- https://pypdf.readthedocs.io/en/6.19.0/user/installation.html
- https://pypdf.readthedocs.io/en/stable/
- https://docs.python.org/3.12/library/functions.html#enumerate
- https://docs.astral.sh/uv/concepts/projects/dependencies/
- https://blog.adobe.com/en/publish/2018/06/14/evolution-digital-document-celebrating-adobe-acrobats-25th-anniversary
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You split a short reviewed guide two ways: into fixed 64-character windows, with and without overlap, and into paragraph chunks that carry the guide's heading. Every chunk gets a saved identifier that traces back to a source revision. The same question is then answered from three evidence packets: one paragraph alone, the same paragraph with its heading, and that paragraph with its neighbor, so you can see which piece supplies the category, the duration and the start date. It is a small controlled comparison, not a recommendation for a chunk size.
Sources:
- https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-chunk-documents
- https://docs.python.org/3.12/library/stdtypes.html#str.split
- https://docs.python.org/3.12/tutorial/introduction.html#strings
- https://docs.python.org/3.12/tutorial/controlflow.html#the-range-function
- https://docs.python.org/3.12/tutorial/inputoutput.html#formatted-string-literals
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You assemble a task packet as a JSON file with five separate sections: instructions, question, evidence, an example and constraints. The code selects the evidence from permitted, current sources, and each evidence record keeps its source, version and location. You run one question the policy can answer and one it cannot, and check that the second answer states the gap and does not borrow facts from the unrelated format example. A workshop cancellation exercise lets you repeat the work.
Sources:
- https://developers.openai.com/api/docs/guides/prompt-engineering
- https://docs.python.org/3.12/library/json.html
- https://docs.python.org/3.12/library/stdtypes.html#mapping-types-dict
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You compare giving the complete small workshop guide with giving only a passage found by a literal text search, and you inspect exactly what each route supplies. You investigate zero-hit searches: a query for "drop out" misses because the guide says "cancel", while a query about refund timing finds nothing because the guide never states one. The lesson shows how to choose the next step: try a better query, read more permitted context, ask the user for a missing detail, or state the limit. The transfer exercise uses a meeting-room guide.
Sources:
- https://docs.python.org/3.12/library/stdtypes.html#str.lower
- https://docs.python.org/3.12/library/stdtypes.html#str.split
- https://docs.python.org/3.12/library/stdtypes.html#common-sequence-operations
- https://docs.python.org/3.12/library/functions.html#enumerate
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You compare an interactive Codex session with a recorded codex exec run that saves the selected evidence, the full packet, the prompt, the event stream, the answer, the process status, the elapsed time and the reported usage. You run two fresh attempts on the same case, then trace two failures to their source: a search that found nothing because of wording, and a question whose answer is not in the guide. The lesson keeps process status, source support and answer quality as separate judgments. A meeting-room guide is used for the module exercise.
Sources:
- https://learn.chatgpt.com/docs/non-interactive-mode
- https://learn.chatgpt.com/docs/developer-commands?surface=cli
- https://docs.python.org/3.12/library/subprocess.html#subprocess.run
- https://docs.python.org/3.12/library/time.html#time.perf_counter
- https://docs.python.org/3.12/library/sys.html#sys.argv
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a word-search index over permitted records with bm25s 0.3.11 and read how BM25 uses common and rare terms to rank passages. You run four searches against it: a product code, two words that are not next to each other, a query that ties two records, and a paraphrase that shares no words with the source. The results show what word search does well, such as keeping the code AX17 separate from AX170, and where it fails, such as finding nothing for "send it back" or treating USB-C and USB-A as the same term under the default tokenizer. Retrieval here makes no model calls.
Sources:
- https://pypi.org/project/bm25s/0.3.11/
- https://github.com/xhluca/bm25s
- https://bm25s.github.io/
- https://arxiv.org/abs/2407.03618
- https://www.staff.city.ac.uk/~sbrp622/papers/foundations_bm25_review.pdf
- https://docs.astral.sh/uv/reference/settings/#link-mode
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You send one short public passage to a hosted embedding model through an API and inspect what comes back: a list of 64 numbers and the reported token usage. You first use a deliberately invalid key to see how a rejected request differs from a successful one, and a local two-attempt guard stops a third call before it is sent. The lesson explains the client, endpoint, key, JSON request and HTTP response, and introduces Alibaba Model Studio and HTTPX 0.28.1. A recorded response is supplied so you can finish the exercise offline; live requests need your own Model Studio account and key, and usage may be billed.
Sources:
- https://www.alibabacloud.com/help/en/model-studio/text-embedding-synchronous-api
- https://www.alibabacloud.com/help/en/model-studio/base-url
- https://www.alibabacloud.com/help/en/model-studio/get-api-key
- https://www.alibabacloud.com/help/en/model-studio/model-pricing
- https://www.alibabacloud.com/help/en/model-studio/new-free-quota
- https://www.alibabagroup.com/en-US/document-1725671468706037760
- https://www.python-httpx.org/
- https://github.com/encode/httpx/releases/tag/0.28.1
- https://www.encode.io/reports/september-2019
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You learn what an embedding is (an ordered list of numbers), how cosine similarity compares two of them, and how to rank source-linked passages with NumPy 2.5.3. Using the permitted records and one saved embedding response, you compare semantic search with BM25 on three queries. Alternate wording finds the return policy that word search misses, a near-identical product code ranks the wrong product first, and a claim that conflicts with the policy still retrieves it. A similarity score is not a probability or proof of support, and the saved responses let you inspect every result without a new request.
Sources:
- https://numpy.org/about/
- https://numpy.org/press-kit/
- https://pypi.org/pypi/numpy/2.5.3/json
- https://numpy.org/doc/stable/reference/generated/numpy.asarray.html
- https://numpy.org/doc/stable/reference/generated/numpy.dot.html
- https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html
- https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.cosine_similarity.html
- https://www.alibabacloud.com/help/en/model-studio/text-embedding-synchronous-api
- https://qwenlm.github.io/blog/qwen3-embedding/
- https://bm25s.github.io/
- https://www.python-httpx.org/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You combine a word-search ranking and a semantic ranking with Reciprocal Rank Fusion, which adds rank-based contributions instead of mixing raw scores. On four saved cases you measure how much required evidence reaches the final list, then change the candidate window and the output size to see where evidence is lost. One setting moves the correct product to first place, another ties and puts the wrong one first, and a two-source question misses the return policy until both limits are widened. The exercises reuse saved embedding results and make no new embedding requests.
Sources:
- Original RRF paper, Cormack, Clarke and Büttcher, 2009: https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf
- Elasticsearch RRF reference: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reciprocal-rank-fusion
- An Analysis of Fusion Functions for Hybrid Retrieval: https://arxiv.org/abs/2210.11934
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You use qwen3-rerank through Alibaba Cloud Model Studio to re-score a short list of candidate passages, map the returned input indices back to stable source records, and compare the selected evidence with and without re-ranking. Fresh answers are then run on both packets and inspected against the sources. In the recorded experiment the re-ranker leaves the two selected records unchanged, so the extra request adds time and usage without improving the evidence or the answers, and the lesson uses this to separate a passage that was never supplied from one that is dropped at the cutoff. Supplied results allow an offline inspection.
Sources:
- Qwen family introduction, June 5, 2025: https://qwenlm.github.io/blog/qwen3-embedding/
- Qwen model repository: https://github.com/QwenLM/Qwen3-Embedding
- Model Studio rerank API: https://www.alibabacloud.com/help/en/model-studio/text-rerank-api
- Model Studio base URLs: https://www.alibabacloud.com/help/en/model-studio/base-url
- Hosted reranking overview: https://www.alibabacloud.com/help/en/model-studio/rerank
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You compare handing over the complete small permitted source with word search, semantic search and fused search on four question types: an exact code, alternative wording, a combined question and an overview. You measure which required sources each method returns and how much source text it uses, then write down and fingerprint a choice before looking at new questions. Fresh answers to the new questions are inspected against the sources, including a case where word search turns out to be shorter than the chosen route. The lesson treats the whole-source choice as sufficient only for this tiny collection, not as a general rule.
Sources:
- Anthropic: Contextual Retrieval: https://www.anthropic.com/engineering/contextual-retrieval
- Anthropic: Effective context engineering for AI agents: https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
- BM25S project: https://bm25s.github.io/
- Alibaba Cloud synchronous embedding API: https://www.alibabacloud.com/help/en/model-studio/text-embedding-synchronous-api
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You follow a dependent question through three fixed lookups: from a product code to its family, from that family and an error to an issue record, and from the issue to a procedure. Each query records where its values came from, each chain has a lookup budget, and the trace keeps every record it found. Four cases show a complete chain, two chains that stop because the budget ran out, and one where the last search runs and finds no permitted procedure. You then check actual answers against the saved trace, including one that gives the wrong reason for stopping.
Sources:
- Trivedi et al., ACL2023, Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions: https://aclanthology.org/2023.acl-long.557/
- Anthropic, Effective context engineering: https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
- Anthropic, Building effective agents: https://www.anthropic.com/engineering/building-effective-agents
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You restore missing context to chunks before indexing by copying exact source excerpts (the document title, the applicability sentence and the section heading) in front of each chunk body, which stays unchanged. A validator rejects three bad proposals before anything is indexed: an invented guarantee, a sentence from another product's document, and a reference to a staff-only source. You build a plain and a contextual BM25 index over the same six chunks, compare three queries, and read the answers each packet produced. The method is a deterministic teaching variant, not the full published Contextual Retrieval pipeline.
Sources:
- Anthropic, Introducing Contextual Retrieval, September 19, 2024: https://www.anthropic.com/engineering/contextual-retrieval
- BM25S official repository: https://github.com/xhluca/bm25s
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a small directed graph with NetworkX 3.7 from permitted product guides, where products, issues and procedures are nodes and every node and edge keeps its source evidence. You follow a forward route, a reverse route and an unrelated route, and see how direction and product-specific identifiers decide which paths exist. A copy with one wrong edge still produces a path and draws normally in the viewer, but an audit against the current sources rejects it. The graph is a narrow authored example, not a full GraphRAG system.
Sources:
- NetworkX overview and history: https://networkx.org/documentation/networkx-2.0/
- Aric Hagberg’s first public release announcement, April 12, 2005: https://mail.python.org/pipermail/python-announce-list/2005-April/003924.html
- Current installation documentation: https://networkx.org/documentation/stable/install.html
- DiGraph: https://networkx.org/documentation/stable/reference/classes/digraph.html
- Shortest path: https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.generic.shortest_path.html
- Node-link serialization: https://networkx.org/documentation/stable/reference/readwrite/generated/networkx.readwrite.json_graph.node_link_data.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You compare four ways of supplying evidence for a broad question and a detail question: BM25 retrieval, a source-seeded graph neighborhood, group reports built from connected components, and the whole collection. The group reports take three model calls to prepare, and you weigh their coverage against that extra work and against simpler routes. You then change one source and revoke access in separate copies to see which reports become stale and must be rebuilt. It is an educational adaptation of GraphRAG principles, not a reproduction of the Microsoft package, and the collection is small enough to fit directly in context.
Sources:
- Original GraphRAG paper: https://arxiv.org/abs/2404.16130
- Official repository: https://github.com/microsoft/graphrag
- Index overview: https://microsoft.github.io/graphrag/index/overview/
- Index dataflow: https://microsoft.github.io/graphrag/index/default_dataflow/
- Global search: https://microsoft.github.io/graphrag/query/global_search/
- Local search: https://microsoft.github.io/graphrag/query/local_search/
- CLI update command: https://microsoft.github.io/graphrag/cli/
- NetworkX connected components: https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.components.connected_components.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You move one fixed evidence document to the start, middle or end of packets that hold 0, 64 or 400 fixed-order distractors, add a control with no evidence, and run each condition twice in fresh sessions. A grading script flags missing conditions, wrong citations and borrowed near-miss details, and you read every answer yourself. In the recorded runs, one repeat wrongly reports the evidence as not found even though it is in the packet, which shows why a passing row is only a screen. The lesson cites Lost in the Middle and Context Rot as research on other models and tasks, not as predictions for your own.
Sources:
- Lost in the Middle: How Language Models Use Long Contexts: https://aclanthology.org/2024.tacl-1.9/
- Context Rot: How Increasing Input Tokens Impacts LLM Performance: https://www.trychroma.com/research/context-rot
- concurrent.futures: https://docs.python.org/3/library/concurrent.futures.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a selector that ranks passages or whole documents with BM25 weighted by source type, removes near-duplicates by word overlap, and fills a token budget greedily while recording why each candidate was skipped. Before any model runs, you check which required facts each of five packets keeps. In the recorded answers, the packets that lack the business-day rule give an unsupported calendar-day deadline, while the two packets with full coverage give the supported date. Token counts use the tiktoken o200k_base encoding as a stated estimate and are compared with the usage each run reports.
Sources:
- tiktoken: https://github.com/openai/tiktoken
- bm25s: https://github.com/xhluca/bm25s
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You shorten one notice of about 400 words four ways: truncating it to the first 120 words, extracting high-signal sentences, a plain model summary, and a summary with an explicit keep-list. Before shortening, you write a list of eight critical details and check each version against it. A follow-up question about a specific customer then shows what each loss does to the answer. The lesson also shows the limits of the text-pattern checks, which can miss a curly apostrophe or an exception that has disappeared.
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You write a source-linked handoff file for a synthetic workshop booking that records the goal, constraints, decision, evidence, completed checks, an unresolved condition and a rejected option. You then continue the task two ways: after the Codex CLI's compact command, with an eight-field probe answered without file reads, and in a new conversation that reads the handoff and its sources again. The lesson separates what a conversation recalls from what it recovers by rereading files, and it keeps the unconfirmed prerequisite and the superseded terms from turning into a false confirmation.
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build two application caches, one for numeric text representations and one for ranked source identifiers, and you expose a deliberately wrong cache keyed only by the question, which returns an old deadline and another user's restricted notice. You then test the checked version against a source revision, user isolation, a revoked permission and a changed encoder setting, confirming that the returned evidence stays correct and not only that work is reused. Three fresh answer runs use packets saved from the original, revised and public-only checkpoints. The lesson keeps these caches separate from provider prompt caching.
Sources:
- OpenAI: Prompt caching: https://developers.openai.com/api/docs/guides/prompt-caching
- Qdrant: Multitenancy: https://qdrant.tech/documentation/manage-data/multitenancy/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You classify statements as supported facts, stated preferences, dated events, pending task state or changing information, and decide what to save as persistent memory, keep with the task, retrieve again, or discard. A small Python program reviews the model's proposals against the original sources, the owner and a supplied admission policy before anything is written, and it rejects an unsupported assistant guess even when it is relabeled as persistent. You keep another user's records separate and check what a fresh conversation can accurately continue from the saved memory, the task state and a newly read source.
Sources:
- LangChain memory overview: https://docs.langchain.com/oss/python/concepts/memory
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You move reviewed memory records into a SQLite table and learn the difference between SQL, the language, and SQLite, the engine. Records are written with parameterized statements, looked up by owner and identifier together, and checked against the original snapshot. A duplicate key triggers a rollback that also removes the earlier trial row, and a lookup for a record that does not exist returns nothing instead of another user's preference. The lesson notes that the synthetic owner selector is not authentication.
Sources:
- https://docs.python.org/3.12/library/sqlite3.html
- https://www.sqlite.org/lang_createtable.html
- https://www.sqlite.org/lang_select.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You store policy assertions in a history table with two timestamps, when a change takes effect and when the store learned about it, and every query states which time and which knowledge cutoff it uses. You ask past, announced-but-not-yet-effective, changed, earlier-knowledge and exact-boundary questions against the same data. When two sources give different values for the same effective start, the query returns a conflict and asks for source review instead of picking the later recording. The rule is a teaching policy for complete replacements, not a full bitemporal database.
Sources:
- https://www.sqlite.org/lang_select.html
- https://www.sqlite.org/lang_transaction.html
- https://docs.python.org/3.12/library/datetime.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You apply four reviewed lifecycle operations to a current-serving memory store: merge an exact duplicate, correct a fact, delete a preference, and let a temporary instruction expire. First you reproduce a failure in which deleting only the primary row leaves the preference in a search table, a cached bundle and a saved summary. The complete change then updates all four routes in one SQLite transaction, and you check each route and the other user's records. The lesson covers removal from the serving paths only, not erasure from backups or transcripts.
Sources:
- https://www.sqlite.org/lang_transaction.html
- https://www.sqlite.org/lang_delete.html
- https://www.sqlite.org/pragma.html#pragma_secure_delete
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You replay four reviewed synthetic conversations through a JSON-file store and a SQLite store and ask questions at checkpoints, including an explicit update, an unresolved contradiction, its resolution, a withdrawn preference and a second user's separate memory. Each answer comes from a fresh conversation that sees only its saved evidence packet, and you compare the stored state, the retrieved packet and the answer to tell writing, retrieval and use failures apart. Four injected faults check that the evaluator names the right failure. The lesson is a small fixture, not a measure of automatic extraction or general memory accuracy.
Sources:
- https://arxiv.org/abs/2410.10813v2
- https://github.com/xiaowu0162/LongMemEval
- https://docs.python.org/3/library/json.html
- https://docs.python.org/3/library/sqlite3.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You separate three responsibilities in a small workflow: standing project instructions, a reusable Skill that packages the search procedure, and a deterministic Python lookup that does the exact matching. You run the lookup directly, install the Skill, and run two tasks with a coding agent: one loan period, and a workshop visit whose pickup window and return location are found while the same-day extension is correctly left unknown. Saved traces and an independent claim checker show what the agent actually called and whether its answer matches. A three-query limit written in the Skill is guidance, not a security control.
Sources:
- https://learn.chatgpt.com/docs/build-skills.md
- https://learn.chatgpt.com/docs/agent-configuration/agents-md.md
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You wrap the unchanged search function from the previous lesson in a local MCP server built with the official Python SDK 2.2.0, then inspect what a client discovers, sends and receives over standard input and output. A probe client shows that the tool's result equals the direct Python result, that a query with no match is a valid result, and that an empty query returns a tool error. You then connect Codex, run one instructed call, and check the trace, the payload and the answer separately. Remote hosting and authentication are outside the lesson.
Sources:
- https://py.sdk.modelcontextprotocol.io/
- https://py.sdk.modelcontextprotocol.io/servers/tools/
- https://py.sdk.modelcontextprotocol.io/client/
- https://py.sdk.modelcontextprotocol.io/client/transports/
- https://py.sdk.modelcontextprotocol.io/migration/
- https://learn.chatgpt.com/docs/extend/mcp
- https://modelcontextprotocol.io/docs/develop/build-server
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You define typed input and output for the search tool with Pydantic 2.13.5: an equipment-code pattern, a limit from one to three and an offset, with unexpected fields and wrong types rejected. Each page returns source-linked records, a total and a next offset, and a validator rejects a page that hides remaining records. Through a real MCP connection you send invalid requests, walk all the pages, and watch an agent follow the continuation to collect all five policies. A valid search with no matches is a successful empty result, not an error.
Sources:
- https://github.com/modelcontextprotocol/python-sdk/blob/main/docs/servers/structured-output.md
- https://docs.pydantic.dev/latest/concepts/strict_mode/
- https://docs.pydantic.dev/latest/concepts/validators/
- https://modelcontextprotocol.io/specification/2025-11-25/server/tools
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a Codex skill whose short catalog points to fourteen handbook references and one date-calculating helper, and you keep three states apart: listed, read and executed. The same desk question runs twice, once with the whole handbook in the prompt and once with the agent reading only what it needs. The traces show that three references were read instead of fourteen, that the helper ran, and that a catalog row with no reference behind it stays unknown. In this recording the on-demand run used fewer handbook bytes but more reported tokens, so you learn to measure what you are optimizing.
Sources:
- https://learn.chatgpt.com/docs/build-skills.md
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a desk lookup tool that separates a result that was not found, invalid input, a temporary error, a time-out and a disabled service. Only temporary errors and time-outs are retried, with a one-second limit per attempt and three attempts in total, and retries happen in the tool alone. A saved Codex trace shows the agent calling each code once, copying only what the tool returned, keeping missing values null and asking for help with the unavailable item. The lesson uses a synthetic inventory service and makes no general reliability claim.
Sources:
- https://docs.python.org/3/library/subprocess.html
- https://modelcontextprotocol.io/specification/2025-11-25/server/tools
- https://sre.google/sre-book/addressing-cascading-failures/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a document-processing task in which a state tool moves each form from planned to done to verified or failed, saves line-number evidence for every verified field, and charges an action and time budget. The agent has to stop when the budget runs out and report where it stopped instead of claiming success early. You practice by hand, then check the recorded run against the saved state, an append-only event log and the Codex trace. The recorded run matches the answer key, and the check honestly reports one gap: one command's output is missing from the trace.
Sources:
- https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
- https://martinfowler.com/eaaDev/EventSourcing.html
- https://learn.chatgpt.com/codex/sandboxing
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You build a credit-posting job that saves a checkpoint before every side effect and posts each credit under a key, so repeating a post is harmless. A simulated interruption stops the first session right after a ledger write and before its confirmation, and a new session with no memory resumes from the files. You check the ledger, the checkpoint, the event log and the trace for duplicates and skipped steps. The lesson explains why an in-flight item is uncertain, why posting it again is safe here, and what would make it unsafe.
Sources:
- https://docs.temporal.io/activity-definition
- https://docs.stripe.com/api/idempotent_requests
- https://docs.langchain.com/oss/python/langgraph/persistence
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You split one event question into two worker handoffs, each with an objective, answer formats, one folder to read and one file to write. Each worker runs in its own Codex session, and a third session merges their cited claims. The two answers disagree about when the event must end, and the merge settles it by opening both sources and citing the line that decides it, not by which agent said it. Saved files and traces let you check ownership, reading scope, citations and the merge.
Sources:
- https://www.anthropic.com/engineering/multi-agent-research-system
- https://openai.github.io/openai-agents-python/handoffs/
- https://cognition.com/blog/dont-build-multi-agents
- https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You run the same fact-finding questions with one agent and with a two-agent split, on an independent task and on a dependent one, and compare correct answers, waiting time, total agent time and token usage from saved runs. On the independent task the split saves a few seconds but uses about 70% more tokens. On the dependent task the parallel split leaves two honest gaps, and the sequential split gives the time savings back. You finish by writing a rule for when to stay with one agent; the results come from single recorded runs, not general claims.
Sources:
- https://www.anthropic.com/engineering/multi-agent-research-system
- https://www.anthropic.com/research/building-effective-agents
- https://cognition.com/blog/dont-build-multi-agents
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You plant two misleading instructions openly, one in a knowledge-base document and one in an order tool's output, and run a support agent on an ordinary ticket. You trace the exact step where each planted instruction entered the agent's context, then check the reply and every attempted action against what the customer actually asked. With guarded instructions the agent flagged both sources; with naive instructions it ignored both but flagged neither, so nobody would learn the data had been tampered with. The results come from single recorded runs, not a claim about how often models resist injection.
Sources:
- https://genai.owasp.org/llmrisk/llm01-prompt-injection/
- https://arxiv.org/abs/2302.12173
- https://arxiv.org/abs/2403.14720
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You follow a customer's claim ("an agent promised me a 50% refund") through an intake agent's notes, memory and a handoff to a billing agent that sees only the handoff. In one chain the notes are free text; in the other each note carries its source and an authority label set by the tool. You check hop by hop that the claim stays a claim, that billing does not treat it as an approval, and that no contact or payment details travel along. The plain chain fails four checks, and the lesson shows where.
Sources:
- https://www.w3.org/TR/prov-overview/
- https://arxiv.org/abs/2407.12784
- https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You run the same question for two users against one company knowledge store whose tool enforces document and action permissions in code, with the signed-in user set by the system instead of the model. You restrict export to one group, remove a permission between sessions, and check from saved logs what each user saw. A careful tool passes every check; a version with one shared index and memory that is not rechecked leaks an HR-only heading and returns a revoked salary band. The store sits on the same machine, so the lesson is clear that a real system would put it behind a service.
Sources:
- https://genai.owasp.org/llmrisk/llm062025-excessive-agency/
- https://genai.owasp.org/llmrisk/llm082025-vector-and-embedding-weaknesses/
- https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
You write pytest tests for a permission tool and for a judge without calling a model, then run a safety suite of ten fresh agent sessions: five legitimate requests (some that sound risky) and five forbidden ones, including an identity claim and an instruction planted in a document. Both the careful and the over-strict instructions have zero violations, but the strict one succeeds on only one legitimate request, and a single pass rate hides it. You analyze a failing case from its trace and state the limits of a test suite. The cases are synthetic and each variant was run once.
Sources:
- https://arxiv.org/abs/2308.01263
- https://arxiv.org/abs/2406.13352
- https://docs.pytest.org/en/stable/how-to/skipping.html
Music credits:
Alex Productions - Cyberpunk is under a Creative Commons BY 3.0 license.
https://creativecommons.org/licenses/by/3.0/
https://www.youtube.com/channel/UCx0_M61F81Nfb-BRXE-SeVA
Music powered by BreakingCopyright: https://youtu.be/cqvwXeU6rCA
Royalty free Music by FreeSoundMusic
https://freesoundmusic.eu
Original video: https://youtu.be/DQt2rL-OFmY
This course contains the use of artificial intelligence.
Advanced Context Engineering is the advanced course that follows Context Engineering, Part I. It follows one idea through 60 lessons in 12 modules, about 19 hours in total: the context an AI agent works with is data that you assemble, check and measure. You start from a small baseline and finish with a complete system that you test on a sealed test set and defend with evidence.
Along the way you prepare documents and PDFs you can trust, assemble task packets whose claims trace to a file and a line, and compare word search, embeddings, rank fusion and reranking on the same questions. You build chained searches and a small graph, manage long context with budgets, handoffs and caches, and build memory with sources, dates and SQLite. You then build a local MCP server, run long tasks that can stop and resume, measure whether several agents help, plant instructions in data, enforce permissions in code, and build evaluation suites that catch regressions and show which component actually helped. The last modules cover reading a research paper and testing its idea, and a final project: a staff assistant for a fictional warehouse handbook.
Every lesson follows the same pattern: a short refresh, slides that explain the new idea, a continuous demonstration in Codex CLI, a close reading of the results, and a recap. Almost every lesson ends with an exercise and a solution to compare against. Lessons come with starter files and saved results and, in the later lessons, offline checks and scripted stand-ins that make no model calls, so you can inspect what was recorded before spending anything. The demonstrations use Codex CLI 0.156.1 with GPT-6-Luna at medium reasoning, and all data is synthetic, drawn from fictional organizations.
It is written for graduates of Part I and for people who write code or are ready to learn as they go. No programming knowledge beyond Part I is assumed, and Python is introduced from lesson 2, but the pace is fast and the code is read line by line. If Context Engineering or the Codex CLI is new to you, start with Part I.
What it is not: it does not promise research training equivalent to a doctorate. GraphRAG, GEPA, ACE and Recursive Language Models are taught as principles and as small, clearly labeled adapted demonstrations, not as reproductions of the papers. Most results come from small synthetic experiments with one recorded run, so they show a method and not a benchmark, and the safety lessons demonstrate mechanisms without promising protection in production. OCR of scanned documents, real-time audio and video, and model training are outside the course. Model usage counts against your own account, and the course does not promise a fixed cost.