Skip to content

Meet the AryDataLabs AI Assistant: A RAG Chatbot That Hands the Conversation to a Real Person on Telegram

A plain English showcase of the AI assistant on this site. See how hybrid search, instant template answers, multi-provider failover, and a live Telegram handoff work together so every visitor gets a fast answer and a real human when it matters.

Meet the AryDataLabs AI Assistant: A RAG Chatbot That Hands the Conversation to a Real Person on Telegram

If you have ever visited a portfolio website, you know the feeling. You land on the page with one simple question in your head. What has this person actually built? Do they know the tools my team uses? How do I reach them? The answers are somewhere on the site, but finding them means clicking through five pages and hoping for the best.

I wanted to fix that on this site. So I built an AI assistant that lives in the corner of every page. You can ask it a question in plain language, in English or Indonesian, and it answers using my real portfolio content. If you would rather talk to a person, one button connects you to me directly on Telegram.

This article is a tour of how that assistant works, why I made the choices I made, and what I learned along the way. I will keep it in plain English, and I will leave out anything that would help someone attack the system, such as keys, secrets, and exact limits. The goal is to show the thinking, not to publish a blueprint for abuse.

What a visitor sees

Open the chat bubble and you get a short greeting and a few suggestion buttons. They cover the questions people ask most often:

  • What projects has Aryanto built?
  • Summarize Aryanto’s work experience
  • Which technical skills are strongest?
  • Show recent blog articles

There are also two extra groups of buttons: one for recruiters and one for clients. Recruiters can ask things like why they should consider me, which roles I fit, and where to read my resume. Clients can ask what I can build for their business, whether I can build an AI chatbot for their company, and how to start a project.

You can also type anything you like. The answer streams in word by word, the same way you may have seen in other AI tools, so you are never staring at an empty box. And if the question is better handled by a human, there is a Talk to Aryanto button at the bottom of the chat.

That is the whole experience from the outside. Inside, several systems work together to make it feel simple.

The big picture

Here is a simplified view of the moving parts. Names of secrets, internal addresses, and exact settings are intentionally left out.

BigPicture AryDatalabs AI Customer Services

The backend runs on Cloudflare Workers, which means there is no server for me to maintain. It stores my portfolio content in a database with a keyword index, stores meaning-based search data in a vector index, and keeps each visitor’s conversation in a small per-session object that expires on its own.

Every message goes through the same decision flow. First a quick safety screen. Then one question: can this be answered with a ready-made template? If yes, the visitor gets an instant answer. If the visitor asked for a human, the chat moves to Telegram. Only if neither applies does the system do the heavy work of searching my content and asking an AI model.

That ordering is deliberate. The cheapest and most reliable answer is the one that does not need an AI at all.

How the assistant finds the right answer

A common problem with chatbots is that they sound confident and make things up. To avoid that, my assistant uses a technique called RAG, which stands for retrieval augmented generation. The idea is simple: before the AI writes an answer, the system first looks up the relevant parts of my real content and hands them to the AI as reference material.

Looking things up well is harder than it sounds, so I use two kinds of search at the same time.

Keyword search is great at exact names. If you ask about a specific tool or technology, keyword search finds the pages that mention it.

Meaning search is great at fuzzy questions. If you ask “tell me about your work on recommendation systems,” meaning search finds relevant content even when the exact words differ. The meaning search works across languages, so an Indonesian question can find English content.

Neither method is enough alone, so the system combines them. Both searches produce a ranked list. A simple, well-known rule merges the two lists so that results that rank high in both float to the top. Then a second model re-reads the best candidates and scores how well each one answers the actual question. Finally, the strongest sources are placed at the beginning and the end of what the AI reads, because language models pay the most attention to those two spots and tend to skim the middle.

One more detail matters a lot for quality. The search works on small pieces of text, but when a piece matches, the AI receives the whole parent item: the full project description, the full job entry, or the full article section. Small pieces make search precise. Whole items make answers complete.

On top of that, the assistant has a short list of verified facts about me, such as my skills, projects, and roles. If the retrieved text ever disagrees with that list, the verified list wins. And if something is simply not known, for example my current availability, the assistant is instructed to say it does not have that information and point you to the contact options, instead of guessing.

Instant answers for the questions everyone asks

When I looked at the questions visitors were likely to ask, I noticed something obvious. Most of them repeat. Recruiters want a summary, a resume link, and a way to get in touch. Clients want to know what I can build and how to start. Answering those with a full AI pipeline is slow, costs money, and carries a small risk of a wrong answer every single time.

So I wrote those answers once, as templates, and the assistant serves them directly. There is no search and no AI call. They arrive in a fraction of a second, with a short typing effect so the chat still feels alive.

The most important design choice is that all template questions live in one place. Adding a new one means adding a single entry that describes the question, the group it belongs to, and the answer. Here is a simplified example of the idea:

{
  id: "contact",
  group: "client",
  label: (owner) => `How can I contact ${owner}?`,
  answer: (ctx) => `Here is how to reach ${ctx.owner}: ...`,
}

The chat widget does not have the buttons hard coded. It asks the backend for the list, so when I add a question, the new button appears on the site without touching the frontend.

Templates are also honest by design. If I do not want to publish something, such as my availability, the template says so and points to the contact options. I can fill in a single line later and the answer updates everywhere, including the AI’s own instructions, so the template and the AI never disagree.

Typed questions that exactly match a template are served the same way. Anything more specific, such as “What projects has Aryanto built with a particular language?”, goes to the full AI pipeline, because that question deserves a real search.

