Repository navigation
Fix the retired models, a requirements file that would not install, and add notebook CI - #55
Conversation
cot-prompting and ethical-prompt-engineering used gpt-3.5-turbo, which OpenAI shut down on 2026-10-23, so both failed on their first call. The other 20 used gpt-4o or gpt-4o-mini, which shut down on 2027-01-14. Every notebook now names its model once, as MODEL in its first code cell: gpt-5.4-mini, or gpt-5.4 where the original used gpt-4o. Where temperature is part of the lesson (few-shot at 0, the Jinja2 templates at 0, self-consistency at 0.7), the call passes reasoning_effort="none": GPT-5.x models accept a temperature only then, and LangChain silently drops it otherwise. cot-prompting also turns hidden reasoning off so the standard-vs-CoT comparison stays visible. Imports move to langchain_core and langchain_classic, since LangChain 1.x removed langchain.prompts, langchain.chains and langchain.memory. prompt-security-and-safety stopped at cell 9 because the sanitizer rejected the example input with an uncaught ValueError; that call now uses the same try/except as the cell before it. requirements.txt goes from 95 pinned 2024 lines to the 12 packages the notebooks import, as ranges within the tested major version. All 22 notebooks ran top to bottom in a fresh Python 3.11 venv built from it. Dependabot now proposes a change only when a release leaves its range. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…steps The footer, now "More from DiamantAI", gains one line for the other four flagship repos and one for the newsletter, YouTube, Discord, website and courses. Links go through the README's existing click tracker, except Discord, which the tracker does not allow. Getting Started now says how to install the requirements and set the API key, and names the models. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Compiles every notebook's code cells in order (IPython magics and shell lines removed) and every .py file, on each push and pull request. It needs no API keys and executes nothing. .gitignore ignored every *.yml file, which would have kept this workflow out of the repo; GitHub config under .github/ is now exempt. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Code Review by Qodo
🟡 Low 1.
|
Addresses the Qodo review note: a %%bash cell lost only its magic line and its shell body then failed to compile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit 54d5845 |
What was broken
cot-prompting(the most-visited notebook) andethical-prompt-engineeringusedgpt-3.5-turbo, which OpenAI shut down on 2026-10-23.gpt-4oorgpt-4o-mini, which shut down that day.requirements.txtcould not be installed on macOS or Linux. It pinnedpywin32==307, which ships Windows wheels only, sopip install -r requirements.txtstopped with "No matching distribution". On current LangChain (1.x), 21 of the 22 notebooks also failed at import.What this changes
MODELin its first code cell.gpt-3.5-turboandgpt-4o-minibecamegpt-5.4-mini.gpt-4obecamegpt-5.4in the two places that used it:prompt-optimization-techniquesand the logic-puzzle cell ofcot-prompting. Two notebooks whose prose said "GPT-4" now name the real model.few-shot-learning(0),prompt-templates-variables-jinja2(0) andself-consistency(0.7, the temperature it originally ran at) passreasoning_effort="none". GPT-5.x models accept a temperature only with that setting, and LangChain drops the temperature without a warning if it is missing.cot-promptingalso turns hidden reasoning off, so the only reasoning is the step-by-step the prompt asks for. The other 18 notebooks never set a temperature.langchain.promptsbecamelangchain_core.prompts. ConversationChain, ConversationBufferMemory, RegexParser and load_summarize_chain now come fromlangchain_classic. An unusedLLMChainimport was dropped from 2 notebooks.prompt-security-and-safetystopped at cell 9, because its own sanitizer rejected the example input and raised an uncaught ValueError. The call now uses the same try/except as the cell before it, and the saved traceback is replaced with the output this code produces..github/workflows/notebook-smoke.ymlcompiles every notebook and.pyfile on each push and pull request, with no keys and no execution..gitignoreignored all*.yml, which would have kept the workflow out, so.github/is now exempt.AGENTS.mdnotes theMODELconvention and the CI.Model choice: two options I did not take
gpt-5.4-miniwithreasoning_effort="none"accepts temperature: 4 calls at 0 gave 1 distinct answer, and 4 calls at 1.2 gave 4.gpt-5.4-minito match GenAI_Agents ci: check the Python inside %%capture-style cells #58-64. Switching is one line per notebook. Note that it rejectstemperature=0unlessreasoning_effort="none"is set, which these notebooks already pass where temperature matters.How it was verified
requirements.txtinstalls, andpip checkpasses.input()prompts inevaluating-prompt-effectiveness. Every changed call pattern was exercised, including ConversationChain, RegexParser, map-reduce summarization and the raw OpenAI client.For you to decide
images/also has iGPT logo files that nothing references. Their status is unknown, so I left them in place.🤖 Generated with Claude Code
PR Summary by Qodo
Restore notebook compatibility and add compilation CI
🐞 Bug fix🧪 Tests📝 Documentation⚙️ Configuration changes🕐 40+ MinutesAI Description
Diagram
graph TD D["Dependabot"] --> R["Requirements"] --> L["LangChain packages"] --> N["Technique notebooks"] --> O{{"OpenAI API"}} C["Compilation CI"] --> NHigh-Level Assessment
1. Platform-aware lockfiles
2. Execute notebooks in CI with mocked model calls
Files changed (28)
+192 / -158Bug fix (22)
+80 / -60ambiguity-clarity.ipynb
Refresh ambiguity lesson model and prompt import+3/-2basic-prompt-structures.ipynb
Restore basic prompt and conversation imports+5/-4constrained-guided-generation.ipynb
Restore constrained-generation parser imports+4/-3cot-prompting.ipynb
Update chain-of-thought model comparison+2/-2ethical-prompt-engineering.ipynb
Replace the unavailable ethics lesson model+3/-2evaluating-prompt-effectiveness.ipynb
Refresh prompt-evaluation model selection+2/-1few-shot-learning.ipynb
Preserve deterministic few-shot sampling+5/-3instruction-engineering-notebook.ipynb
Refresh instruction lesson dependencies and model+3/-2intro-prompt-engineering-lesson.ipynb
Refresh introductory lesson dependencies and model+3/-2multilingual-prompting.ipynb
Align multilingual lesson prose and model+4/-3negative-prompting.ipynb
Refresh negative-prompting model and import+3/-2prompt-chaining-sequencing.ipynb
Refresh prompt-chaining model and import+3/-2prompt-formatting-structure.ipynb
Refresh prompt-formatting model and import+3/-2prompt-length-complexity-management.ipynb
Restore summarization imports for LangChain 1.x+1/-1prompt-optimization-techniques.ipynb
Move optimization examples to the larger current model+3/-2prompt-security-and-safety.ipynb
Handle rejected injection examples without stopping+13/-14prompt-templates-variables-jinja2.ipynb
Preserve zero-temperature Jinja2 examples+1/-1role-prompting.ipynb
Refresh role-prompting model and import+3/-2self-consistency.ipynb
Restore sampling variation in self-consistency+6/-2specific-task-prompts.ipynb
Align task lesson text and model+4/-3task-decomposition-prompts.ipynb
Refresh task-decomposition model and import+3/-2zero-shot-prompting.ipynb
Remove obsolete zero-shot imports and model+3/-3Tests (1)
+68 / -0notebook-smoke.yml
Compile notebooks and Python files on push and PR+68/-0Documentation (2)
+14 / -3AGENTS.md
Document model naming and notebook CI conventions+1/-0README.md
Clarify setup and expand DiamantAI links+13/-3Other (3)
+30 / -95dependabot.yml
Align pip updates with bounded requirements+3/-0.gitignore
Allow GitHub YAML configuration to be tracked+2/-0requirements.txt
Replace platform-specific pins with bounded notebook dependencies+25/-95Summary by CodeRabbit