A RAG chatbot that answers from your pages and cites its sources
Answers from what you have published, a citation on every sentence, and a person when the visitor wants one.
In the adminChatbotsInbox
A Quilzo chatbot is retrieval-augmented generation (RAG) over your own published pages. It retrieves passages by keywords and by meaning, answers only from them, and puts a citation on every sentence. With a model connected, each sentence is checked against the passage it cites and dropped if the passage does not support it. Without a model it answers extractively, quoting the passages. Nothing a visitor asks is stored, unless you choose to keep what it could not answer.
Create a chatbot
-
Name it and choose what it reads
Open Content › Chatbots and fill in New chatbot. By default a chatbot reads every published page. Limit it to the pages it should know about, so it cannot answer from a page you did not mean it to read.

Your chatbots, and a new one. From the command line, the same chatbot with everything turned on:
quilzo assistant add help --title "Marginalia help" \ --greeting "Ask about orders, delivery and returns." \ --pages returns,delivery,about,stockists,wholesale \ --public --launcher \ --suggest "Can I return opened ink?|How long does delivery to Canada take?|Where can I buy in person?" \ --handoff --voice --translateOption What it does --pages,--excludePage prefixes it may, and may not, read. --documentsFiles from the media library it may also read, such as PDFs. --collectionsRecord collections it answers from too, such as products,events(Answers from these records too). Published records only, and never a field named for a person: an email address, a telephone number, an address.--modelAnswer with the configured model, every sentence checked against its source. Without it, answers are extractive. --routeWith --model, the gateway route that answers first (Model that answers first): a route on the Models screen, or the model one serves. The others stand behind it.--route-onlyKeep visitors' words to that route and no other (Only that one). When it cannot answer, the chatbot quotes your pages instead. --publicServe it on the site at /ask/NAME.--launcherPut a button on the site's pages that opens it beside the page. Style it with --launcher-style,--launcher-sideand--panel.--embedOther sites allowed to show it in a frame. --staticAnswer on static copies of the site too, in the visitor's browser, from published pages only. --handoffLet a visitor ask for a person. The conversation goes to the Inbox. --voice,--translateSpeech and translation on the visitor's own device, where the browser offers them. --suggest,--nudgeQuestions offered before the first, and a short line shown beside the button once a visit. -
Try it before anybody else does
On the chatbot's page, ask something under Try it. You see the answer, every passage it retrieved with its keyword, vector, heading and meaning rank, and anything it was not allowed to read. Or:
quilzo assistant ask help "Can I return an opened bottle of ink?"Thirty days, unused, and we pay the postage back. [1] Ink is the exception: once a bottle is opened we cannot resell it, so we cannot take it back. [1] … [1] Returns (returns) [2] Delivery (delivery) extractive mode — extractive by declaration
Each chatbot's settings and its test console. -
Measure it
Write questions you know the answers to, with the page each should come from, and questions the site does not answer, which it should refuse. A test set of only answerable questions rewards a chatbot that always answers, which is the opposite of what a site wants.
{"question": "Can I return an opened bottle of ink?", "page": "returns", "contains": ["ink"]} {"question": "How long does ink take to reach Canada?", "page": "delivery"} {"question": "What is the weather in Lisbon?"}quilzo assistant eval help cases.jsonl3 case(s): 2 answerable, 1 not right page first 1/2 right page retrieved 1/2 (MRR 0.50) answered 1/2 refused correctly 1/1 sentences removed 0 refused "How long does ink take to reach Canada?", which delivery answersThat last line is a real finding: the Delivery page says ink goes "outside Europe … by surface", and the question says "Canada". Rewording the page, or turning on
--model, is the fix, and the evaluation says when it worked.
Find passages by meaning
By default a chatbot finds passages by their words, here, and nothing is sent anywhere to do it. Name a route added with --embeds (see Models) in chatbot.embeddings, and chatbots that answer with a model find passages by what they mean too: "can I send back opened ink" finds the passage about returns that never says "send back".
quilzo config set chatbot.embeddings meaning --accept-risk "returns questions are worded every way"
quilzo assistant embed help
The admin server embeds the site's published passages after each publish, and quilzo assistant embed [NAME] does it now. Each question to such a chatbot is embedded as it is asked, with personal data masked first. A chatbot that only quotes its pages, or is kept to one route, never sends either. A passage that shares too few of a question's words is answered from only when it is at least chatbot.embeddings_floor percent alike, 55 by default. Under Try it, the Meaning rank column shows each passage's rank and how alike it is to the question, which is what to look at before changing the floor.
Put it on the site
A public chatbot has its own page at /ask/NAME. Every sentence links to its source, and the page tells visitors they are talking to an automated assistant, as Article 50 of the EU AI Act requires.

