PromptCorrectlyPromptCorrectly
StudioAI CoursesLibraryBlogPricingAbout
Log inStart free
PromptCorrectlyGLOSSARY · SYSTEMS & SAFETY
Home/Glossary/RAG (retrieval-augmented generation)

What is RAG (retrieval-augmented generation)?

Also called: retrieval augmented generation · grounding

RAG is a pattern where relevant documents are retrieved first and pasted into the prompt, so the model answers from your data instead of from memory.

Models know what they were trained on and nothing about your files, your customers or last week. RAG fixes that without retraining: a search step finds the passages relevant to the question (usually with embeddings), and those passages go into the prompt with an instruction to answer from them.

The quality of a RAG system is mostly the quality of retrieval and of the instruction. Retrieve the wrong chunks and the answer is confidently wrong; forget to say "use only the provided text" and the model blends its memory in.

How to use it well
  1. Instruct: answer only from the provided passages; say when they don't contain the answer.
  2. Ask for citations to the passage used.
  3. Chunk documents so each piece makes sense on its own.
Go deeper
Prompts for developers
Related terms
EmbeddingHallucinationContext windowAI agentAll terms →

Use it right now

Ask our brain anything on the homepage — it remembers the whole conversation — or write a brief in the Studio and see the prompt it compiles to.

Ask the brainOpen the Studio
promptcorrectly.comFROM VAGUE INTUITION TO STRUCTURED INSIGHTBYOK · ANTHROPIC · OPENAI · GROK
PromptCorrectlyPromptCorrectly

The visual workspace for people who actually use AI. Built in the open, priced for humans, powered by your own keys.

Product
  • Studio
  • AI Courses
  • Library
  • Pricing
Resources
  • How it works
  • Templates
  • Community library
  • Repository
  • All 3,600 prompts
  • How to prompt correctly
  • Prompts for every field
  • AI glossary
Company
  • About
  • Contact
  • FAQ
  • Pricing
© 2026 PromptCorrectly · From vague intuition to structured insight.
TermsPrivacyRefundDisclaimerAcceptable useCookies