Also known as: RAG, Retrieval Augmented Generation
Giving an LLM your own documents so it answers from them.
An approach where AI searches relevant external information before generating an answer.
💡 An open-book examination where a student looks up relevant information before answering.
// 1. embed the query
const q = await embed("What is RAG?");
// 2. find similar chunks in the vector DB
const chunks = await vectorDB.search(q, { topK: 3 });
// 3. answer using those chunks as context
const answer = await llm.chat({ question: "What is RAG?", context: chunks });It lets applications answer using company documents, private databases and up-to-date knowledge without retraining the model.
RAG is not fine-tuning: RAG looks things up at query time, while fine-tuning bakes knowledge into model weights.
with tapaScript
By clicking Sign Up you re confirming that you agree with our Terms and Conditions.
