AI

How to stop your AI agent making things up: grounding with a knowledge base

How to build a knowledge base that keeps your AI agent accurate: which sources to add, how to organise and test them, and how to stop made-up answers.

LTLiveCart team · 3 min read

An AI agent is only as accurate as the material it answers from. "Grounding" means restricting the agent to sources you approve, so it answers from your shipping policy rather than a plausible guess. Getting that material right is the single biggest factor in whether customers trust your agent.

How grounding works, briefly

When a customer asks a question, the system first retrieves the most relevant passages from your knowledge base, then the model writes an answer from those passages. This is often called retrieval-augmented generation, or RAG. If nothing relevant is found, a grounded agent says so and offers a fallback, instead of filling the gap.

Which sources to add first

Start with the documents behind your most common questions:

  1. Shipping: times by region, costs, carriers, cut-off times
  2. Returns and exchanges: windows, conditions, exclusions, how to start
  3. Sizing and fit: size charts, fit notes per product line
  4. Care and materials
  5. Warranty and repairs
  6. Payments and discounts: accepted methods, current offers
  7. Store information: locations, hours, contact options

Then add your website so product and category pages are searchable, and an API source for anything that changes often, like stock.

Write for retrieval

Documents written for humans sometimes retrieve poorly. A few habits help:

  • One topic per section, with a clear heading ("Returns for sale items").
  • State facts plainly. "Returns are accepted within 30 days of delivery" beats "We're happy to help with returns!".
  • Avoid contradictions. If the FAQ says 30 days and the policy page says 14, the agent may quote either.
  • Date anything temporary, like holiday cut-offs, and remove it afterwards.

Organise into sets

As the knowledge base grows, group sources into sets such as Shipping, Returns and Sizing, and choose which agents use which sets. A shared central knowledge base means one edit fixes every agent and channel. LiveCart also supports agent-only sources for material a single agent needs.

Test with real questions

Before launch, take fifty real customer questions and ask them in the test console. For each answer, check:

  • Is it correct?
  • Did it cite the right source?
  • Is the wording something you'd send?

Fix the source, not the answer. If the agent got returns wrong, the returns document is usually unclear or contradicted somewhere else.

Keep it fresh

Set a monthly reminder to review handed-off conversations. Every "the agent didn't know" is a missing or unclear source. Re-sync your website after big changes, and remove expired promotions promptly.

Grounding won't make an agent perfect, but it turns errors from mysterious into fixable, and that's what makes an AI agent safe to put in front of customers. See how LiveCart's knowledge base handles sources, sets and citations.

  • knowledge base
  • grounding
  • RAG
  • accuracy
LTWritten byLiveCart team

Try it on your own store

Paste one snippet. Ask it what your customers ask.

Change these any time from the footer.