Skip to content
masterclass Buddy

AI & ML · Concept

RAG

Retrieval-augmented generation (RAG) retrieves relevant content and adds it to a model prompt before generating an answer. It helps models use proprietary, domain-specific, or newer information.

Last updated

Syntax

client.responses.create(model="MODEL", input="QUESTION\n\nCONTEXT: RETRIEVED_CONTENT")

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Prompt engineering
  • Fine-tuning
  • Few-shot learning
  • Prompt caching

Source: Prompt engineering | OpenAI API. Checked 2026-11-03.