Glossary — R

Back to glossary index · Master INDEX


RAG (Retrieval Augmented Generation)

A pattern for grounding LLM answers in your own data. Instead of hoping the model has memorized the right facts, you (1) embed your documents into a vector database, (2) when a user asks something, find the most relevant chunks via embedding similarity, (3) include those chunks in the prompt as context. Reduces hallucinations and lets the model “know” current/private information.

See also: RAG, Embeddings, Vector databases, LangChain


Reasoning model

An AI model designed to “think” through problems step-by-step before answering, taking seconds to minutes per response. OpenAI’s o1/o3/o4 and Claude’s extended thinking modes are reasoning models. Substantially better at maths, complex coding, science problems. More expensive and slower than standard models. Use for hard problems; use standard models for everything else.

See also: Reasoning models


RLHF (Reinforcement Learning from Human Feedback)

The main technique for aligning AI models with human preferences after initial training. Process: model generates responses; humans rate them; model is updated to prefer higher-rated patterns. RLHF is why ChatGPT and Claude follow instructions and avoid obvious harms. The “alignment” of modern AI assistants is largely an RLHF achievement, though Anthropic’s Constitutional AI offers an alternative.

See also: AI safety primer, Alignment


React

A JavaScript library for building user interfaces out of reusable components. Created at Facebook (now Meta) in 2013. Now the dominant frontend library. Most modern React projects use it inside a framework — usually Next.js.

See also: React, Next.js, JSX


Refactor

Restructure code without changing what it does. Renaming things, splitting big functions into small ones, extracting a shared component — all refactoring. The point is to make the code easier to work with next time. Distinct from adding features or fixing bugs.


Refresh token

A long-lived token used to get new (short-lived) access tokens, without making the user log in again. Common pattern: access tokens last 15 minutes; refresh tokens last 30 days; when the access token expires, the client uses the refresh token to silently get a new one.

See also: JWT, Sessions & cookies


Repository (repo)

A project tracked by Git. A folder with a hidden .git/ subfolder containing the entire history. “Repo” is the common short form. Hosted versions live on GitHub, GitLab, etc.

See also: Git, GitHub


REST (Representational State Transfer)

The dominant style of HTTP API. Resources are addressed by URL (/users/123), actions are HTTP methods (GET/POST/PUT/DELETE), responses come back as JSON. Not a strict protocol — more a set of conventions. Easy to learn, mostly good-enough, sometimes verbose for complex data needs (where GraphQL shines).

See also: REST APIs


RLS (Row-Level Security)

A Postgres feature that lets you write per-row access rules. “A user can SELECT a row only if user_id = auth.uid().” Once enabled, the database itself enforces the rule on every query, no matter where it comes from. The killer feature of Supabase. Bypassed only by the service_role connection (server-only).

See also: Row-Level Security, Supabase


Route

The URL pattern that maps to a specific page or API endpoint. In Next.js App Router, routes are defined by folder structure: app/blog/[slug]/page.tsx matches /blog/anything.

See also: Next.js


← Q · Glossary index · S →