RAG-based HR onboarding assistant
CASE FILE NO. OB-2026-04
OPENED AUG 2026 · MALANG, ID

Onboarding
Buddy

A chatbot that answers new-hire questions straight from a company's own HR documents — built solo in Langflow, debugged in the open, and tested against its own failure modes before being called done.

Langflow AstraDB (Vector) Google Gemini Bahasa Indonesia RAG
Prototype · Demo Ready
01 — The Brief

Same questions, every new hire.

New employees ask nearly identical questions in their first weeks: how much annual leave they get, what the working hours are, who to contact when a laptop won't connect to the VPN. Answering these one-by-one costs HR time, and answers drift depending on who's asked.

Onboarding Buddy reads a company's actual onboarding documents — policy PDFs, handbooks, internal FAQs — and answers directly from them. It remembers the last few turns of a conversation, so a new hire can ask a vague follow-up like "and for that, where do I go?" and still get a correct, specific answer.

It was built past a guided course baseline, with three custom additions covering deduplication, hallucination resistance, and multi-turn memory — documented below, along with the bugs that came with each one.

02 — Source Material

Five documents, one knowledge base.

Everything the assistant knows comes from these files — nothing else. If an answer isn't in here, the assistant is expected to say so.

DOC 01

Company Policy

Leave entitlements, permission rules, code of conduct.

DOC 02

Employee Handbook

Company vision, working hours, hybrid schedule, culture.

DOC 03

FAQ Pegawai Baru

New-hire FAQ: leave process, IT contacts, performance reviews.

DOC 04

IT Tools Guide

Email, Slack, Jira, and the internal HR portal, explained.

DOC 05

Onboarding SOP

The four-week onboarding schedule, week by week.

03 — How It Works

Two flows: one to learn, one to answer.

Built in Langflow as two connected pipelines — captured here straight from the working canvas, not redrawn.

Flow 1

Ingestion

01Read the source documents
02Break each document into smaller, searchable pieces
03Convert each piece into a vector representation the system can search by meaning
04Store everything in a vector database for retrieval
Flow 2

Query & Response

01Understand the question, using conversation history to resolve vague follow-ups
02Search the knowledge base for the most relevant content
03Assemble the retrieved content into context
04Generate a grounded answer, restricted to what was retrieved
04 — What I Built

Past the course baseline.

Three additions, each one made because something broke or could have.

Addition 01

Deduplication on re-ingestion

Re-running the ingestion flow during testing kept creating duplicate chunks of the same document, quietly bloating the collection and skewing retrieval.

Fix: added logic so re-ingesting a document clears its old entries first, instead of stacking duplicates on top with each re-run.

Addition 02

Resistance to fabricated answers

An assistant that confidently invents a plausible-sounding HR policy is worse than one that says nothing. The default RAG setup will do exactly that when retrieval comes back weak.

Fix: raised how strictly retrieved content has to match the question before it's trusted, paired with an explicit rule — answer only from what was retrieved, and say so honestly when nothing relevant is found.

Addition 03

Multi-turn memory with query condensation

A follow-up like "and for that, where do I go?" means nothing to a vector search on its own — it needs the previous turn to make sense.

Fix: a dedicated rewriting step reads chat history and turns the vague follow-up into a specific, standalone query before it ever reaches AstraDB.

05 — Test Log

Three exhibits, verified against source.

Each answer below was checked directly against the 5 source documents — not assumed correct because it sounded right.

Exhibit A

Basic retrieval, multi-source

Verified

Three factual questions in a row. The leave-balance answer is notable — it combines the process from one document with the 12-day figure from another, in a single response. "Berapa lama jam kerja standar..." · "Bagaimana cara mengajukan cuti tahunan?" · "Siapa yang bisa dihubungi jika ada kendala IT?"

Chat exhibit: working hours, annual leave, and IT contact questions answered correctly
Exhibit B

Anti-fabrication safeguard

Safeguard Triggered

Asked what documents a new hire needs on day one — a question none of the 5 source files actually answer. Confirmed by reading every source document directly: no day-one checklist exists in them. "Apa saja dokumen yang perlu disiapkan karyawan baru di hari pertama?"

Chat exhibit: assistant correctly declines to answer a question not covered by source documents
Exhibit C

Consistency across phrasing

Verified · Consistent

The same intent, asked three different ways in the same session. All three return the same correct process. "Kalau soal cuti, kemana?" · "Bagaimana cara mengajukan cuti?" · "Kalau saya mau ambil cuti, prosesnya gimana?"

Chat exhibit: three differently-phrased leave questions returning the same consistent answer
06 — Debug Log

What actually broke.

In the order it happened.

001
Unconnected ports. Data silently failed to pass between components — no error, just an empty downstream output.
002
Dynamic input ports. Swapping a component didn't register its new inputs correctly, breaking the flow it was part of.
003
Missing API key. Embedding calls failed silently rather than throwing a clear error — traced back to an unset key.
004
Session bleed. Langflow's Playground didn't reliably clear session state between test runs, contaminating memory tests with leftover history.
005
AstraDB hibernation. Free-tier database went inactive mid-testing and wouldn't resume — resolved by provisioning a fresh vector-enabled database and re-ingesting.
07 — Status

Where this actually stands.

Prototype

This is a working prototype, verified end-to-end on the query set above — not a production deployment. Before real use, it would still need broader query coverage testing beyond these hero cases, proper error handling for AstraDB or Gemini request failures, and some way to monitor retrieval quality as documents change over time.

It also runs on AstraDB's free tier, which hibernates after inactivity — a deliberate constraint of building this solo on free infrastructure, not a flaw in the design.