Post

Want to use AI to chat with your own documents? At scale, it’s harder than it sounds. Join @nicodevs.bsky.social to build a chatbot using the new Laravel AI SDK, Postgres, and Livewire 4 🤖 Learn RAG and semantic search from scratch 👇 tighten.com/insights/cha...

tighten.comChat with Your Documents: A Practical Guide to RAG Using the New Laravel AI SDKHave you ever wished you could just ask your documents a question and get an answer? That's exactly what RAG (Retrieval-Augmented Generation) lets you do. It's the technique behind those AI chatbots.....

2 reposts6 likes

Finally: running a vector search with the user question is not good architecture, makes the UX slower and gives worse results. (First of all because users write weird things). You want the model to decide what to search for and how to search it.

Other niggles: the temperature description is wrong and will lead Laravel devs the wrong way setting it to 0. A temp of 1 is not “bad for rag”. I just this this article will teach a generation of Laravel devs and I care :)

And this is wrong and should be corrected: “RAG doesn't use a traditional keyword search.” RAG does not equal semantic search, at all. RAG is simply retrieval to include more context. Could be regex.

This is super well written, wow! One detail: the reason-for-semantic search explanation was correct in 2013, but the models are much smarter now. They *will* search for PTO when asked about vacation. I’m seeing more of my peers putting less emphasis on semantic search

One thing worth considering: once you move embeddings into Postgres, every query ties back to a user row. Separating the search index from identity is the harder architectural problem most RAG tutorials skip entirely.