© 2026 Muhammed Göktuğ Temiz

This site runs on the infrastructure of Averis Soft, the company I founded.

02 / 07AI Support Chatbot

Project 2 of 7

02 / 07

AI Support Chatbot

A rule engine, live agent handoff and three-layer data safety.

An enterprise support bot driven by a YAML state machine, connected to the production database strictly read-only, that hands the conversation to a human agent when it cannot resolve it.

Role
Developer
Period
2026 · July – Present
AI Support Chatbot
conversation flows
16
regression tests
107
layers of read-only database access
3

Contents

Stack

  • Flask
  • Gunicorn
  • MySQL
  • SQLite
  • YAML state machine
  • Ticket system integration

01Problem

Most of what reaches a support team is the same handful of questions repeated: common account and request questions. Letting a language model answer those freely introduces two risks at once — the model inventing an answer, and customer data leaking into logs uncontrolled. On an enterprise support channel neither is acceptable.

02Solution

I built the bot on a rule engine rather than free generation. Conversation flows live in YAML files as a state machine: 16 separate flows, each with its own steps, validations and exits. Changing a flow means editing YAML, not changing code — the support team can update their own scenarios without writing any.

When the bot cannot resolve something it does not simply drop the conversation: it opens a ticket in the ticketing system and hands off to a live agent together with the full conversation history, so the customer never has to explain twice.

The path of a message
  1. Customer message
  2. PII maskingRegex + Luhn; before any log or database write
  3. Rule engineYAML state machine · 16 flows
  4. Data queryThree-layer read-only access
  5. AnswerFrom production data

If the bot cannot resolve it: a ticket is opened in the ticketing system and the conversation is handed to a live agent with its history.

03Architectural decisions

A three-layer read-only guarantee on the production database. The bot reads the production database, but the possibility of a write had to be closed entirely. Instead of trusting a single safeguard, I stacked three:

  1. Table whitelist — the bot can only see explicitly permitted tables
  2. SQL guard — every generated query is inspected for write statements before it executes
  3. READ ONLY transaction — the query runs inside a transaction the database itself refuses writes on

Even if the first two are bypassed, the third is enforced by the database engine. Not leaving safety to the good intentions of the application layer was the single best decision in this project.

End-to-end PII masking. Sensitive fields — national ID numbers, phone numbers, email addresses and card numbers — are caught by regex patterns plus Luhn validation for card numbers, then masked. Masking runs before anything is written to logs or the database, so sensitive data never hits disk in raw form.

107 tests as a regression net. I wrote tests for every step of all 16 flows. Because changing one YAML flow can silently break another, updating the system safely would not have been possible without them.

Flask + Gunicorn. A deliberately plain stack: a single service that fits the synchronous request/response model and can be packaged and scaled horizontally. State lives in YAML and the database; the application server itself is stateless.

Access to the production database
  1. Table whitelistOnly explicitly allowed tables are visible
  2. SQL GuardEvery query is checked for write statements before it runs
  3. READ ONLY transactionThe database engine itself refuses writes
  4. Production database

04Outcome

A significant share of repeat requests now close without ever reaching an agent, and the ones that do arrive with the ticket and history already attached. Answers are correct because they come from production data, safe because queries are read-only, and changeable because the flows live in YAML.

Next projectAsk Göktuğ — Portfolio RAG AssistantAn assistant that ran on this site for a while: it cited its sources and did not make things up.→
MGT
AboutProjectsCVWritingContact
let's work together

AI Engineer · Computer Engineer

MuhammedGöktuğ Temiz

I build products where AI meets data systems.

Computer engineer working on AI-driven systems, data pipelines and system integrations. I design automation-oriented, scalable structures that turn complex raw data into something meaningful and usable.

See my workGet in touch
Location
Başakşehir / İstanbul, Türkiye
selected projects
7

Open to new projects

About

As an AI Engineer with a degree in Computer Engineering, I build LLM-based chatbot and AI agent systems, data processing pipelines and system integrations.

I have hands-on experience setting up PII masking, read-only database security and Prometheus/Grafana-based observability layers in production environments. Using Python, REST APIs, SQL and Elasticsearch, I integrate AI-powered systems into real business processes and focus on building secure, scalable and maintainable products.

Role
AI Engineer · Computer Engineer
Location
Başakşehir / İstanbul, Türkiye
  • Large Language Models (LLM)
  • Retrieval-Augmented Generation (RAG)
  • AI Agent Architectures
  • Speech-to-Text (Whisper)
  • Python
  • n8n
  • Elasticsearch
  • Prometheus
  • Grafana
  • Linux / Debian
Recordings processed on Transify (incl. trials)
500+
Languages supported
50+
Turkish transcription accuracy (our own tests)
95%+
Chatbot regression tests
107

Projects

01/ 07

Transify

Your meeting is over. Your summary is ready.

End-to-end developer · 2026 · July – Present

  • Whisper API
  • GPT-4o
  • MiniMax AI
  • FFmpeg
  • Hangfire
