Index
Case 01 / 2025

OnboardAI — a RAG assistant for company documentation.

Upload a handbook, wiki, or SOP. New hires ask questions and receive cited answers grounded in the source documents. Shipped and live.

React · Vite FastAPI ChromaDB OpenAI · gpt-4o-mini text-embedding-3-small
RoleDesign · Build
Year2025
StatusLive · Deployed
onboard-ai-gold.vercel.app
Exploring: GitLab Employee Handbook
+ New Chat

Welcome to OnboardAI

Ask anything about your company docs, policies, and processes.

What does DACI stand for and how is it used to define roles in a team?
Can you explain the process for applying for a long-term relocation at GitLab?
What was the engagement score from the FY'22 Q4 Pulse Engagement Survey?
How does the Organization Change Checklist creation process work?
Ask a question about your docs…
Context

Problem.

Problem
Company knowledge is scattered across PDFs, wikis, and Notion.
New hires ask the same questions repeatedly in Slack. Managers answer them repeatedly. The information exists; retrieval is the bottleneck.
Users
Admins who own the corpus, new hires who need answers.
Admins upload and curate. New hires need fast, specific, verifiable answers.
Constraint
Answers must cite their source.
Generic LLMs hallucinate. HR-grade answers require a traceable link back to the document and section.
Approach
RAG with inline citations and a source-card UI.
Retrieval-augmented generation over ChromaDB. Every claim is tagged with a source number; every source card links to the original document.
Product walkthrough

Five screens.

Rebuilt snapshots of the live product. Each shows a specific stage of the retrieval loop.

Screen 01 · Workspace picker

First-run: choose a demo corpus.

In production this is white-labeled to a single company's knowledge base. The public demo offers three indexed corpora so a visitor can test the retrieval loop without uploading anything.

/ — workspace picker modal
Exploring: GitLab Employee Handbook
+ New Chat

Welcome to OnboardAI

Ask anything about your company docs, policies, and processes.

Try it now

These are real documents we've pre-loaded for you. Pick one to get started.

📋

GitLab Employee Handbook

GitLab's public company handbook — PTO, benefits, values, spending policies, onboarding

3070 chunks
💼

SBA Small Business Tax Guide

SBA.gov guides on small business taxes — structures, deductions, deadlines, filing requirements

100 chunks

Supabase Developer Docs

Supabase official docs — database, auth, storage, edge functions, migrations

109 chunks
Get Started →
Screen 02 · Default state

Empty chat with four starter questions.

Once a corpus is selected, the chat opens empty with four contextual starter questions drawn from the active knowledge base. One click starts a query.

/ — welcome screen
Exploring: GitLab Employee Handbook
+ New Chat

Welcome to OnboardAI

Ask anything about your company docs, policies, and processes.

What does DACI stand for and how is it used to define roles in a team?
Can you explain the process for applying for a long-term relocation at GitLab?
What was the engagement score from the FY'22 Q4 Pulse Engagement Survey and how does it compare to the peer group?
How does the Organization Change Checklist creation process work when a team member qualifies?
Ask a question about your docs…
Screen 03 · Grounded answer

Structured response with inline citations.

The generator prompt constrains the LLM to retrieved chunks and requires inline source labels. Output is a numbered response with Source N tags next to each claim.

/ — answer with inline citations
Exploring: GitLab Employee Handbook
+ New Chat
Can you explain the process for applying for a long-term relocation at GitLab?
03:03 PM
AI
Certainly! Here's a concise overview of the process for applying for a long-term relocation at GitLab:

Steps to Apply for Long-Term Relocation

  1. Review Country Hiring Guidelines:
  2. Confirm GitLab Entity:
    • Ensure that GitLab has an entity in the country you wish to move to. Relocations are only supported to countries where GitLab is open for hiring and does not have hiring restrictions or headcount caps Source 2.
  3. Eligibility to Work:
    • Confirm your eligibility to work in the new location. Note that GitLab does not provide sponsorship or immigration aid for team members moving to new countries, except for the Netherlands Source 3.
Ask a question about your docs…
Screen 04 · Source card

Retrieved chunk, score, and file path.

Each source card displays the retrieved text, cosine relevance score, filename and section, and a link to the document viewer.

/ — source card with relevance score
Exploring: GitLab Employee Handbook
+ New Chat
AI
Sources
Source 1 81% ^ Hide
content__handbook__people-group__relocation.md.md
§ Team Member

