How GPT-4 Understands Your Products, Orders and Conversations
A technical look at how Replio uses GPT-4 with function calling, RAG, and conversation context to generate responses that are accurate, personalized, and contextually aware.
Replio Team

How GPT-4 Understands Your Products, Orders and Conversations
When a customer asks "where is my package?", a generic chatbot would reply with a template. Replio replies with the actual tracking number, current location, and estimated delivery date. Here is how we make that work.
Beyond Simple Prompting
Early AI customer service tools worked by stuffing the customer's message into a prompt and hoping for the best. The results were generic, often inaccurate, and sometimes hallucinated order details that did not exist.
Replio takes a different approach. Before the AI writes a single word, we build a context package that includes everything relevant to the conversation:
- Conversation history — the full message thread, not just the latest message
- Order data — products purchased, prices, dates, quantities
- Shipping status — real-time tracking from DHL
- Product catalog — specifications, compatibility info, stock status
- Seller knowledge base — custom policies, FAQs, return procedures
- Customer history — previous orders, past conversations, dispute records
This context is structured and passed to GPT-4 alongside the customer's message. The AI does not need to guess or hallucinate — the facts are provided.
Function Calling: Real-Time Data
Some information cannot be pre-loaded. DHL tracking status changes hourly. A product might go out of stock between sync cycles. For these cases, Replio uses GPT-4 function calling.
When the AI determines it needs fresh data, it can call functions in real time:
get_dhl_tracking(tracking_number)— fetches live shipment statussearch_google_drive(query)— finds relevant files from your connected Drivecreate_todoist_task(title, description)— creates follow-up tasks
The AI decides when to use these tools based on the conversation context. If a customer asks about delivery and the last tracking update was 6+ hours ago, it will fetch fresh data before responding.
The Knowledge Base: Your AI's Memory
Every Allegro store is different. Product specifications, return policies, shipping methods, brand voice — these are unique to each seller. The knowledge base is where you teach the AI about your specific business.
How it works:
- You upload documents (text, PDFs) or type instructions directly
- Replio processes and indexes them using vector embeddings
- When generating a response, the AI retrieves relevant knowledge base entries based on the customer's question
- Retrieved context is included in the prompt alongside order data
This is a form of Retrieval-Augmented Generation (RAG). Instead of fine-tuning a model (expensive, slow, hard to update), we retrieve relevant context at query time. This means you can update your knowledge base instantly and see the change in the next AI response.
Personas: Controlling the Voice
Different situations call for different tones. A response about shipping status should be informative and brief. A response to a complaint needs empathy and care.
Replio offers communication personas:
- Professional — formal, precise, business-appropriate
- Friendly — warm, conversational, uses the customer's first name
- Concise — shortest possible response that fully answers the question
Each persona modifies the system prompt that guides GPT-4's output. You choose the default for your store and can switch per-conversation if needed.
Accuracy and Guardrails
AI can be wrong. We take this seriously with multiple safeguards:
Fact grounding — the AI is instructed to only reference data that was explicitly provided in the context. If it does not have tracking info, it says "I'll check and get back to you" instead of making up a number.
Human review — by default, every AI response requires your approval before sending. You are always the last checkpoint.
Confidence indicators — when the AI is less certain about a response (e.g., the knowledge base does not cover the specific product question), the UI indicates this so you know to review more carefully.
What This Means for You
You do not need to understand GPT-4, function calling, or RAG to use Replio. You connect your Allegro account, optionally add your product knowledge, and start reviewing AI responses.
But knowing what happens behind the scenes helps explain why the responses feel different from other tools. It is not magic — it is careful engineering that gives the AI the right information at the right time.
The result: responses that sound like you wrote them, because they are based on your data, your products, and your policies.