With --launcher, a button on every page opens the chatbot beside what the visitor is reading:

Speech is recognised on the visitor's device, and nothing they say leaves it. Translation uses the browser's on-device translator, so the answer is still the site's own words.
Hand the conversation to a person
With --handoff, a visitor can choose Talk to a person instead. Unlike questions to the chatbot, that conversation is kept, for 30 days after it last moves by default and 90 at most, and the visitor is told so before sending.

Answer from Content › Inbox, or:
quilzo inbox list
quilzo inbox reply help/ID "Sorry about that. A new bottle goes out today."
quilzo inbox close help/ID
A visitor asking for a person also tells staff, through notify.staff: an email address or a chat channel (see Telling staff). The notice says which chatbot and how many are waiting, never who or what they wrote.
What it could not answer
A question the chatbot could not answer is the page your site is missing. With chatbot.gaps on (it is off by default), those questions are kept, for chatbot.gaps_days, 30 by default. Email addresses, telephone numbers, card, bank and national identity numbers, and any other run of eight digits or more are masked before anything is written, and nobody is named.
quilzo config set chatbot.gaps true --accept-risk "find what the help pages do not say"
The chatbot's page groups them by what they are about, under What it could not answer, each group with Write the page, which starts a page for it, and Needs no page, which closes it. Or:
quilzo assistant gaps help
visitors said 5 answers helped and 2 did not, in the last 30 days
Is there a student discount? asked 2 times, last 4 Nov [open]
Do you do discounts for students?
group de3461ce80
My email is [email], can I change the delivery address on my order? asked 2 times, last 4 Nov [open]
Can I change the delivery address after I have ordered?
group b6dea193cd
Can I pay with PayPal? asked once, last 4 Nov [open; 1 said the answer did not help]
group 261e0173e9
Once the site is published, the admin server asks the chatbot each open group's questions again, at most 25 questions in one go, and closes a group it now answers, naming the page it answered from. Ask them again now, or quilzo assistant gaps help --check, does the same at once; --close KEY closes a group that needs no page. A group asked about again after it was closed opens again.

An agent can draft those pages. With chatbot.gaps_agents on, an agent holding list_chatbot_gaps reads the groups, masked, and its model's provider sees them too; what it drafts goes to a person for review, and publishing it closes the group as any page does.
Whether its answers helped
Under each answer on the site, the visitor is asked Did this answer help? with Yes and No. Each is counted with nothing about who said so, and the chatbot's page shows how many helped in the days questions are kept. With chatbot.gaps on, a question whose answer did not help joins what it could not answer, marked so. Asking it again shows nothing about whether the answer helps now, so it waits for a person to close it.
Let it offer to do something
A chatbot can offer a link, a form, or one of your agents, and never more. It proposes, and the visitor chooses. A form is pre-filled, the visitor sends it, and the form's own checks apply:
quilzo assistant action help wholesale --kind form --target wholesale \
--description "Ask about wholesale prices" --fields name,email,message
An agent action asks one of your agents to do something for the visitor, such as finding where an order is. The visitor sees what will be asked, corrects anything wrong, and presses Ask:
quilzo secret set marginalia-visitors < visitor-key
quilzo assistant action help order-status --kind agent --target order-desk \
--description "Check where an order is" --fields order_ref,postcode \
--identity --identity-secret marginalia-visitors
- The agent runs on its sponsor's authority, and never more than an author's. It runs as a reader, changing nothing, unless the action says
--writes. Then it may draft and propose, and anything it asks of a person waits for one. - What the visitor typed is somebody else's words. It reaches the agent as data, not instructions, and the run is tainted from its first step (see Know what it read).
- Who the visitor is comes only from the host site, never from what they type. With
--identity, the action is offered only to a visitor whose page carries a token the host site signed with HMAC-SHA256, using the key sealed as--identity-secret. The token isbase64url(JSON claims), a dot, andbase64url(HMAC-SHA256(key, first part)), withexpno more than a day ahead, and goes on the chatbot's address as?v=TOKEN. - The visitor sees the agent's answer only when the run read nothing private and waits for nobody. Otherwise they are told that a person needs to look at it, and will.