Retrieval-augmented generation, or RAG, lets staff ask a question in plain English and have the app search company documents for relevant passages. An AI model uses those passages to write an answer that can include links for staff to check.
Start with the folder staff reach for at the counter
In this illustrative example, a furniture retailer wants showroom staff to answer returns questions while the customer is still at the counter. The files are fictional. They include a current returns policy, a manager’s exception guide and a seasonal clearance sheet. A useful first question is whether a clearance chair bought in store can come back. The answer depends on the sale terms and purchase date, even if every file happens to contain the word “returns.” The owner of the returns process should write down the facts staff need before the search goes live.
Assign someone to each policy. The retail operations lead approves the returns policy and its exceptions. Showroom staff can flag an answer that sent them to the wrong page. Give them a place to send the flag, and assign the correction to the policy owner so the same change reaches everyone who uses the document.
Mark the version and scope. Record the effective date, channels it applies to and the link to the approved copy. For policies tied to purchase dates, keep the historical version available with a clear date range. A policy that starts Monday could be irrelevant to a chair sold on Saturday. Remove superseded drafts from routine search and decide which archived versions are eligible for historical questions.
Look at the text the search actually sees. If the clearance sheet is a scan, test the extracted text against the page. Keep a heading with the paragraphs it governs and a table’s column names with the rows they describe. A reader who finds “eligible” should also be able to see the condition printed next to it. Our guide to extracting data from PDFs covers the source material that deserves a manual check.
Carry employee permissions into search. A showroom employee can see the general returns policy. The manager’s exception guide stays in the manager group. Have the app apply the employee’s access rules before passing passages to the model. Microsoft documents the principle of filtering during search. Test with a showroom account and a manager account, then remove a test user from the manager group and verify that passages from the guide stop appearing in search results and answers.
Write the expected answer beside each pilot question. Ask staff to contribute the questions they already ask a supervisor. Include a question that the approved documents leave unanswered and one that depends on a date. Record which passage should come back, when the employee should be asked for more detail and when the decision belongs to a manager.
The clerk can follow the answer back to the page
A search index organizes text for lookup. Microsoft’s guide to RAG and indexes describes how the index can store the source document’s title and address. When splitting a document into passages, keep those fields and the page or heading for each passage. Have the clerk check that the link in the answer opens at the clearance condition.
Suppose the clearance sheet says to check whether the receipt marks the chair as final sale. Score the passage and the answer as two checks in the pilot. If the app finds the clearance sheet and approves the return before the receipt check, the passage passes and the answer fails. The clerk should see the link to the clearance sheet and a request to check the receipt for a final-sale mark. If search finds nothing, the app should say it found no matching policy and send the clerk to the policy owner. If the app eventually goes directly to customers, set the handoff rules for customer service before widening access.
Try the words a new employee actually uses at the counter. In this example, a clerk might call a chair a floor model while the policy only mentions display merchandise. If the policy owner confirms that the terms mean the same thing here, have the person who maintains search add them to the synonym settings for this policy index or have the policy owner put both terms in the approved document. Keep a record of which questions sent the clerk to a manager and why. A missing rule needs a policy decision. If search finds the right rule buried three pages down, check whether the passage includes the condition the clerk needs.
A month of search and answers at the furniture store
For this illustration, 60 employees ask 10 questions per workday across 20 workdays, for 12,000 questions. Assume one search request and one model call per question. The app searches by keyword and filters by the requester’s access and the scope of the policy. It stores one passage per search record, for 18,000 records in a single index. The question, app instructions and passages together average 2,400 input tokens per call. Tokens are the units the model provider uses to price the text it processes. The example budgets an average of 320 billable output tokens per call, including reasoning tokens. GPT-6 Luna reasons at medium effort by default, so set the effort level explicitly and measure billable output per call in the pilot.
- Search. On Algolia Grow for keyword search, the first 10,000 monthly search requests are included, then each additional 1,000 costs $0.50. The first 100,000 records are included, after which the listed rate is $0.40 per 1,000. The 18,000 records fit the allowance and the extra 2,000 requests cost $1.00 (rates read Nov. 26, 2026).
- Input. OpenAI recommends GPT-6 Luna for high-volume work where cost matters. At its $0.10 standard rate per million uncached input tokens, the month’s 28.8 million input tokens cost $2.88 (Nov. 26, 2026).
- Output. At $0.50 per million output tokens, the month’s 3.84 million billable output tokens cost $1.92 (Nov. 26, 2026).
At the Nov. 26, 2026 rates, GPT-6 Luna costs $4.80, for a subtotal of $5.80 a month with search. The estimate assumes the full search allowance is available to this app and uses standard uncached model rates.
We’d pay for GPT-6.2 Sol if it cut corrections enough in the pilot to justify the extra cost on questions that combine purchase dates and sale terms. Its standard short-context rates are $2.00 per million uncached input tokens and $10.00 per million output tokens (Nov. 26, 2026). At the same volumes, that’s $57.60 for input and $38.40 for output, or $96.00 for the model and $97 with search. Sol requires reasoning on each call, and OpenAI bills reasoning tokens as output. The 320-output-token average may be low for Sol, so measure billable output per call in the pilot before budgeting.
The estimate leaves application hosting, file sync, scanned document processing and staff time to a separate budget. Price the first build separately, including permissions, a way to flag wrong answers and time for the policy owner to resolve them. If the team needs follow-up questions to use earlier answers, count the conversation text actually resent to the model and any extra searches. The monitoring guide shows where to collect per-run usage and failures.
Questions to settle before staff use it
Does RAG leak our data?
Your app determines which text goes to search, to the model and to the logs. In this cloud example the search provider holds the indexed passages. The model provider receives the question and any passages the app supplies. Ask each provider what data it retains, who can see it and which settings the contract covers. OpenAI’s API data controls distinguish model training from abuse monitoring logs and application state. Keep customer details out of the pilot index and test the access boundaries using ordinary staff accounts. Include links, passages and error logs in the check.
How current are the answers?
They depend on which document version the search can find at the time of the question. If the retailer publishes its holiday returns policy at opening and updates the index overnight, the new policy may be missing at the counter until the next sync. Agree on a sync deadline with the policy owner. Show when the index last updated and make the app flag an overdue update on the affected folder. Test deletion and access changes as well as edits.
What if the documents disagree?
Check which source governs the specific sale. The newer document could apply only to online orders. If both passages apply and give different instructions, show both links and ask the retail operations lead to settle the case. Set the precedence rule in the documents and update the index after the correction. Give the employee a route to resolve the customer’s return while the policy owner fixes the source material.
Sources
- Microsoft Learn, retrieval augmented generation and indexes. The search-to-answer flow and source metadata.
- Microsoft Learn, document-level access control. Applying permissions to the search query.
- Algolia Grow pricing. Search requests and stored records. Read Nov. 26, 2026.
- Algolia’s guide to counting search requests and records. What counts as a stored record.
- Algolia’s synonym settings. Matching equivalent terms in search.
- OpenAI model catalog. Guidance on choosing a model.
- OpenAI’s standard token rates for GPT-6 Luna, read Nov. 26, 2026.
- OpenAI GPT-6.2 Sol and the reasoning model guide. Standard token rates, reasoning settings and billing. Read Nov. 26, 2026.
- OpenAI API data controls. How training use, abuse monitoring logs and application state are handled.