AI Staff

Overview

Review chats, create learnings, approve trusted knowledge, and train AI Staff safely.

Not signed in No active session
Waiting for Firebase initialization.
Training Operations

Turn real merchant chats into structured learnings and approved AI knowledge.

This workspace reads your existing chat threads, lets you extract training signals, and moves approved answers into a trusted knowledge base for AI Staff.

Current source

chats

Existing merchant-user chat system
Threads chats
Messages subcollection
Learnings pending queue
Knowledge approved only

Merchants

Realtime

Count from Firestore merchant collection

Chat Threads

Realtime

Training source threads from chats

Pending Learnings

Review

Waiting for approval or rejection

Approved Knowledge

Trusted

Safe records available for AI Staff

Training Pipeline

How AI Staff learns in this app

Aligned
01

Select a real chat thread

Use the existing merchant-user chat conversations as source material.

02

Create a learning record

Extract the intent, prior answer, customer reply, and corrected final answer.

03

Add direct admin knowledge

Admins can type approved question-and-answer pairs directly into the knowledge base.

04

Approve into knowledge

Only trusted records become AI Staff knowledge for future use.

Current Focus

Training-only workspace

No live reply controls here

This app is only for training, learnings, and approved knowledge management.

Scope locked

Uses existing chat infrastructure

The training app reads from your current chats collection and messages subcollections.

Source of truth

Direct admin input supported

Knowledge can now come from manual admin-approved Q&A, not only from chat learnings.

Manual knowledge enabled

Governance

Training guardrails

Chat history as source only Enabled
Pending approval required Enabled
Manual admin knowledge Enabled
Auto-learn everything Blocked

Realtime Health

Connection state

Firebase config Checking
Auth session Waiting
Firestore Waiting

Merchant Chat Inbox

Realtime threads from chats

No chat threads loaded yet.

Conversation

Select a chat

No thread selected
Choose a thread from the left to view its actual messages.
No conversation selected yet.
Knowledge Command Center

Organize the AI brain into clean layers: approved answers, global knowledge, and merchant context.

Keep AI Staff smarter and safer by separating reusable platform knowledge from merchant-specific live context. Admins can now manage trusted answers, system-wide guidance, and structured merchant data from one polished workspace.

AI Layers Approved · Global · Context
Primary Goal Give AI better facts before OpenAI rewrites the reply.

Approved Knowledge

Trusted business answers

Used by AI
Showing all approved knowledge.
No approved knowledge loaded yet.

How Approved Knowledge Works

Final trusted answer layer

What belongs here

FAQ answers, payment guidance, policy replies, pickup explanations, and approved answer patterns that AI Staff can safely use as factual anchors.

How AI uses it

AI Staff reads this first for the correct meaning, then OpenAI rewrites the final wording so the response sounds more human and less robotic.

Best practice

Keep facts short, clear, and correct. Put operational numbers and live merchant settings in Merchant Context, not in plain answer text only.

Global Knowledge

RunZa-wide AI guidance

Homepage mode
Use this when the user has not selected a merchant yet. Store platform-level explainers, delivery basics, locker flow, ordering process, and system-wide policies here.
No global knowledge loaded yet.

Global Knowledge Editor

Create platform-level knowledge

Mode: Create global knowledge
Add reusable RunZa-wide knowledge for homepage-style AI conversations.

Merchant Context

Structured merchant info

Live config layer
This is where you store exact merchant data that AI should read as structured facts: location, lat/lng, hours, delivery fee setup, payment methods, radius, and pickup status.
No merchant context records loaded yet.

Merchant Context Editor

Input exact merchant details

Mode: Create merchant context
Save structured merchant info here so AI Staff can answer location, delivery fee, and store detail questions more accurately.

Pending Learnings

Approval queue

Needs review
No pending learnings loaded yet.

Review Strategy

What belongs in each layer

Global Knowledge

Use for homepage-level guidance, general RunZa flow, locker explainer, and platform-wide answers.

Merchant Context

Use for exact merchant facts like address, pin location, fee setup, radius, hours, and payment methods.

Approved Knowledge

Use for trusted answer patterns and policy replies that AI can safely rephrase for users.

Training Source

Selected chat context

No chat selected yet. Open the Chats tab and choose a conversation for training.

Latest customer message

Previous merchant / AI-style reply

Create Learning

Save a pending training record

Select a chat first, then create a structured learning record.

Test Console

Prompt the AI staff

Sample Output

AI response preview

Sure — the prep time of Cordon Bleu is around 25 minutes based on the merchant menu data.

Internal Access

Firebase sign in

Sign in with your Firebase Authentication account.

Collection Mapping

Current Firestore paths

Merchants merchants
Threads chats
Learnings ai_staff_learnings
Knowledge ai_staff_knowledge
Global Knowledge ai_staff_global_knowledge
Merchant Context merchant_ai_context

This app reads from chats and saves structured learning records into ai_staff_learnings, approved answer patterns into ai_staff_knowledge, system-wide homepage guidance into ai_staff_global_knowledge, and merchant operational facts into merchant_ai_context.