<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ai Chatbot]]></title><description><![CDATA[Get a custom AI chatbot trained on your business website, documents, and content. Automate customer support, answer questions, capture leads, and improve customer engagement.]]></description><link>https://custom-aichatbot.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6afc4a7a52d5ac9a03ef9ffc/337f43a5-aff2-4f74-b21a-3391801a57a7.png</url><title>Ai Chatbot</title><link>https://custom-aichatbot.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 13:51:57 GMT</lastBuildDate><atom:link href="https://custom-aichatbot.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why Your AI Chatbot Gives Wrong Answers: 8 Document Mistakes]]></title><description><![CDATA[Wrong chatbot answers often start with how documents are prepared. Check these 8 document mistakes before changing your AI model or prompt.]]></description><link>https://custom-aichatbot.hashnode.dev/why-your-ai-chatbot-gives-wrong-answers-8-document-mistakes</link><guid isPermaLink="true">https://custom-aichatbot.hashnode.dev/why-your-ai-chatbot-gives-wrong-answers-8-document-mistakes</guid><category><![CDATA[AI]]></category><category><![CDATA[#ai-tools]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[chatbot]]></category><category><![CDATA[#chatbots]]></category><category><![CDATA[RAG ]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Techowdy]]></dc:creator><pubDate>Wed, 18 Nov 2026 07:34:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6afc4a7a52d5ac9a03ef9ffc/fbc29862-7bc9-4aa3-b000-0455546b869c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most "the AI is wrong" problems start with how your content is prepared and split. Here is what to check first.</p>
<p>When an AI chatbot gives a wrong answer, the first instinct is to blame the AI model or rewrite the prompt. Very often, the real problem is earlier: the chatbot never found the right part of your documents.</p>
<p>Before a chatbot can answer from your content, that content has to be cleaned and split into smaller pieces so the bot can search it. Developers call this <strong>chunking</strong>. If it's done badly, the chatbot looks in the wrong place, even when the model itself is fine.</p>
<p>Here are eight document mistakes worth checking first.</p>
<h2>1. Cutting documents at random points</h2>
<p>A splitter that cuts every N characters doesn't know where a sentence, a list or a policy ends. It can separate "Refunds are available within 30 days" from "unless the item was customised." The chatbot then sees half a rule.</p>
<p><strong>Fix:</strong> split on structure first (headings, paragraphs, list items), and use size limits only inside a section.</p>
<h2>2. Pieces that lose their context</h2>
<p>A piece of text that says "It ships within 5 days" is useless on its own. What ships? Which product?</p>
<p><strong>Fix:</strong> add the document title and section heading to the start of each piece before indexing it.</p>
<h2>3. Pieces that are too small or too large</h2>
<p>Too small, and each piece has no context, so the search returns fragments. Too large, and the useful sentence is buried in a lot of unrelated text.</p>
<p><strong>Fix:</strong> start with a few hundred words per piece, then adjust using real test questions, not guesses.</p>
<h2>4. Indexing messy, repeated content</h2>
<p>Menus, footers, cookie banners, repeated page headers and page numbers all get indexed. Because they appear on every page, they can even rank above the real answer.</p>
<p><strong>Fix:</strong> clean and remove duplicates before splitting.</p>
<h2>5. Broken PDFs and tables</h2>
<p>PDF text extraction can scramble columns, merge table cells or drop headings. A pricing table can turn into a stream of numbers with no labels.</p>
<p><strong>Fix:</strong> read the extracted text of your messiest documents with your own eyes. Convert tables into labelled rows (for example, "Plan: Business, Price: ...") before indexing.</p>
<h2>6. Not tracking where each piece came from</h2>
<p>If a piece of text doesn't carry its source URL, title and section, you can't show citations, filter by content type or debug a bad answer.</p>
<p><strong>Fix:</strong> store this information with every piece from day one.</p>
<h2>7. Never testing the search step on its own</h2>
<p>If you only test the final answer, you can't tell whether the search step or the AI model failed.</p>
<p><strong>Fix:</strong> keep a small set of real questions, each with the page that should answer it. Then check whether that page shows up in the top results.</p>
<h2>8. Letting your content go out of date</h2>
<p>Prices change, policies change and pages get deleted. The chatbot keeps answering from the old version with full confidence.</p>
<p><strong>Fix:</strong> update the index whenever your content changes, and remove pieces that belong to deleted pages.</p>
<h2>A simple way to split documents (fixes mistakes 1, 2 and 6)</h2>
<p>This is an illustrative example, not production code:</p>
<pre><code class="language-python">import re

def chunk_markdown(text, source_url, doc_title, max_words=250, overlap=40):
    sections = re.split(r"\n(?=#{1,3} )", text)
    chunks = []
    for section in sections:
        lines = section.strip().splitlines()
        if not lines:
            continue
        heading = lines[0].lstrip("# ").strip()
        words = " ".join(lines[1:]).split()
        step = max_words - overlap
        for start in range(0, max(len(words), 1), step):
            body = " ".join(words[start:start + max_words])
            if not body:
                continue
            chunks.append({
                "text": f"{doc_title} &gt; {heading}\n{body}",
                "source": source_url,
                "section": heading,
            })
    return chunks
