Knowledge base (RAG)
How telmini learns from your website, files and Q&A, and how it uses them when it answers.
The AI agent answers from what you teach it under Training: pages from your website, files you upload and question-and-answer pairs. When a visitor asks something, telmini looks up the most relevant passages and gives only those to the AI, so answers come from your own content instead of guesses.
Ways to teach it
- Web pages: enter a URL and telmini crawls your site. It reads 50 pages unless you set another number (up to 500), and your plan's document limit can stop it sooner.
- Files: upload one file at a time, up to 25 MB: PDF, DOCX, TXT, Markdown, CSV or JSON. PDFs need a text layer (scanned pages can't be read). Old .doc files, spreadsheets and slides are not supported.
- Q&A: add question-and-answer pairs one by one, or paste CSV text under Bulk import (CSV).
Files and Q&A pairs can be hidden per platform, for example in your iOS app. Hidden items are not used in answers to visitors on that platform.
Updates: short-term news
News that only holds for a while, such as a promotion, an outage or a new rule, doesn't need to be written up as a document. Write one sentence under "Training › Updates", for example "Black Friday: 20% off everything from November 27 to December 1", or just tell the AI setup assistant "Tell the AI ……".
- Once it's processed (the status becomes "Applied" or "Pending activation"), it goes with every AI reply, and the AI follows it.
- If it conflicts with older rules or the knowledge base, the new one wins; if two updates conflict, the one posted later wins.
- The AI won't treat a promotion that hasn't started yet as already in effect; when customers ask, it tells them the date it starts. Customers who use a short name (such as "BF") or ask in Simplified Chinese characters still match the same promotion.
- No longer needed: delete it on the same page. The AI doesn't use an update whose status is "Failed"; rewrite it clearly and post it again.
Learning from your agents' answers
Conversations your agents answered well can be sent to the AI to learn from: in the inbox, choose "⋯" → "Select", tick the conversations and press "Send to learn", or press "AI got it wrong — learn from the agent's answer" in a conversation. The Training page also lists conversations the AI may have got wrong, for you to pick from.
- Conversations that aren't resolved can be sent too. When the system picks them itself, it only picks conversations that have been quiet for 2 hours or more, so a chat that's still going won't be taken.
- Everything learned goes to "To review" first; the AI only uses it after an owner or admin approves it.
- Conversations without a reply from a human agent aren't learned from.
- Each send to learn uses AI credits as usual.
What happens to your content
- telmini extracts the text and splits it into passages of about 2,000 characters, with a short overlap between neighbouring passages. Each Q&A pair stays one passage.
- Each passage gets an embedding (by default OpenAI
text-embedding-3-small) and is stored in PostgreSQL with pgvector. - The item then shows Ready. If the text can't be read it shows Failed, and you can retry it.
- If no embedding can be made, the passages are still stored and found by keyword search.
How answers use it
- Greetings and small talk skip the lookup. For other messages, telmini searches with the visitor's recent messages and compares embeddings by cosine similarity.
- Passages below a similarity threshold are dropped. The best ones go to the AI: 5 by default, and at most 2 from any one document.
- The passages are added to the AI's instructions as reference material. The AI is told not to follow instructions written inside them, and not to invent product facts they don't contain; it asks a question or offers a person instead.
- When a visitor asks about a product fact and nothing relevant is found, telmini does not let the AI guess. It says it doesn't have that information and hands the chat to your team, unless automatic hand-off is turned off.
Your content can be in one language and your visitors in another: the AI translates the facts it uses into the visitor's language.
Settings
Under AI Agent, in the Knowledge base (RAG) section:
- Enable knowledge base retrieval (RAG): switch it off only if the AI shouldn't use your content at all, for example a small-talk bot.
- Top-K chunks: how many passages the AI gets (default 5).
- Embedding model: with your own AI key you can also set an embedding endpoint and key, separate from the chat endpoint. The embeddings must have 1,536 dimensions, like
text-embedding-3-small.
Hosted AI or your own key
With hosted AI you don't need a key; with your own key, your provider bills you directly. Either way your plan's monthly AI reply limit applies. Repeated questions reuse a cached search embedding for 24 hours.