Hacker GitHub

← All repos

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

Mentions per year 77 mentions · busiest year 2023 (55)
20082026
  1. …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
  2. …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
  3. …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
  4. …why this matters—not just technically, but civilizationally. Would welcome thoughtful engagement: https://github.com/openai/openai-cookbook/issues/2426
  5. …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...
  6. Open AI cookbook https://github.com/openai/openai-cookbook
    comment by 3abiton · 2025-05-27
  7. …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
  8. …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"
  9. …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...
  10. 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…
  11. …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...
  12. OpenAI cookbook: https://github.com/openai/openai-cookbook Btw, the Claude API might be available even if the chatbot is not.
  13. 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
  14. 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
  15. …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
  16. …with labelled similar and dissimilar video pairs, like in this notebook[1] from OpenAI. [1]: https://github.com/openai/openai-cookbook/blob/main/examples...
  17. They've released an "OpenAI Cookbook" with examples of several common tasks. https://github.com/openai/openai-cookbook
  18. …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...
  19. …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
  20. 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...
  21. …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…
  22. …significantly (for example, on word math problems, solve rate went from 18% to 79%). Source: https://github.com/openai/openai-cookbook/blob/main/techniqu...
  23. …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
  24. …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
  25. …://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...
  26. …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.
  27. …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
  28. 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
  29. …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…
  30. 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
  31. Different GPTs use different tokens: https://github.com/openai/openai-cookbook/blob/main/examples...
    comment by tedsanders · 2023-04-05 · in OpenAI Tokenizer
  32. 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
  33. Here's a way to do it in your own code: https://github.com/openai/openai-cookbook/blob/main/examples...
  34. …- https://github.com/neuml/txtai/blob/master/examples/03_Build... - https://github.com/openai/openai-cookbook/blob/main/examples...
  35. 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
  36. …or similar techniques, essentially asking the model to explain how it arrived at a solution. https://github.com/openai/openai-cookbook/blob/main/techniqu...
  37. Yes. You can use fine tuning ( https://platform.openai.com/docs/guides/fine-tuning and https://github.com/openai/openai-cookbook/tree/main/examples... ) to improve its knowledge set of a particular domain. Even with sufficient work on your…
  38. Probably the embeddings API. This guide is what helped me understand the concept https://github.com/openai/openai-cookbook/blob/main/examples... tl;dr is that you can pre-process each chunk of your database and use embeddings to quickly…
    comment by Hyzer · 2023-03-02 · in Introducing ChatGPT and Whisper APIs
  39. …you query the vectorized embeddings and then pass the n relevant texts into the completion api. https://github.com/openai/openai-cookbook/blob/main/examples...
  40. I think https://github.com/openai/openai-cookbook/blob/main/examples... is the one they are referring to. This is the page that links it https://github.com/openai/openai-cookbook/blob/main/text_com...
  41. …[3], which abstracts a lot of the work. [1] - https://platform.openai.com/docs/tutorials [2] - https://github.com/openai/openai-cookbook [3] - https://github.com/hwchase17/langchain
    comment by mmaia · 2023-02-13 · in CustomGPT
  42. …and downgrading to curie in several steps as you polish prompts and breakdown tasks (see https://github.com/openai/openai-cookbook/blob/main/techniqu... ). I haven't gotten beyond the davinci for prototyping tho. It's cheap enough that a…
  43. …stored in it. For example a notebook for "lets train GPT on the information about the olympics - https://github.com/openai/openai-cookbook/blob/main/examples... and https://github.com/openai/openai-cookbook/blob/main/examples... and…
  44. …https://pair.withgoogle.com/guidebook/ LLM advice: Tips to improve prompt and answer quality. https://github.com/openai/openai-cookbook/blob/main/techniqu... I wrote a short overview of some of the LLM Application development tools and…
  45. Mr Kumar seems to have missed the guide. Here https://github.com/openai/openai-cookbook/blob/main/techniqu...
    comment by throwaway29303 · 2023-01-23 · in ChatGPT Is Bad at Math
  46. …as truthfully as possible, and if you're unsure of the answer, say "Sorry, I don't know" [0] https://github.com/openai/openai-cookbook/blob/main/examples... (which is now linked in OP)
  47. …that it can already solve more difficult problems when given the right prompts and constraints. https://github.com/openai/openai-cookbook/blob/main/techniqu...
  48. https://github.com/openai/openai-cookbook/blob/main/examples... would be something to look at too.
    comment by shagie · 2023-01-16 · in OpenAI starts testing ChatGPT premium
  49. …is not the right approach for this use-case. A better approach might look more like this: https://github.com/openai/openai-cookbook/blob/main/examples...
  50. Here’s the example notebook that shows how to do this. https://github.com/openai/openai-cookbook/blob/main/examples...