Skip to content
Tejas P Mehta

Practical AI for Developers, PMs & Founders

  • Home
  • About
  • Claude Workflow
  • Build a RAG
  • Build AI Agent in PHP
  • Home
  • About
  • Claude Workflow
  • Build a RAG
  • Build AI Agent in PHP

RAG Tutorial Series

Build a RAG-powered support bot from scratch in plain PHP and stock MySQL 8: chunking, embeddings, vector search, grounded answers with citations, evaluation and shipping.

  • Home
  • RAG Tutorial Series
An agent combining knowledge-base search with tools
Posted inAI & LLMs AI Agents in PHP Series MySQL & Databases PHP Tutorials RAG Tutorial Series

RAG + Tools Together

Posted by By Tejas P Mehta October 21, 2026
Ask the Part 4 version of Nimbus this: "I was charged twice for order #1043.…
Read More
News answers ranked by freshness with multi-source citations
Posted inAI & LLMs PHP Tutorials RAG Tutorial Series

Bonus 2 — Local News RAG: Recency-Aware Answers & Multi-Source Citations

Posted by By Tejas P Mehta July 25, 2026
The last piece Bonus 1 left us able to fetch, dedup, and retrieve today's news.…
Read More
A live news feed flowing into a RAG pipeline with duplicates removed
Posted inAI & LLMs MySQL & Databases PHP Tutorials RAG Tutorial Series

Bonus 1 — Local News RAG: Pointing the Pattern at Live Data

Posted by By Tejas P Mehta July 25, 2026
Same skeleton, live target You just built a support bot over static documents. This bonus…
Read More
Evaluating a RAG bot and shipping it as a web chat
Posted inAI & LLMs PHP Tutorials RAG Tutorial Series

Episode 8 — Evaluating & Shipping

Posted by By Tejas P Mehta July 23, 2026
From "seems good" to "measurably good" to "live" For two episodes I've been repeating the…
Read More
Keyword and vector search combined, with a shield blocking a malicious note
Posted inAI & LLMs MySQL & Databases PHP Tutorials RAG Tutorial Series

Episode 7 — Improving Quality: Hybrid Search, Reranking & Guardrails

Posted by By Tejas P Mehta July 23, 2026
"Works on my questions" isn't "works" Episode 6 gave us a real, grounded, cited bot.…
Read More
An AI answer with numbered citations linked to source documents
Posted inAI & LLMs PHP Tutorials RAG Tutorial Series

Episode 6 — Generation: Grounded Answers with Citations

Posted by By Tejas P Mehta July 23, 2026
The last mile Five episodes of groundwork come together here. We can load documents, chunk…
Read More
Filtering search results with top-K and a similarity threshold
Posted inAI & LLMs PHP Tutorials RAG Tutorial Series

Episode 5 — Retrieval: Top-K, Thresholds & Filtering

Posted by By Tejas P Mehta July 23, 2026
Our search is fast, but it isn't smart After Episode 4, MySQL ranks our chunks…
Read More
Vector search running inside a MySQL database
Posted inMySQL & Databases PHP Tutorials RAG Tutorial Series

Episode 4 — Scaling the Vector Search in MySQL

Posted by By Tejas P Mehta July 23, 2026
The problem hiding in our search Episode 3 ended on a high: ask "how do…
Read More
Text turned into points on a map of meaning
Posted inMySQL & Databases PHP Tutorials RAG Tutorial Series

Episode 3 — Embeddings & Your First Similarity Search

Posted by By Tejas P Mehta July 23, 2026
The gap we have to close At the end of Episode 2 we had chunks.json:…
Read More
Documents being split into small overlapping chunks
Posted inAI & LLMs PHP Tutorials RAG Tutorial Series

Episode 2 — Preparing the Knowledge Base: Loading & Chunking Your Docs

Posted by By Tejas P Mehta July 23, 2026
Where we left off In Episode 1 we cheated. We pasted Nimbus's refund policy into…
Read More

Posts pagination

1 2 Next page
Scroll to Top