To make your website chatbot answer from your own data, use RAG: your documents, pages and FAQs are split into small chunks and stored in a search index; for each question the system retrieves the closest chunks and asks the model to answer only from them, citing the source. Add instructions that forbid guessing, a handoff to staff or a contact form when no answer exists, and test it with real Arabic questions across dialects before launch.
- add ai chatbot to website
- chatbot that answers from my documents
- train a chatbot on company data
- arabic chatbot for website
- how to stop a chatbot from making things up
How do you add a chatbot to your website that answers from your data?
To add an AI chatbot to your website that answers from your data, you need three things: a reliable knowledge source (FAQs, policies, product or service pages), a system that searches that source for every question, and a language model that writes the answer only from the search results. The approach is called RAG, retrieval-augmented generation, and it is what lets the bot talk about your clinic, store or company accurately instead of inventing things.
The difference between a generic bot and one grounded in your data is huge. If a visitor asks whether you accept Tamara or how long returns take, a generic bot may give a plausible-sounding wrong answer. A grounded bot reads your policy, answers from it, cites the source, and if the information is not there, says so and offers to connect the visitor with your team.
- Answers from the model's general knowledge
- May invent policies or prices
- Does not know your hours or offers
- Hard to control tone and scope
- Answers from your documents and database
- Cites where the answer came from
- Says I don't know and hands off when information is missing
- Tone and scope set by you
For the concept in depth, read RAG explained. Here we focus on putting it to work on your site.
What data should feed the bot?
The bot will never be better than the data it reads. Before anything else, gather and tidy these sources:
| Data type | Examples | Best way to connect it |
|---|---|---|
| Stable knowledge | FAQs, shipping and returns policy, terms of service | Documents indexed for search |
| Product and service information | Service descriptions, specifications, sizes | Documents or tables refreshed regularly |
| Changing data | Current price, stock, available slots | A live database query through a tool |
| Customer data | Their order status, their bookings | Queried only after sign-in |
| Internal data | Costs, staff notes, contracts | Never in a public bot |
How the bot works, step by step
- 1Chunking
Documents are split into short chunks, each about one idea, with its heading and source.
- 2Indexing
Each chunk is turned into a numeric representation of its meaning (an embedding) and stored in a search index or vector database, often combined with ordinary keyword search.
- 3Retrieval
When a visitor asks, the system finds the chunks closest in meaning and wording.
- 4Constrained answer
The question and retrieved chunks go to the model with instructions: answer only from these texts, cite the source, and if the answer is not there, say so.
- 5Tools when needed
For prices, slots and order status, the bot calls a tool that reads the database directly instead of relying on a document that may be stale.
- 6Handoff
When there is no answer, or the visitor asks, it offers a contact form, WhatsApp or a transfer to staff.
This greatly reduces hallucination but does not eliminate it. Testing and review are a permanent part of the job; see how to reduce AI hallucinations in business apps.
Arabic challenges and how to handle them
Arabic-speaking visitors do not write the way your documents are written. Your policy may be in formal Arabic while the visitor types a casual Gulf-dialect question about returning an order. Others write in English or mix both languages. These steps improve accuracy:
- Normalize letters before search: handling the alif forms, taa marbuta vs haa and alif maqsura vs yaa, and removing diacritics and elongation, improves word matching.
- Hybrid search: combining meaning-based and keyword search helps with dialects, names and numbers such as model numbers or product codes.
- Both languages where needed: if your audience is mixed, provide core information in Arabic and English.
- Reply in the visitor's language: instruct the model to answer in the visitor's language and tone, even if the source is in the other one.
- Dialect test questions: test with Saudi, Emirati, Kuwaiti or Egyptian phrasing, depending on your audience.
For more on how models handle dialects and where they slip, read how AI models handle Arabic and its dialects.
Build the bot into your website with Fanann
With Fanann, you describe the bot you want and the agent builds the chat widget on your site, the knowledge index, the tools that read your database, and an admin panel to manage content and review conversations, all in code you own. You can add the bot to a site you built in Fanann or build both together.
Add an AI chatbot to my dental clinic website that answers in Arabic or English, matching the visitor's language. Knowledge sources: the services page, FAQs, cancellation policy and opening hours, including Ramadan hours. Prices and available slots are read live from the database through a tool, not from documents. The bot answers only from these sources and cites the source page, and never gives a diagnosis or medical advice; for medical questions it apologizes and offers to book a consultation. When there is no answer, show a WhatsApp button and a contact form. Add an admin panel to upload and update documents, review conversations and flag wrong answers. Normalize Arabic letters before search. Show me the plan before you build.
Try it in FanannSecurity and privacy: what the bot must never do
- No internal documents in a public index: anything indexed may be quoted to any visitor.
- Customer data only after sign-in: order status should not appear just because someone typed a phone number; use an OTP code or a login.
- Resist manipulation: a visitor may type ignore your previous instructions. Fixed instructions and narrowly scoped tools reduce the risk.
- Usage limits: cap messages per visitor to prevent abuse and runaway costs.
- Disclosure: tell visitors they are talking to an automated assistant, and mention it in your privacy policy.
What does it cost to run, and how do you measure success?
Running cost mainly comes from the number and length of messages, meaning the tokens the model reads and writes, plus indexing and hosting. Short answers, a few precise retrieved chunks and caching common questions all lower the cost. Details in what AI features cost to run.
| Metric | What it tells you |
|---|---|
| Share of questions answered from sources | Does your data cover what people ask? |
| Share of I don't know and handoffs | Where you need new content |
| Answers flagged as wrong | Quality of search and instructions |
| Conversions to a booking or order | The bot's effect on sales |
A simple weekly maintenance routine
Set aside half an hour a week: read a sample of conversations, add an answer for every question that repeated without one, update prices and hours before Ramadan, Eid and other peaks, and remove outdated documents from the index. A bot nobody reviews goes stale quickly; a reviewed bot gets better every week.
Your next step: collect the last 30 questions visitors asked you, and write an official answer to each on one FAQ page. That is the first and most important source for your bot.
Key takeaways
- A good bot answers from your approved sources, not the model's general knowledge, and says I don't know when the information is missing.
- Data quality sets bot quality: clear FAQs, current policies and structured product information.
- Changing data such as prices, stock and order status is read live from the database, not from documents.
- Test with real Arabic questions in different spellings and dialects before launch.
- Never index an internal document you would not want a customer to see.
Frequently asked questions
How do I add an AI chatbot to my website?
Do I need to train my own model on company data?
Does the chatbot understand Arabic dialects?
How do I stop the chatbot from making things up?
Is there a free Arabic chatbot for websites?
Ask your AI assistant about this
Copy this prompt into the AI assistant you use, then add the details of your own case.
I am reading this guide: “Add an AI chatbot to your website that answers from your data” https://fanann.com/en/blog/ai-chatbot-for-website/ My question: add ai chatbot to website Use that page as a source and explain the answer step by step for my situation, tell me what to check before I start, and cite the page link.