Staying online when AI providers fail

If you depend on one AI provider, you inherit its bad days. Providers hit rate limits, run out of credit, have outages, or simply get slow. For a public website, a chatbot that says “something went wrong” is worse than no chatbot.

My backend can talk to ten different AI providers. They are arranged in a priority order, and the system walks down the list until one of them delivers.

The key idea is that a provider only counts as working once it sends its first word. Connecting is not enough. If a provider accepts the request but never starts talking, the system gives up on it quickly and moves to the next one. The visitor never sees any of this, because nothing has been shown yet.

A small safety mechanism, often called a circuit breaker, remembers which providers just failed. If one is misbehaving, it is skipped for a short time so the next visitor does not wait on it again. Different problems earn different timeouts. A temporary slowdown is forgiven quickly, while a missing key or a wrong model setting is benched for longer until I fix it.

There is also a daily cap on AI usage to protect my bill. When the cap is reached, or when every provider fails at once, the assistant does not show a dead end. It hands the conversation to me on Telegram instead.

The human touch: Telegram as a live chat unit

This is my favorite part. An AI assistant is great for the first answer, but some conversations need a person. A recruiter may want to discuss a role. A client may have a project that does not fit any template. For those moments, the assistant connects the visitor to me through Telegram.

There are three ways a conversation can move to live mode:

  1. The visitor presses Talk to Aryanto.
  2. The visitor types something like “I want to talk to a real person.” The assistant recognizes this in both English and Indonesian.
  3. The AI is unavailable, for example because every provider failed or the daily cap was reached.

When that happens, I receive a message on Telegram. It includes the question the visitor was waiting on and a short transcript of the conversation, so I never start from zero. Each visitor message arrives in my bot chat, tagged so the system knows which visitor it belongs to.

To reply, I simply swipe-reply to the message in Telegram. My answer appears in the visitor’s browser almost instantly. The browser stays connected through a live channel so replies are pushed the moment I send them. If a visitor’s network blocks that kind of connection, the widget quietly switches to checking for new messages every few seconds, and nothing breaks.

When we are done, I reply with a short command to end the live chat. The assistant takes over again, and the visitor can keep exploring the site.

A few details keep this safe and fair:

  • Only my own Telegram account can answer visitors.
  • The visitor’s private session key stays in their browser and is never sent to Telegram.
  • Duplicate messages from Telegram are ignored, so nothing is shown twice.
  • Live messages have sensible limits, so my phone is not flooded.
  • The widget tells visitors that live chat messages pass through Telegram.

The result is a smooth path from “ask the bot” to “talk to Aryanto,” without any forms, ticket systems, or waiting for an email reply.

Keeping it safe without making it annoying

A public chatbot that costs money to run attracts attention, and not all of it is friendly. I treat safety as a set of layers, none of which is perfect alone.

At the front door, the backend only accepts requests from my own website. It looks at signs that a request comes from an automated script instead of a real person. It limits how often the same visitor can start sessions and send messages. A daily cap puts a hard ceiling on AI spending. For extra protection, the system supports a challenge from Cloudflare that only appears when something looks suspicious.

Behind the front door, conversation history is stored on the server, not in the browser. That matters because it stops anyone from pretending the assistant said something it never said. Owner-only tools, such as loading new content or running health checks, sit behind a separate private credential.

I am deliberately not publishing exact thresholds or settings here. Any single check can be bypassed by a determined attacker, and spelling out the numbers only helps them. What protects the system is the combination of layers, and the fact that the most expensive path is always capped.

Privacy matters too. A visitor’s session is erased about a day after their last activity. Raw IP addresses are not stored, only scrambled versions used for rate limiting. The chat window includes a plain reminder that AI answers can be wrong and that visitors should not share sensitive information.

What I learned building it

A few lessons stood out, and I think they apply to any AI project.

Streaming text is delicate. Early on, answers appeared with words glued together and lists collapsed into a single line. The cause was a well-meant cleanup step that tidied each streamed piece on its own. Language models send tokens that carry their own leading spaces and line breaks, so trimming a piece damages the text. The fix was a cleaner that remembers what came before and never touches spacing. The lesson: when data arrives in pieces, process it as a stream, not as isolated fragments.

Test the whole path, not just the parts. Each piece worked on its own, yet the real problems appeared when they met. I now run end to end tests with fake AI providers and a fake Telegram, covering failover, handoff, two way replies, and rate limits. It is the closest I can get to production without spending real money.

Structure pays off. The chat logic started as one very large file. Splitting it into focused modules, such as routing, the decision flow, search, streaming, and cleanup, made it far easier to debug. When something looks wrong, I now know which small file to open first.

Be honest about uncertainty. The assistant says “I do not have that information” when it truly does not, and sends you to a human. A trustworthy assistant is more valuable than one that always has an answer.

Cheap answers first. The template system turned out to be one of the best decisions. It is faster, free, and always accurate. The AI is saved for the questions that really need it.

Try it yourself

The best way to understand all this is to use it. Click the chat bubble on this page and try a few things:

  1. Press one of the suggestion buttons and notice how quickly the answer appears.
  2. Open the recruiter or client group and see the extra questions.
  3. Ask something specific, then watch the answer stream in as the system searches my content.
  4. Press Talk to Aryanto, send me a message, and see how fast a human reply can arrive.

If you are building something similar, whether for a portfolio, a small business, or a team, I would be glad to talk about it. And if you just have a question about my work, you now know the fastest way to ask.

Thanks for reading.

Chat to Arydatalabs AI assistant
// Blokir klik kanan di seluruh area web