- UX for AI
- Posts
- Escape from the Figma Titanic: Part 2 -- UXer’s Guide to Magic RAG
Escape from the Figma Titanic: Part 2 -- UXer’s Guide to Magic RAG
RAG (Retrieval-Augmented Generation) is a method for providing just-in-time content, enabling LLMs and AI Agents to answer users' questions and perform autonomous tasks. Recent advances in RAG make it a perfect Magic Carpet for ambitious user-centered UXers seeking to escape the sinking ship of pixel-pushing irrelevance. This article guides you through the process of creating RAG files step by step, so you can connect with your Data Scientists and start adding superior UX value today.
Before we dive deeply into the process of creating RAG files, please take a moment to visit this awesome report from our generous sponsor, UserGuiding:
140+ AI Onboarding Patterns & Expert Insights
We broke down the first-time UX of 10 breakout AI products like Perplexity and Claude: screenshots, expert insights, a Miro board, all in one free report.
See what works, what doesn’t, and how to improve your own onboarding fast.
👉 Get the full 2025 AI Onboarding Report + Miro board with 200+ expert takeaways.
What the Heck is a RAG?
RAG stands for “Retrieval-Augmented Generation” (not to be confused with “rug pull” or another Bitcoin scam…). RAG is a practice of incorporating custom content to help the LLM answer a specific question or an AI agent perform a custom, specialized task. This is a fancy way of saying that your system provides the AI with specific details about how to do something, which yields much more relevant, accurate, and up-to-date responses.
Imagine, for example, that you just wrote a blog post and you want the LLM to help you write an FAQ. It makes sense to provide the blog post text as part of the prompt, doesn't it? That blog post can be considered a RAG file.
Likewise, if you want LLM to help you troubleshoot a customer’s account, it makes sense to provide the AI Model with up-to-date information — the user’s account details, their recent purchases, and so on. The practice of feeding all that info to the model before asking your questions is called RAG.
As one of my favorite Sci Fi authors, Robert Sheckley, wrote in his short story, "Ask a Foolish Question":
“To ask a question
you must already know most of the answer"
Why Do We Need RAG?
Simply put, LLMs have already ingested MOST of the world’s data.
What’s left is your company’s proprietary data and your customer’s data.
RAG is a way to feed that into LLM securely, so that your answers are specific to what your company does best, your “secret sauce.”
Can’t Data Scientists Just Train the Model on Our Data?
Great question — yes, they can! That is called “Fine Tuning,” and until recently, that was the preferred way to get custom data into the AI model. However, RAG offers tremendous advantages:
Just-in-time data loading. RAG enables us to save money by eliminating the need to create, train, host, and manage our own Custom LLM model. Any major model can be used; we just load only the data we need as part of the prompt right before we ask the question.
Dynamic updates. This means we can use RAG to load data with minimal latency, which allows us to load all customer purchases, including the most recent one from just 1 millisecond ago. (In contrast, Fine-Tuned models can be updated at most only every few hours, so any dynamic data quickly becomes stale.)
Lean retrieval. With RAG, only the minimal data must be retrieved and loaded, which makes it fast and efficient. This is accomplished with a special Vector DB, which encodes each chunk of the RAG file and determines what to retrieve based on the task (beyond the scope of this article).
Agent-friendly flexibility. This lean, just-in-time, “self-directing” nature of RAG makes it perfect for Agentic AI applications because an Agent is expected to run autonomously and may not know ahead of time what data it needs to retrieve — it might try something hit a dead-end, pivot and try something else, retrieving different set of RAG files each time.
Why Now is the Time for UX to Get Involved in RAG “Weaving”?
Aye, here be the meat!
In the past, RAG content was owned by Data Scientists and AI Engineers. The files were chaotic: huge, multi-use-case documents filled with brittle, order-sensitive instructions. Any small tweak risked hallucinations. Data Science engineers labored on RAG files in secret, like Alchemists on the Philosopher's Stone.
Today, the situation has quietly changed for the better. Most major LLM providers (OpenAI, Anthropic, AWS, Google, Deep Seek, etc.) have a much cleaner best practice:
1 RAG File = 1 Use Case
As a result, RAG file creation became much simpler and more democratic, because guess who knows the most about Use Cases?
UXers (and PMs).
Which means, using the method we are about to teach you, you can put your knowledge of your customers directly to work today, to help your company’s LLMs deliver more relevant, accurate, and up-to-date responses than they could relying solely on their pre-trained data.
Let’s go ahead and create a RAG file. As in many UX methods we teach here at UXforAI.com, this is not complicated, but can be quite sophisticated.
How to Make a RAG File
The secret to this is no secret — if you have been reading our column (and maybe our new UX for AI book):
To create the content for your Data Scientists and your LLM… You should partner with your Data Scientists and your LLM.
As an example, let’s use ChatGPT —
If you've been living under a large mossy rock and haven't yet set up your account, do it now. It’s free.
I’ll wait.
Got it?
Seriously. Don’t skip this step.
OK, good. (you had me worried there for a minute…)
Now let’s imagine you are working on designing a Life Clock Lifestyle App — (the example app we use for chapter exercises in our new UX for AI book). Let’s say your company has a proprietary collection of Thai-food-inspired super-healthy recipes, and you want the LLM to give the proprietary recipe to Tom Yum Goong to your customers.
(Do you like Thai food? No?! Well… I’m not mad. Just REALLY disappointed.)
Now open ChatGPT and type in the following prompt:
Create an individual RAG file from the recipie on this page. Make this RAG text, not JSON. IMPORTANT: make sure it's a downloadable complate text RAG file you can use to create this recipie. Include file headers, id, title, description, ingradients, the works! https://hot-thai-kitchen.com/tom-yum-goong/
You should get an output similar to this:
# RAG DOCUMENT
id: tom-yum-goong-creamy
title: Creamy Tom Yum Goong (ต้มยำกุ้งน้ำข้น)
description: A creamier, richer version of the classic Thai Tom Yum soup, featuring shrimp, mushrooms, and aromatic herbs in a velvety broth.
tags: Thai, soup, spicy, creamy, seafood
## INGREDIENTS
- 5 cups water
- 10–12 large shrimp (peeled and deveined) ← inferred; original blog includes shrimp naturally
- 2 stalks lemongrass (bottom halves), smashed and cut into 2″ (5 cm) pieces
- 10 thin slices galangal (about 25 g)
- 10 makrut (kaffir) lime leaves
- Oyster mushrooms (200 g / 7 oz), or straw/beech mushrooms
- 3–4 dried chilies (Thai or arbol) or fresh Thai chilies to taste
- 3 Tbsp fish sauce
- 2–3 tsp granulated sugar
- 2 heads shallots (halved) ← combined from ingredient list context
- Optional: tamarind paste, coconut milk, nam phrik pao (not listed but common creamy variation)
- Lime juice and cilantro/green onions for finishing
## SERVINGS & NUTRITION
servings: 4
calories per serving: (not provided in blog)
author: Pailin Chongchitnant
yield: 4 servings
## DIRECTIONS
1. Bring water to a boil.
2. Add shallots, fish sauce, and sugar; simmer briefly to dissolve.
3. Add lemongrass, galangal, lime leaves, and chilies; simmer to infuse flavor.
4. Add mushrooms; continue simmering for about 5 minutes.
5. Stir in shrimp; cook until shrimp are opaque (a few minutes).
6. (Creamy variation) Add tamarind paste and/or coconut milk; stir and gently warm through.
7. Turn off heat; add lime juice to taste.
8. Adjust with fish sauce, sugar, or water as needed.
9. Finish with cilantro and/or green onions before serving.
10. Serve hot, ideally with jasmine rice.
## NOTES
- Can freeze herbs (lemongrass, galangal, lime leaves) and use from frozen.
- Thai chilis add genuine heat; dried arbol chilies are a good substitute :contentReference[oaicite:1]{index=1}.
- Oyster mushrooms are suggested, but straw or beech mushrooms are acceptable :contentReference[oaicite:2]{index=2}.
- For authentic creamier texture, include coconut or evaporated milk (“nam khon” style) :contentReference[oaicite:3]{index=3}.
Download the RAG file you created.
Now let’s try the retrieval part of the RAG. First, attach the file to the ChatGPT prompt and type in the following simulated user request:
make me a Thai soup
The output should be a complete recipe based on your RAG file. You can also ask additional questions — as long as your questions involve Thai soup in some way, the LLM should attempt to base the answers on the RAG file you uploaded.
Did it work?
A few important things to notice
There is no “magic” in the prompt. I purposefully misspelled a few words to demonstrate that LLMs are not picky about how you phrase the question.
RAG creation is a simple, iterative process — (remember, as UX people, we should embrace iterations!) I merely provided the pre-made prompt as a time-saving shortcut. You can start the process by simply saying, “Make me a RAG file from this:” and provide a link, PDF file, Document, or whatever is needed. Then, take a look at the output and iterate until it resembles what you expect. (Then use the same prompt to make more RAG files.)
How do I know what to expect? Simple. Ask your Data Scientists or AI Engineers. They might want specific sections. Or JSON format. Or Examples. Again — try, ask, iterate!
Isn’t this just a public HTML page? Yes. We are practicing. Creating a demo. We are simulating the process of using private, proprietary, custom, dynamic information that serves one specific use case (e.g., your company’s “secret sauce”) to create one single set of training data for your LLM.
Am I just partnering with a robot… To make instructions for the robot? Yes. Exactly! Who better to know how to fix the problems than the entity that created the problem in the first place? My most common prompt is something along the lines of “Hey LLM, you keep screwing up X. Whenever I ask A you say B and I want you to say C. What do I put in a RAG file to fix this?” It does not work 100% … But if it did, where would be the fun in that?
Speaking of which, let’s touch on the value YOU provide to this process.
Where is YOUR value if the LLM is doing all the work?
In essence, with the RAG file creation process, you are partnering with the LLM to create a sort of rudimentary text-based program. The LLM tells you how to program itself, taking most of the work and tedium out of the process.
However, it is YOU, the human, who ultimately determines whether the output is correct.
And the human who is best equipped to evaluate whether the LLM handled a particular use case correctly needs to be someone intimately familiar with the customers — someone who analyzed the competitive landscape, understands customer demands and goals, knows how to align those with the company's development capabilities and revenue streams…
Perhaps someone like you?
Remember, there is no magic in the RAG process. It’s a little like programming, but much more UX/PM-friendly. And your LLM (and your Data Scientists) will help you get this right… But it’s up to you to take the first step.
Next week, we will continue the topic by building the RAG Registry, a repository for storing common methods, errors, variations, and other relevant information. Meanwhile, if you found this article useful and you are committed to escaping the Figma Titanic in 2025, it’s time to get the full UX for AI design framework:
📘 #1 New Release in Data Modeling and Design on Amazon: https://amzn.to/4l2ShyL
This book is your hands-on companion to everything you love about our blog and our famous “How to Become Indispensable in 2025” guide — and so much more.
You won’t just read about UX for AI techniques: Storyboarding, Digital Twin, Value Matrix, AI-first RITE…
You’ll build them.
You’ll practice them.
You’ll master them.
💥 Built on 35+ real-world AI case studies — what worked, what failed, and why (extreme snark warning!)
🛠️ A full set of battle-tested UX tools with step-by-step exercises and practical examples
🚀 The exact frameworks UX leaders are using today to shape UX for LLMs, copilots, and AI Agents
💡 Learn how to lead cross-functional teams to pick the right use cases, shape the model, define the data, and deliver actual impact.
This book is designed for people who are ready to lead.
Not theory. Not fluff. Just the tools and thinking you need to become indispensable in the new AI normal.
📦 #1 New Release in Data Modeling and Design on Amazon: https://amzn.to/4l2ShyL
Peace,
Greg
P.S. Did you get the book? Found it useful? Then, I would be most obliged if you could leave me an Amazon review: https://amzn.to/4l2ShyL
(And if you hated the book, please keep it to yourself! Ahem, just kidding — well maybe not LOL — Anyway, please leave me a review! Much obliged.)
P.P.S. More FAQs
(NOTE: This section is made with ChatGPT)
❓Is RAG secure? What about user privacy?
Answer: RAG can be secure, but you must ensure PII and sensitive data are handled properly. Use on-prem or encrypted vector stores, and follow data governance practices. In other words, do not load your company’s proprietary data into public LLMs like ChatGPT! Ask your tech support for a private LLM instance! (You can still use a free ChatGPT to practice on Thai food, though. Or practice on the public docs.)
❓What tools do I need to start creating RAG files?
Answer: Just a text editor and access to an LLM like ChatGPT. Optional: vector DBs (like Pinecone or Weaviate) if you want to scale RAG to production-grade systems.
❓Can I use PDFs, Docs, or HTML pages as RAG sources?
Answer: Yes! Most LLMs can extract text from PDFs or web pages with a little preprocessing. You can also convert them into structured RAG files manually or programmatically.
❓How can I measure if my RAG file is working?
Answer: Use prompt tests: ask questions before/after loading the RAG. If answers are more specific, relevant, and correct, you’re on the right track. UX evaluation and user feedback are key.
Reply