Adding AI to your product without the risk: sources, evaluation, fallbacks and data
Sources, evaluation, fallbacks, cost limits and data handling: the engineering that turns an AI demo into a feature people can rely on.
Almost every product team is being asked the same question: where does AI fit in our product? The tools have made a convincing demo easy to build. An afternoon is enough to connect a language model to some documents and get impressive answers in a meeting.
The hard part comes next. Real users ask questions the demo never saw. Some answers are wrong, delivered with the same confidence as the right ones. Costs move with usage. Someone asks where customer data goes, and nobody is sure. This guide covers the engineering that closes the gap between the demo and a feature people can rely on. It's based on how we build AI features, including in our own product, AssistClue.
Start with the job, not the model
The most common mistake is starting with "we should use AI" and looking for somewhere to put it. Start instead with a specific job a user needs done, and a plain description of what a good result looks like.
Good starting points share three traits:
- The job is frequent and narrow. "Answer customer questions about our refund policy" beats "be a helpful assistant."
- A good answer can be recognized. Someone on your team can look at an answer and say whether it's right.
- A wrong answer is survivable. The user can check it, or a person reviews it before it matters. Avoid starting where one wrong answer causes real harm, such as medical, legal or financial decisions made without review.
Write the job down in one sentence, with two or three examples of real questions and the answers you would want. That sentence is the start of everything else in this guide.
Run a small pilot with a decision point
Before building anything big, run a pilot: one job, a limited set of users or internal testers, and an agreed decision at the end. The pilot should answer three questions:
- Is the quality good enough? Measured, not felt. More on this below.
- What does it cost per use? Real numbers from real usage, not a pricing-page estimate.
- Do users actually use it? A feature nobody touches doesn't need to be made reliable.
Agree in advance what result would mean "continue", "change course" or "stop". Pilots without a decision point tend to drift into production half-finished.
Ground answers in your data, and show the sources
Language models are trained on general text. They know nothing about your products, policies or customers unless you give them that information. And when they don't know, they tend to produce something plausible anyway.
The standard answer is retrieval: before the model answers, the system finds the most relevant passages in your own material and gives them to the model with the question, along with instructions to answer only from them. Showing which passages were used, as source citations, lets users check the answer instead of having to trust it.
Some practical points:
- Retrieval quality matters more than model choice. If the system finds the wrong passages, even the best model will give a wrong answer. Test retrieval on its own: for each test question, did it find the passage a person would have picked?
- Your documents are part of the product. Contradictory, outdated or duplicate documents produce contradictory answers. A pilot often reveals content problems that were always there.
- Show sources in a way people will use. A short quote and a link beats a list of file names.
In AssistClue, answers come from the user's own notes first and show where each answer came from. When the notes don't cover a question, a general AI answer is offered and clearly labeled as one. That pattern of grounded first, labeled otherwise, and never mixed silently works well beyond meeting assistants.
Measure quality with an evaluation set
You can't improve what you don't measure, and with AI features, "it seemed fine when I tried it" is how regressions reach users. The fix is an evaluation set: a fixed collection of real questions, each with the answer or the source passage a good response should contain.
How to build one:
- Collect real questions. Use support tickets, search logs, sales calls, or the questions from your pilot. Use the words users actually use, not tidied-up versions.
- Write down what a good answer must contain. It doesn't need to be a word-for-word answer. "Must mention the 14-day window and link to the refund policy" is enough.
- Include hard cases on purpose: questions your documents don't answer (the right response is "I don't know"), ambiguous questions, and questions that try to trick the system.
- Start small and grow it. A few dozen good questions is far better than none. Add every real failure you find, so it can never come back unnoticed.
Then run the evaluation set before every change: a new model, a new prompt, a change to retrieval, new documents. If the score drops, the change doesn't ship until you understand why. This one habit prevents most "the AI got worse and nobody noticed" incidents. It also gives you a fair way to compare providers when prices or models change.
Design the fallbacks before you need them
Every AI feature will meet questions it can't answer well. Decide in advance what happens:
- "I don't know" is a feature. A clear "I couldn't find that in our documents" with a route to a person is far better than a confident wrong answer.
- Label anything that isn't grounded. If you allow general-knowledge answers, users must be able to tell them apart from answers based on your material.
- Fail safe when the provider is down. AI providers have outages and rate limits. The rest of your product should keep working, with the AI feature showing a calm "unavailable right now" message.
- Hand off to a person. For anything that matters, the last step of a fallback should be a human: a support form, an email, a review queue.
Control the cost
AI costs scale with usage in a way most software costs don't. Every request has a price, and a long conversation or a large document costs more than a short one. Build controls in from the start:
- Measure cost per request in the pilot, so forecasts are based on real data.
- Set limits per user and overall, and decide what happens at the limit (for example, a polite message, not an error).
- Set a budget alert with the provider, and a hard spending cap where the provider supports one.
- Keep keys on the server. An AI key in a web or mobile app can be copied and used to spend your money.
- Use the smallest model that passes your evaluation set. Larger models are not automatically better for a narrow job, and the evaluation set tells you when a cheaper one is good enough.
Handle data properly
Data questions are easiest to answer at the start and hardest at the end. Write down, for each AI feature:
- What data is sent to which provider, including the user's question, the retrieved passages and any personal data inside them.
- Whether the provider may train on it. Many providers offer business or API terms under which your data isn't used for training by default. Some consumer plans do use data for training unless a setting is switched off. Check the current terms for the plan you actually use, and check again when they change.
- How long the provider keeps it. Even without training, providers often keep requests for a period for abuse monitoring.
- Where it's processed, if your customers or regulations care about location.
- What users are told. If people interact directly with an AI system, tell them. In the EU this is now a legal obligation for many systems under the AI Act (Article 50, applicable from August 2026), and it's good practice everywhere. Ask for consent where the law or your users expect it. AssistClue, for example, asks for consent in every session and shows a visible indicator.
Keep personal and confidential data out of AI requests unless the feature genuinely needs it. Often the passages can be filtered or anonymized before they're sent.
Guard against misuse
AI features open new ways for things to go wrong:
- Prompt injection. Text supplied by a user, or hidden in a document, can try to override your instructions ("ignore your rules and…"). Never let the model's output trigger an action, such as sending an email, changing data or spending money, without checks in your own code and, for anything important, a person's approval.
- Data leaking between users. Retrieval must respect permissions: a user should only ever get answers from documents they are allowed to see. Test this as carefully as any other access rule.
- Abuse of open endpoints. Rate limits and authentication on anything that calls a paid model.
Plan for change
AI features need more maintenance than most software. Models are updated or retired, prices change, your documents change, and users find new kinds of questions. Plan for:
- re-running the evaluation set on a schedule and whenever the provider announces a change;
- a named owner for the documents the feature answers from;
- reviewing unanswered and low-rated questions regularly, which is where the next improvements come from;
- a design that makes switching providers a configuration change, not a rewrite.
A short checklist
Before an AI feature reaches real users, you should be able to answer yes to each of these:
- The job is written down in one sentence, with examples of good answers.
- Answers are grounded in your own material, and users can see the sources.
- An evaluation set exists, includes hard and unanswerable cases, and runs before every change.
- The feature says "I don't know" when it should, and labels any general answers.
- Cost per request is measured, with per-user limits, an overall budget and an alert.
- Keys are on the server only.
- You know what data goes to which provider, whether it can be used for training, and how long it's kept.
- Users are told when they're interacting with AI, and consent is asked where needed.
- Model output can't trigger important actions without your own checks.
- Retrieval respects each user's permissions.
- Someone owns the documents and the evaluation results.
How we can help
Our AI features service starts with a small, measurable pilot and builds exactly what this guide describes: grounded answers with sources, an evaluation set, fallbacks, cost controls and data-handling notes, all handed over in your repository. Every engagement starts with a Product audit, which looks at your use case, your data and your constraints and ends with a pilot plan you can measure.
Questions about your own AI feature? Start with an audit