hackhaton-space-stackHackhaton Space Stack
AcademyBuilder
Get Started
All terms
The Basics
  • Stack
  • Frontend & Backend
  • CLI
  • Monorepo
  • Server
  • Localhost
How AI Works
  • Context Window
  • Hallucination
  • Token
  • Prompt Caching
  • Session
  • Compaction
  • Embedding
  • Vector Database
  • RAG
  • Fine-tuning
  • Temperature
  • Inference
  • Reasoning
  • Multimodal
Building With AI
  • Agent
  • MCP
  • System Prompt
  • Skill
  • CLAUDE.md
  • Slash Command
  • Harness
  • Computer Use
  • Agents SDK
  • Voice Agents
  • OAuth
  • Vibe Coding
  • Permission Scope
  • Tool Calling
  • Prompt Injection
  • Eval
  • Guardrails
  • Sandbox
  • Progressive Disclosure
Code & Collaboration
  • Git
  • Commit
  • Branch
  • GitHub
  • Pull Request
  • Open Source
  • Markdown
  • Dependency
  • Merge
  • Fork
APIs & Connections
  • API
  • Auth
  • Database
  • ORM
  • SDK
  • Webhook
  • Endpoint
  • REST
  • HTTP Methods
  • Env File
  • Schema
  • JSON
  • YAML
  • Secret
  • Rate Limit
  • CORS
  • Cookie
  • Encryption
Shipping & Running
  • Deploy
  • Headless
  • Cron
  • DNS
  • CDN
  • Object Storage
  • Serverless
  • Edge
  • Worker
  • Runtime
  • Process
  • Daemon
  • Queue
  • Job
  • State
  • Cache
  • SSH
  • Build
  • Staging
  • Rollback
  • Docker
  • Feature Flag
  • Test
  • CI/CD
  • The Cloud
Debugging & Errors
  • Trace
  • Type Error
  • Stack Trace
  • Log
  • Bug
  • Patch
  • Latency
How Developers Think
  • DRY
  • YAGNI
  • KISS
  • Refactoring
  • Technical Debt
  • Async
← All terms

Type-safe, modern TypeScript scaffolding for full-stack web development

ThreadsGitHub

Info

  • Academy
  • Docs

Legal

  • Terms of Service
  • Privacy Policy

© 2026 Dzulhelmy Nazri

How AI Works

$definerag--plain-english

RAG

TLDRThe open-book exam: look it up, then answer.

Ask a model about your refund window and it will often invent one. Last week's price was never in the training set. Your help center was never in the training set. The model still answers, because that is what it does — it predicts the next token. That is a hallucination wearing a product face.

RAG is the habit of fetching first.

You keep your own pile — markdown, tickets, a Notion export. A question comes in. A search runs, usually over embeddings in a vector database. A few relevant scraps get pasted into the context window. Then the model writes, with those scraps on the desk. Retrieval-augmented generation: fetch the pages, then generate.

The model did not get smarter. You stopped asking it to recite a world it never lived in.

This is the pattern under almost every "AI that knows our business" demo. The support bot that quotes your FAQ. The agent that answers from a project file and the repo instead of a blog post from 2023. Nobody retrained the weights. They pointed a normal model at a folder and told it to read before it spoke.

Two traps:

  • Wrong scraps. RAG is only as honest as what it retrieved. Closest chunk is not correct chunk. If the folder has no answer, you still get a confident paragraph about the nearest cousin.
  • Stale scraps. Update the file. Re-index. Otherwise the bot is citing Tuesday.

Fine-tuning is the other lever — you change how the model writes, not which page it can see. Facts that move weekly belong in retrieval. A style that never moves can wait.

What this unlocks

You can ship a Saturday product that answers from this repo, this pricing page, this schema — without a training run. The builder gets you an app. RAG is how that app stops guessing about your world.

Related

  • Embedding
  • Vector Database
  • Fine-tuning
  • Hallucination
PrevVector Database

How AI Works

NextFine-tuning