</code></pre>
<p>The <code>"{doc_title} &gt; {heading}"</code> prefix gives each piece its context, and the <code>source</code> and <code>section</code> fields let you show citations later.</p>
<h2>A simple test for mistake 7</h2>
<pre><code class="language-python">test_set = [
    {"question": "How long does delivery take?", "expected_source": "/delivery"},
    {"question": "Can I get a refund?", "expected_source": "/refund-policy"},
]

def retrieval_hit_rate(search_fn, test_set, k=3):
    hits = 0
    for case in test_set:
        results = search_fn(case["question"], k=k)
        if any(case["expected_source"] in r["source"] for r in results):
            hits += 1
    return hits / len(test_set)
</code></pre>
<p>Run this after every change to your splitting, cleaning or search settings. It turns "it feels better" into a number.</p>
<p>Before you swap models or rewrite prompts, read the pieces your search step actually returns for your worst questions. The fix is often there.</p>
<p>How do you handle mixed content like articles, PDFs and FAQs? Do you use one strategy for everything, or a different one per content type? I'd like to compare notes in the comments.</p>
<p><em>These lessons come from building AI chatbots for a magazine archive and a community charity, as part of our work at</em> <a href="https://techowdy.com/ai-chatbot/"><em>Techowdy</em></a><em>. If you've hit similar problems, I'd like to hear how you solved them.</em></p>
]]></content:encoded></item><item><title><![CDATA[What Building Two AI Chatbots Taught Me About Trust]]></title><description><![CDATA[A magazine archive in Lebanon and a charity in Dublin. Very different users, the same lesson.]]></description><link>https://custom-aichatbot.hashnode.dev/what-building-two-ai-chatbots-taught-me-about-trust</link><guid isPermaLink="true">https://custom-aichatbot.hashnode.dev/what-building-two-ai-chatbots-taught-me-about-trust</guid><category><![CDATA[AI]]></category><category><![CDATA[chatbot]]></category><category><![CDATA[RAG ]]></category><category><![CDATA[#ai-tools]]></category><dc:creator><![CDATA[Techowdy]]></dc:creator><pubDate>Tue, 17 Nov 2026 13:02:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6afc4a7a52d5ac9a03ef9ffc/a1a5aaa5-f14b-4765-b302-a349cec2b736.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I started building AI chatbots for real organisations, I thought the main challenge would be intelligence. Pick a good model, write a good prompt, and the rest would follow.</p>
<p>Two projects changed my mind. Neither was really about intelligence. Both were about trust.</p>
<p>The first project: a library nobody could search</p>
<p><a href="https://homelandlebanon.com/">HOMELand Lebanon</a> is a cultural magazine and archive about Lebanon and its diaspora, published since 2014. It has seven content verticals, ten magazine issues, country pages, interviews and videos.</p>
<p>The people who visit often come looking for something very specific: a person, a village, a family story. If the search box can’t find it, they leave, even though the content is on the site.</p>
<p>We built “<strong>Jeddo</strong>”, an AI guide that answers questions from the archive and points to the article behind each answer.</p>
<p>The lesson I took from it: for an archive, trust comes from showing your work. A reader who sees where an answer came from can check it. An answer with no source is just a claim.</p>
<p>The second project: a charity with a different problem</p>
<p><a href="https://caspr.ie/">CASPR</a> has supported children and families in Dublin’s North East Inner City since 1995. Parents, volunteers and funders were asking staff the same questions again and again, and staff answered them between sessions.</p>
<p>Here the question wasn’t “can people find the article?” It was “can a worried parent find the right service without calling?”</p>
<p>The users spoke differently too. Archive readers type names and places. Parents describe a need in their own words. The assistant had to understand both kinds of language, and know its limits.</p>
<p>That second part is where I learned the most.</p>
<p>What I actually learned</p>
<ol>
<li>People forgive “I don’t know.” They don’t forgive confident mistakes. A bot that says “I’m not sure, here’s how to reach the team” feels honest. A bot that invents an answer feels dangerous. For an organisation serving families, that difference is everything. So the fallback path is not a detail, it’s part of the product.</li>
<li>Grounding matters more than cleverness. Limiting answers to the organisation’s own content, and showing sources, built more trust than anything I did with the prompt. It’s less exciting than a bigger model, and it works better.</li>
<li>Content quality is trust quality. A chatbot repeats what it’s given. If your documents are outdated or contradict each other, the bot will confidently pass that on. Part of building a chatbot turned out to be helping organisations clean up their own content.</li>
<li>Different users trust different things. Readers trusted citations. Parents trusted clear, simple answers and a way to reach a person. There’s no single “trusted chatbot” design, only one that fits the people using it.</li>
<li>Trust is built in small moments. It’s not one great answer. It’s a hundred ordinary ones, plus an honest response to the one the bot can’t handle.</li>
</ol>
<p>What I’d tell anyone building one</p>
<p>Before you choose a model, decide three things:</p>
<p>What content is the bot allowed to answer from? How will it show where an answer came from? What does it do when it doesn’t know?</p>
<p>If you can answer those clearly, you’re ahead of most chatbot projects I’ve seen.</p>
<p><strong>Closing thought</strong></p>
<p>I came into this thinking I was building intelligent assistants. I now think I was building something simpler and harder: assistants people feel safe relying on.</p>
<p>If you’re building or buying a chatbot and want to talk through the approach, you can see how we do it at <a href="https://techowdy.com/ai-chatbot/">Techowdy</a>.</p>
<p>What made you trust (or stop trusting) a chatbot? I’d like to hear in the comments.</p>
]]></content:encoded></item></channel></rss>