openai/openai-cookbook
View on GitHub ↗ ★ 76,913 Jupyter Notebook
Examples and guides for using the OpenAI API
77 mentions on Hacker News by 63 people: 25 stories, 52 comments · first 2022-08-22 · latest 2026-09-10
20082026
-
…my comment because the links are now fixed! And they point to a public repo under the openai org: https://github.com/openai/openai-cookbook/tree/main/examples...
comment by varenc · 2026-09-10 · in OpenAI Agents API -
…2023 https://github.com/anthropics/claude-cookbooks/commit/2b3f4a... OpenAI's started in June 2022 https://github.com/openai/openai-cookbook/commit/535f545be7e...
comment by simonw · 2026-07-24 · in Claude Cookbook -
…a much better version using this command instead, which uses the maximum image size according to https://github.com/openai/openai-cookbook/blob/main/examples... OPENAI_API_KEY="$(llm keys get openai)" \ uv run…
comment by simonw · 2026-04-21 · in ChatGPT Images 2.0 -
…why this matters—not just technically, but civilizationally. Would welcome thoughtful engagement: https://github.com/openai/openai-cookbook/issues/2426
comment by vreticaltension · 2026-02-10 · in An Open Letter on the Epistemic Loss of Retiring GPT‑4o -
▲ 2
An Open Letter on the Epistemic Loss of Retiring GPT‑4ostory by vreticaltension · 2026-02-10 · 3 comments
-
▲ 1
GPT-5.1 Apply_patch.py Implementationstory by victorbuilds · 2025-12-03 · 1 comment
-
▲ 6
What Makes Documentation Goodstory by vinhnx · 2025-10-21 · 0 comments
-
…I'm interested in both full model finetunes, and downstream matrix optimization as done in [1]. [1] https://github.com/openai/openai-cookbook/blob/main/examples...
comment by curl-up · 2025-08-01 · in Gemini Embedding: Powering RAG and context engineering -
Open AI cookbook https://github.com/openai/openai-cookbook
comment by 3abiton · 2025-05-27 -
▲ 4
Examples and guides for using the OpenAI APIstory by saikatsg · 2025-04-19 · 0 comments
-
…this model to turn out as well as it did? [1] https://x.com/sama/status/1889755723078443244 [2] https://github.com/openai/openai-cookbook/blob/6a47d53c967a0...
comment by comex · 2025-04-14 · in GPT-4.1 in the API -
▲ 1
Vulnerability Issue related to AI response Markdown conversionstory by taeho070607 · 2025-03-28 · 2 comments
-
…is just as active as it ever was w/notebooks. To an almost absurd degree. 5-10 commits a week. https://github.com/openai/openai-cookbook/activity
comment by refulgentis · 2024-12-21 · in Building Effective "Agents" -
…one good option is to use Wikipedia pages from the recent Olympics, which GPT has no knowledge of: https://github.com/openai/openai-cookbook/blob/457f4310700f9...
comment by tedsanders · 2024-09-07 · in Minifying HTML for GPT-4o: Remove all the HTML tags -
The official openai-cookbook ( https://github.com/openai/openai-cookbook ) used to have an explicit, but buried, call out that instruction-following models like `text-davinci-003` were "Less diverse; less creative; sometimes harder to…
comment by hughrlomas · 2024-06-17 · in Creativity has left the chat: The price of debiasing language models -
…learned a couple tricks from OpenAI's Cookbook examples. This one came in handy not too long ago: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by jihadjihad · 2024-04-19 · in Ask HN: High quality Python scripts or small libraries to learn from -
OpenAI cookbook: https://github.com/openai/openai-cookbook Btw, the Claude API might be available even if the chatbot is not.
comment by turing_complete · 2024-04-17 · in Collection of notebooks showcasing some fun and effective ways of using Claude -
▲ 4
OpenAI Cookbook: Techniques to improve reliabilitystory by DenverSWE · 2024-02-28 · 0 comments
-
OpenAI community repo with lots of examples: https://github.com/openai/openai-cookbook
comment by xnyan · 2023-11-08 · in Major outages across ChatGPT and API -
▲ 3
OpenAI cookbook: using GPT-4 as “reference-free” evaluatorstory by zostale · 2023-08-17 · 0 comments
-
They have an example python script for batch jobs with retries. https://github.com/openai/openai-cookbook/blob/main/examples...
comment by dsalzman · 2023-08-15 · in Ask HN: Batch Processing with OpenAI -
▲ 2
Question answering using a Search APIstory by krupskis · 2023-08-15 · 0 comments
-
▲ 5
Enhancing Whisper transcriptions: pre- & post-processing techniquesstory by tosh · 2023-08-14 · 0 comments
-
▲ 3
Design considerations for RAG application in production modestory by kmassimilian · 2023-08-14 · 0 comments
-
…as far as I know. Even the OpenAI tutorial on this matter scrapes first and uses only normal text. https://github.com/openai/openai-cookbook/blob/main/apps/web...
comment by jack_pp · 2023-08-02 · in I'm betting on HTML -
…with labelled similar and dissimilar video pairs, like in this notebook[1] from OpenAI. [1]: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by woadwarrior01 · 2023-08-01 · in USearch: Smaller and faster single-file vector search engine -
▲ 2
OpenAI: How to Handle Rate Limitsstory by juunge · 2023-07-31 · 0 comments
-
They've released an "OpenAI Cookbook" with examples of several common tasks. https://github.com/openai/openai-cookbook
comment by MilnerRoute · 2023-07-09 · in Ask HN: Where to learn what you can do with ChatGPT? -
…provides the background for the tradeoff between the 2 approaches: 1) fine-tuning vs 2) Search-ask https://github.com/openai/openai-cookbook/blob/main/examples...
comment by emmender · 2023-07-09 · in PdfGptIndexer: Indexing and searching PDF text data using GPT-2 and FAISS -
…of mind for us and something we are continuing to push on. Does streaming work for your use case? https://github.com/openai/openai-cookbook/blob/main/examples... We definitely want to investigate these and the billing issues further. Would…
comment by athyuttamre · 2023-07-06 · in GPT-4 API General Availability -
Yes, you can essentially use GPT functions to reliably output JSON based on a predefined schema. See https://github.com/openai/openai-cookbook/blob/main/examples...
comment by hubraumhugo · 2023-07-03 · in Show HN: JobLens – AI-powered job search for 'Who Is Hiring' -
…vector representation of any text very easily using the openai apis, or frameworks like langchain https://github.com/openai/openai-cookbook/blob/main/examples... Similarity means your text gets turned into an array of numbers and the…
comment by JimmyRuska · 2023-07-02 · in Vector support in PostgreSQL services to power AI-enabled applications -
…significantly (for example, on word math problems, solve rate went from 18% to 79%). Source: https://github.com/openai/openai-cookbook/blob/main/techniqu...
comment by hmage · 2023-07-01 · in Workers with less experience gain the most from generative AI -
…Like I said, it still all feels like we're in wild west times, at least as an app developer. [1] https://github.com/openai/openai-cookbook
comment by daviding · 2023-06-29 · in Building Boba AI: Lessons learnt in building an LLM-powered application -
…could be parsing errors. OpenAI's demo for function calling is not a Hello World, to put it mildly: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by minimaxir · 2023-06-14 · in Native JSON Output from GPT-4 -
…://platform.openai.com/docs/guides/gpt/function-calling they also have a notebook with more examples: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by naiv · 2023-06-13 · in Function calling and other API updates -
▲ 2
Question Answering Using Embeddingsstory by jbmilgrom · 2023-06-02 · 0 comments
-
…of "prompt engineering" is more about building new software on top of LLMs - the kind of stuff in https://github.com/openai/openai-cookbook I see using ChatGPT directly as prompting, not prompt engineering.
comment by simonw · 2023-04-28 · in You probably don't know how to do Prompt Engineering -
…about fine-tuning because they want to solve this problem. The best answer I've seen so far is in https://github.com/openai/openai-cookbook/blob/main/examples... > Although fine-tuning can feel like the more natural option—training on data…
comment by simonw · 2023-04-22 · in Finetuning Large Language Models -
The OpenAI Cookbook has had an easy to use chat with a PDF app example for a few months. https://github.com/openai/openai-cookbook/tree/main/apps/fil...
comment by robflaherty · 2023-04-19 · in ChatPDF – Chat with Any PDF -
▲ 2
Question answering using embeddings-based search (OpenAI Cookbook)story by tedsanders · 2023-04-14 · 0 comments
-
…Where did title came from? Another point is that OpenAI changed encoders for chat models. Link: https://github.com/openai/openai-cookbook/blob/main/examples... Now English is less optimized for tokens usage and other languages are much…
comment by rubywilde · 2023-04-12 · in Why is GPT-3 15.77x more expensive for certain languages? -
I wasn't aware that GPT-3 and GPT-4 use different tokenizers. I've read https://github.com/openai/openai-cookbook/blob/main/examples... and misinterpreted "ChatGPT models like gpt-3.5-turbo and gpt-4 use tokens in the same way as older…
comment by lowefk · 2023-04-06 · in OpenAI Tokenizer -
Different GPTs use different tokens: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by tedsanders · 2023-04-05 · in OpenAI Tokenizer -
This guide explains how to count tokens for 3.5-turbo and beyond: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by tedsanders · 2023-04-05 · in OpenAI Tokenizer -
Here's a way to do it in your own code: https://github.com/openai/openai-cookbook/blob/main/examples...
comment by Cyphase · 2023-03-29 · in Show HN: GPT Calculator – Calculate the token count and cost of your GPT Prompt -
…- https://github.com/neuml/txtai/blob/master/examples/03_Build... - https://github.com/openai/openai-cookbook/blob/main/examples...
comment by thund · 2023-03-25 · in Open-Source GPT-4 Platform for Markdown -
https://github.com/openai/openai-cookbook/blob/main/examples... https://github.com/pinecone-io/examples/blob/master/generati... https://www.pinecone.io/learn/openai-gen-qa/ https://www.youtube.com/watch?v=tBJ-CTKG2dM&t=787s&ab_channe...…
comment by gk1 · 2023-03-23 · in Cheating is All You Need -
▲ 1
API Request Parallel Processorstory by andromaton · 2023-03-19 · 0 comments
-
…or similar techniques, essentially asking the model to explain how it arrived at a solution. https://github.com/openai/openai-cookbook/blob/main/techniqu...
comment by antondd · 2023-03-15 · in Show HN: AI explanations for other people’s code