AI Agent Knowledge Base
The AI Knowledge Base lets you give your storefront agents access to your own documents so they can answer questions using information that is specific to your brand, products, and policies—not just generic AI knowledge.
Under the hood, the system uses RAG (Retrieval-Augmented Generation) combined with a vector knowledge base:
It retrieves relevant information from the documents you’ve uploaded using semantic search (vectors).
It augments the AI’s understanding by feeding those snippets into the model.
Then it generates a conversational answer grounded in your content.
This helps your agents:
Give accurate, policy-compliant answers.
Maintain consistent brand voice.
Reduce manual support load for repetitive questions.
Key concepts:
Knowledge Base Document – Any document you upload (e.g., PDF, text) that contains global information about your brand, products, or policies.
Chunking – Long documents are split into smaller pieces of text so the system can search and retrieve only the most relevant parts.
Embeddings / Vectors – Each chunk is converted into a numerical representation (a “vector”) and stored. This is what allows the AI to find “similar” or relevant text quickly.
Vector Knowledge Base – The collection of all these vectors, which the AI consults before answering merchant-specific questions.
Additional Chat Instructions – Freeform instructions that let you tell the AI how to use the knowledge base (e.g., “Only answer using the knowledge base.”).
Prerequisites:
An UltraCart account with access to the AI agent configuration.
At least one AI agent set up (or planned) for your storefront.
Documents you want to use as global knowledge (policies, guides, FAQs, etc.).
Quickstart / TL;DR
For experienced users, here’s the short version:
Open your AI agent configuration in the CRM and locate the Knowledge Base section.
Upload your core documents (policies, care guides, FAQs, brand info).
The system will process them (text extraction, image description, chunking, embeddings).
In Additional Chat Instructions, tell the agent how strictly to use the knowledge base (e.g., “Only answer using the knowledge base for policy questions.”).
The agent will proactively search the vector knowledge base before answering.
Test the agent with questions and refine as needed.
Do not treat the knowledge base as a dumping ground for SKU-level spreadsheets or tiny per-item quirks—this is a bad use case and will hurt answer quality.
Step-by-Step Instructions
Access the AI Knowledge Base
Log in to your UltraCart account.
Navigate to the UltraCart CRM
Navigate to the AI Agents > Agents
Select the AI agent you want to configure, and find the Knowledge Base section below the SMS Instructions.
You’ll see an interface to upload and manage documents (list of existing files, upload button, etc.).
Upload Knowledge Base Documents
Click the Upload Knowledge Base Documents button.
Choose one or more files from your computer (PDF or text-based documents).
Save/confirm the upload.
Note: Large documents can take longer to process. You don’t need to structure them perfectly—just make sure they’re readable and logically organized (headings, clear sections, etc.).
How Documents Are Processed (What Happens Behind the Scenes)
After upload, the system automatically prepares your documents for RAG:
Conversion to Text
All documents are converted into raw text.
For PDFs with images, the images are analyzed and converted into descriptions and summaries, so the AI can use information that appears only in images (e.g., diagrams, screenshots, labels).
Chunking
The text is split into smaller chunks (sections).
This prevents the model from having to read the entire document at once and improves retrieval accuracy.
Embeddings / Vector Storage
Each chunk is passed through an embedding model, which turns it into a numerical vector.
These vectors are stored securely and indexed so the system can quickly find the most relevant chunks when a question is asked.
This entire pipeline is automatic—no extra configuration is required from you.
How the Agent Uses the Vector Knowledge Base in Live Chats
When a customer asks a question that involves merchant-specific details, policies, product info, troubleshooting, or factual claims, the agent:
Summarizes the question into a concise internal query.
Proactively calls the vector search (internally:
searchKnowledgeBase) with that query, asking for 3–5 snippets from your documents.Receives a small set of relevant document snippets from your knowledge base.
Analyzes those snippets and uses them as the primary basis for its answer.
Generates a conversational response for the customer.
This lookup happens before the agent commits to an answer, even if the underlying AI model “thinks” it already knows the topic. The goal is to:
Avoid outdated or incorrect info in the model’s training data.
Ensure answers follow your specific policies and rules, not generic assumptions.
How results are handled:
If the snippets are clear and sufficient:
The agent bases its answer primarily on them, often explicitly referencing the policy or document section (e.g., “Per our policy, your item can be returned within 30 days…”).
If the snippets are partially relevant but incomplete:
The agent blends them with general knowledge to fill gaps and may clarify where it’s supplementing (e.g., “Our knowledge base confirms X; based on standard practices, Y also applies.”).
If snippets are irrelevant or missing key details:
The agent seeks clarification from the customer or, if necessary, escalates to a live agent (internally using something like
transferChatToLiveAgent).
Pairing Knowledge Base with Additional Chat Instructions
To control how the agent uses your knowledge base:
In your AI agent settings, locate Additional Chat Instructions (or similar).
Add directives such as:
“Always consult the knowledge base first for any questions about our policies, shipping, returns, warranty, pricing rules, or product care.”
“If the knowledge base does not clearly answer the question, say you don’t know and suggest contacting support or escalate to a human agent.”
“Use the knowledge base specifically for returns, warranty, product care, and installation questions; do not invent new policies.”
“You must follow the policies described in the knowledge base exactly—do not make exceptions or guesses.”
These instructions help ensure the AI:
Uses the knowledge base as the source of truth.
Doesn’t guess or hallucinate policies.
Stays on-brand and within your rules.
Marketer / Developer Note: Under the hood, the model is instructed to always call searchKnowledgeBase (with a concise natural-language query and num_snippets: 3–5) before answering merchant-specific questions, and then respond based on those snippets. The actual tool calls are internal; you only see the final answer.
Test and Refine
After uploading documents and setting instructions, open a test chat with the agent.
Ask questions that should be answered from your knowledge base, such as:
“How long do I have to return an item?”
“What is your international shipping policy?”
“How should I wash my merino wool t-shirt?”
“What warranty do you offer on electronics?”
Verify that the answers:
Match the policy text in your documents.
Use the correct conditions, timeframes, and exceptions.
If needed:
Clarify or reorganize your documents.
Strengthen your Additional Chat Instructions (e.g., “If the knowledge base does not contain the answer, say you do not know and escalate to a human.”).
Re-test until you’re satisfied with the responses.
Advanced Options and Formatting Recommendations
Designing Documents for Better Retrieval
You can greatly improve results by:
Using clear headings (H1/H2/H3) for each main topic.
Grouping related content into logical sections (e.g., “International Returns,” “Damaged Items,” “Warranty Claims”).
Avoiding giant, unstructured text blobs that cover many unrelated topics.
This helps the chunking process align with real sections, which improves retrieval quality.
Controlling Strictness of Knowledge Base Usage
You can adjust how strictly the agent relies on the knowledge base through your instructions:
Strict mode (high-safety):
“If you cannot find the answer in the knowledge base, say you do not know and suggest contacting support. Do not guess.”
Flexible mode (more conversational):
“Use the knowledge base when relevant, but you may use general product knowledge for generic questions (e.g., ‘What is a warranty?’). Make it clear when you’re speaking generally vs quoting our policy.”
Choose the approach that best fits your risk tolerance and support needs.
Using the Knowledge Base as Global, Shared Knowledge
The knowledge base is designed as global knowledge for your brand and organization. Think of it as:
Information that should apply across all customers and all products (within a category).
Content that rarely changes day-to-day (policies, core guides, brand values).
If you have multiple agents (e.g., pre-sales chat, post-purchase support, wholesale inquiries), they can all leverage the same global documents, with different instructions controlling how each agent uses them.
Best Practices & Tips
What You Should Upload
Strong candidates for the knowledge base include:
Shipping & Returns Policies
Clear rules for domestic and international orders, timeframes, conditions, exceptions, and fees.Brand Overview & Messaging
Brand story, values, mission, FAQs about your origin, how products are made, sustainability/ethical claims, etc.Product Care & Usage Guides (by category)
How to wash and care for clothing.
How to care for leather and specialty materials.
How to store and use supplements, cosmetics, or food products.
Sizing & Fit Guides
General sizing advice, fit notes (“runs small,” “true to size”), measurement instructions, and size conversion charts.Warranty & Repairs Information
What’s covered, how long coverage lasts, examples of valid/invalid claims, and how to initiate a warranty claim.Setup & Installation Guides
Manuals, how-to steps, troubleshooting checklists for physical or digital products. Images and diagrams are fine; they’ll be converted into descriptions for the AI.Support Playbooks & Escalation Rules
Internal guidelines for how issues should be handled, what information to collect, and when to escalate to a human.Wholesale / B2B Terms
Minimum order quantities, lead times, payment terms, shipping arrangements, and other B2B-specific info.
What You Should NOT Use the Knowledge Base For
The following are bad uses of the knowledge base, especially for stores with lots of SKUs, variations, or frequently changing catalogs. Doing this will significantly increase the risk of incorrect or misleading answers:
Massive SKU-level catalogs
Do not upload huge documents or exports that list thousands of products, each with slightly different specs or attributes.Frequently changing data
Avoid putting information that changes often (prices, live inventory levels, daily/weekly promotions) into the knowledge base. The AI cannot keep this perfectly in sync.Hyper-specific one-off notes that only apply to a specific item
For example, “Item #12345 has a special extended warranty if purchased during a limited promotion in 2022.” These narrow details are likely to be retrieved out of context and applied incorrectly.
When the knowledge base is filled with extremely granular, per-item details, the retrieval process may:
Pull chunks that look relevant but refer to the wrong SKU or variation.
Mix details from similar products (e.g., different sizes, colors, models) into one answer.
Confuse customers and lead to incorrect expectations.
Strong recommendation: Keep the knowledge base focused on global, reusable rules and explanations, and handle per-SKU specifics through your storefront’s product data or other structured integrations.
Troubleshooting / FAQ
Q1: The agent is giving answers that don’t match my policies. What should I do?
Confirm that your policies are actually uploaded to the knowledge base and are clearly written.
Strengthen your Additional Chat Instructions (e.g., “Always use the knowledge base for policy questions and never invent policies.”).
Test again using questions that map directly to sections in your policy document.
Q2: The agent is hallucinating or making up details that aren’t in my documents.
Add an instruction: “If the knowledge base does not contain the answer, say you do not know and suggest contacting support.”
Make sure your policy/guide documents clearly cover the common questions you’re asking.
Consider breaking large, mixed-topic documents into separate, focused documents.
Q3: The agent seems to ignore my knowledge base and gives generic answers.
Check that the knowledge base is enabled and attached to the correct agent.
Verify your instructions aren’t telling the agent to rely mostly on general knowledge.
Ask very specific questions that can only be answered from your documents to test (e.g., “Exactly how many days do I have to return an item?”).
Q4: Customers are getting product-specific info wrong (wrong size, wrong warranty, wrong model).
Review what you’ve uploaded: if you’ve added massive SKU lists or hyper-specific per-item details, remove or reduce them.
Move toward category-level, global info (e.g., “All items in this category have a 1-year warranty”) rather than item-level quirks.
Update instructions to avoid mixing product details across items.
Q5: My file upload failed or is stuck processing.
Ensure the file format is supported (preferably PDF or common text formats).
Try simplifying or splitting very large documents into smaller ones.
If the problem persists, contact UltraCart support with the file name and approximate size.
Next Steps
By setting up the AI Knowledge Base and vector search, you’ve given your storefront agents a trusted source of truth for your brand, products, and policies. Combined with clear Additional Chat Instructions, this helps you:
Deliver more accurate, consistent answers.
Reduce repetitive questions for your support team.
Keep your customer experience aligned with your real policies and brand voice.
Next steps:
Expand your knowledge base with additional guides (care, sizing, installation, B2B terms, etc.).
Refine your agent instructions based on real customer conversations.
Explore related features, such as:
Once you’re happy with the behavior, you can confidently roll out your AI-powered support experience across your storefront, knowing it’s grounded in the documents you control and proactively consulted on every merchant-specific question.