Read the detailsLive demo ↗
  1. 01TransifyYour meeting is over. Your summary is ready.Whisper API · GPT-4o · MiniMax AIRead the details →
  2. 02AI Support ChatbotA rule engine, live agent handoff and three-layer data safety.Flask · Gunicorn · MySQLRead the details →
  3. 03Ask Göktuğ — Portfolio RAG AssistantAn assistant that ran on this site for a while: it cited its sources and did not make things up.Python · FastAPI · RAGRead the details →
  4. 04Data Processing & Automation PipelinesCollection, enrichment, classification and reporting — in one flow.Python · n8n · LLMRead the details →
  5. 05Averis Soft — Freelance Web & Software WorkFrom analysis to launch, delivered across eight different industries.Corporate web · E-commerce · Booking systemsRead the details →
  6. 06Monitoring & Observability InfrastructureServer, service and application — all on the same screen.Zabbix · Prometheus · GrafanaRead the details →
  7. 07Blog & Content Management PlatformThe first end-to-end product I wrote with a layered architecture.ASP.NET MVC · C# / .NET · SQL ServerRead the details →

Résumé

Muhammed Göktuğ Temiz

AI Engineer · Computer Engineer

Experience

2026 · January – Present
AI Engineer · Telpass İletişim Hizmetleri A.Ş.

Built a pipeline with n8n and Python services that collects data from different sources, enriches and classifies it with an LLM and reports on it; automated the manual collect–join–report loop. Secured a rule-based enterprise support chatbot with 16 flows and 107 regression tests; applied three-layer read-only access to the production database and PII masking at the source. Kept cost and reproducibility under control by using the LLM only where reasoning is needed (classification, field extraction from free text) and leaving deterministic work to code. Cut query time and database load by moving high-volume search from the relational database to Elasticsearch. Brought server, application and log monitoring into one dashboard and wrote alert rules that fire only on actionable situations; problems are now learned from alerts, not from customers. Split services into VMs and containers on the virtualisation layer, setting up resource isolation, snapshots and backups.

2025 · April – May
Backend Developer (Intern) · Türkiye Finans Katılım Bankası

Supported software development within the Credit Card Payment Systems department. Contributed to data analysis, SQL query optimisation and reporting on Microsoft SQL Server. Gained experience with service integrations and layered architecture in C#/.NET enterprise applications.

2023 · July – August
.NET Developer (Intern) · Memoria Bilişim ve Medya A.Ş.

Built a blog platform with user and content management features using ASP.NET MVC, SQL Server and Entity Framework. Designed the application structure with a layered architecture and implemented database management and CRUD operations.

Education

2020 – 2025
BSc Computer Engineering · Giresun University

Bachelor's degree, Faculty of Engineering, Department of Computer Engineering.

Certificate
Cisco 1 – Computer Networking Fundamentals · Başakşehir Living Lab

Certificate of participation.

Skills

AI & Generative AI

  • Large Language Models (LLM)
  • Retrieval-Augmented Generation (RAG)
  • AI Agent Architectures
  • Embedding & Vector Search
  • Speech-to-Text (Whisper)
  • AI Chatbot Development
  • Prompt Engineering

Programming & AI Engineering

  • Python
  • Data Processing & Automation
  • REST API
  • API Integrations
  • Flask
  • n8n

Databases & Search

  • Microsoft SQL Server
  • MySQL / MariaDB
  • Elasticsearch
  • ELK Stack (Elasticsearch, Logstash, Kibana)
  • SQL Optimisation
  • Data Modelling

Infrastructure & Monitoring

  • Linux / Debian
  • Proxmox
  • Zabbix
  • Prometheus
  • Grafana

Languages

  • English — B1
web version →Download CV (EN)View CV ↗

Writing

  • 11 November 2026How I tested an LLM assistant: a 40-question accuracy testA language model answers a little differently every time. Still, to measure whether my RAG assistant worked correctly after every change, I built a simple test set that does the job. What I tested, what I deliberately did not do, and how the test lied to me.→
  • 28 October 2026SQLite instead of Elasticsearch: hybrid search on a small knowledge baseI know Elasticsearch well, so why didn't I use it for my RAG assistant? How I combined BM25 and vector search inside SQLite for a 29-passage knowledge base, and how the Turkish language got involved.→
  • 14 October 2026Cutting my RAG assistant's first word from 50 seconds to 4The first version of the RAG assistant I built for my portfolio kept visitors waiting 25–50 seconds before an answer began. What I measured, what I kept on my server and what I moved to the cloud, and what that decision cost.→
  • 14 October 2026Connecting an AI bot to a production database: three layers of read-onlyA support bot had to read the production database without ever writing a single row. Why I built three layers instead of trusting one safeguard, and how I masked sensitive data before it could ever reach the logs.→

Contact

Got something in mind?

If you want to talk about AI, data systems or automation work, drop me a line — I usually reply the same day.

goktugtemiz60@gmail.com
  • GitHub ↗
  • LinkedIn ↗
  • WhatsApp ↗