9B0lsMu7dMhof1ghPuBxHP23DuDqi2qpWF8pCWyEUN4/edit).
If you move before establishing eligibility to work, but then cannot establish eligibility to work in the new location within the first six months of residency, it may affect your ability to continue your role with GitLab.
How To Apply for a Long-Term Relocation
Team Member
Review the Country hiring guidelines to see if we can support your relocation.
View in document ↗
Screen 05 · Document viewer

Highlighted chunk in original context.

The viewer opens the source document inline with the retrieved chunk highlighted. Surrounding context remains visible for verification.

/ — inline document highlight
Exploring: GitLab Employee Handbook / relocation.md
+ New Chat

Once you are certain that you are eligible to work in your requested location country, you will need to provide proof of eligibility by [uploading the proof in the Documents tab of your Workday profile](https://docs.google.com/document/d/1

9B0lsMu7dMhof1ghPuBxHP23DuDqi2qpWF8pCWyEUN4/edit).

If you move before establishing eligibility to work, but then cannot establish eligibility to work in the new location within the first six months of residency, it may affect your ability to continue your role with GitLab.

How To Apply for a Long-Term Relocation
Team Member

Review the Country hiring guidelines to see if we can support your relocation.

*If you are moving to a different country, please start this process no later than 3 months prior to your ideal relocation date.

Architecture

Stack.

Vite + React frontend. FastAPI backend with four routers under /api. ChromaDB persists one collection per topic. OpenAI text-embedding-3-small for vectors, gpt-4o-mini for generation.

Chunking splits on paragraph → sentence → word boundaries with 50-character overlap and header detection. Retrieval returns top-5 chunks filtered at cosine ≥ 0.3. The generator prompt restricts the LLM to retrieved context and requires inline source tags.

GET /api/topics POST /api/query /api/documents /api/viewer
OnboardAI · Backend Architecture Request flow, left → right
CLIENT API · FASTAPI SERVICES · app/services/ DATA EXTERNAL Browser React · Vite Tailwind HTTPS · JSON CORS MIDDLEWARE app/main.py ▸ topics GET /api/topics ▸ query POST /api/query ▸ documents CRUD /api/documents ▸ viewer chunk · source inspection app/services/ · cluster embeddings embeds queries & chunks retriever top-K cosine + threshold k=5 · cos ≥ 0.3 generator builds prompt · calls LLM · returns grounded answer + inline source citations temperature 0.2 · top-5 context vector_store ChromaDB client wrapper · one collection per topic add · query · delete · list document_ processor PDF · DOCX · MD text extraction chunker ¶ → sent. → word 50-char overlap header detection ChromaDB persistent · chroma_data/ cosine space ▤ Employee Handbook ▤ Franchise Ops ▤ Real Estate ▤ SBA Tax Guide ▤ Supabase Docs 5 collections · one per topic uploads/ raw source files user-uploaded source_docs/ pre-bundled corpora demo KBs OpenAI Embeddings API text-embedding-3-small OpenAI Chat API gpt-4o-mini QUERY FLOW Client → /api/query → embeddings (+ OpenAI) → retriever → Chroma → generator (+ OpenAI) → Client INGEST FLOW scripts/ingest_demos.py or /api/documents → document_processor → chunker → embeddings → vector_store → Chroma
Design decisions

Three product calls.

Pre-load real corpora. An empty RAG demo doesn't demonstrate retrieval. Three indexed knowledge bases (GitLab, SBA, Supabase) let a visitor test the loop immediately.

Collapse sources by default. The answer is primary; citations sit below, collapsed. Users who trust the answer move on. Users who need verification expand.

Display chunks verbatim. Retrieval sometimes returns fragments with markdown or hashes. The source card shows them as-is so users can diagnose why an answer was produced.

Generator system prompt (excerpt)
You are OnboardAI, an assistant grounded in the retrieved context below.
Rules:
→ Answer only using the provided context.
→ Cite every claim inline as Source N.
→ If the context does not contain the answer, say so plainly.
→ Preserve numbered lists, links, and structure from the source.
// Retrieved chunks: top-5, filtered to cosine ≥ 0.3
// Conversation history: last 5 turns
Outcome

Shipped.

3
Pre-loaded KBs
HR · Tax · Dev docs
3,279
Chunks indexed
Across three corpora
~$0.50
Monthly run cost
Vercel + Render + OpenAI
4
API endpoints
Total backend surface