Services

Design through operation,
owned by CodeBailey.

CodeBailey gathers scattered data, reads documents and turns them into knowledge, and puts multiple agents to work, owning the design, build and operation end to end.

How it flows

Four stages that flow,
three that support them.

See how seven services fit together, from data collection to multi-agent systems, with tuning, private infrastructure and security beneath them. Adopt only the stages you need.

  • Seven services
  • Modular adoption
  • Tuning & security

Service 1 / Data collection

Agents gather your
scattered data.

Databases, ERP, groupware, the web, email, legacy systems: data piles up separately in every department. Collection agents gather it on a schedule and by rule, then keep syncing only what changed.

The data exists, but you can't use it.

Data kept by each department differs in format and access rights, so people move it by hand and no one can be sure which version is current.

  • Data silos
  • Manual copying
  • Unclear freshness
  • Every system has its own format and permissions, so nothing ends up in one place
  • People still download and paste data by hand, over and over
  • No one can say for certain which copy is the latest

Connect, gather,
and keep the source.

Connectors and collection agents link databases, ERP, the web and mail, sync only what changed, and log every pull so each record can be traced to its origin.

  • CDC sync
  • Web & disclosure crawling
  • Collection history
  1. 01

    Source connections

    Connect databases, ERP, groupware, and SaaS through connectors and pull only what changed (CDC)

  2. 02

    Web & disclosure collection

    Collect portals, disclosures, and boards on schedule, filtering out duplicates and changes

  3. 03

    Mail & attachment sorting

    Group mail and attachments by task and hand them off to the next step

  4. 04

    Collection history

    Record what was collected, when, and from where, so the source stays traceable

Linking data
has been our work.

From personal health record data exchange to real-time collection of production, quality and equipment data, these pipelines were built into systems in daily operation.

  • Korea PHR
  • MES
  • Airflow
  • 2025 ~ · Samsung Electronics

    Built and operate Korea's PHR cloud data interface

    Built and operate a personal health record (PHR) MyData work system

  • 2023 · Miseong Co., Ltd.

    Built an MES (manufacturing execution system)

    Built a real-time environment for collecting and integrating production, quality, and equipment data

  • Kafka
  • Airflow
  • Spark
  • dbt
  • CDC

Service 2 / Document parsing

We read documents down
to their tables and structure.

PDF, HWP, Office, and scanned documents become data while headings, tables, and paragraph structure stay intact. Then we pull the fields you need and classify and summarize them.

Documents used to be
readable only by people.

HWP files and scanned PDFs resist even basic text extraction, broken tables strip numbers of their meaning, and staff end up retyping key fields by hand.

  • HWP & scanned PDF
  • Broken tables
  • Manual retyping
  • HWP and scanned PDFs make it hard to extract even plain text with ordinary tools
  • When a table breaks, the meaning of the numbers breaks with it
  • People still copy key fields out of contracts and reports by hand

We read and extract
while keeping the structure.

Heading hierarchy and table structure survive conversion, scans are read with OCR, and fields such as contract amounts and deadlines are extracted and validated.

  • Structure-preserving
  • OCR
  • Field extraction
  1. 01

    Structure-preserving parsing

    Converts documents while keeping heading hierarchy, table rows and columns, and even footnotes

  2. 02

    OCR

    Recognizes scanned documents, images, drawings, and handwriting

  3. 03

    Field extraction

    Pulls defined fields such as contract amount, deadline, and parties, and validates their format

  4. 04

    Classification & summarization

    Sorts document types and summarizes the key points so search and agents can put them to use

Service 3 / Embedding and RAG

Answers that find their
evidence in your knowledge.

We split documents into meaningful chunks, embed them, and store them in a vector database. Keyword and semantic search work together to find what matters, and every answer carries its source.

A plausible answer needs evidence behind it.

General LLMs don't know internal rules, answers without sources can't be used at work, and many organizations simply can't send documents to an outside cloud.

  • Source citations
  • Internal policies
  • No data egress
  • General-purpose LLMs don't know your internal policies or latest documents
  • An answer with no source can't be used for real work
  • Many environments can't send internal documents to an outside cloud

Seven steps
to a grounded answer.

Documents pass through chunking, bge-m3 embedding, hybrid search and local LLM generation, and every sentence of the answer links back to its original source.

  • bge-m3
  • BM25 + RRF
  • Citations
  1. 01

    Document ingestion

    Gathers PDF, DOCX, HWP, PPTX, XLSX, and scanned images (OCR) while preserving tables and layout structure

  2. 02

    Chunking

    Splits documents into meaning units and tunes parent-child structure and overlap to preserve context

  3. 03

    Embedding (bge-m3)

    Converts chunks into vectors with the multilingual embedding model bge-m3 (1024 dimensions)

  4. 04

    pgvector (HNSW) storage

    Stores vectors in PostgreSQL's pgvector HNSW index, searching large collections of chunks in milliseconds

  5. 05

    Hybrid search (BM25 + RRF)

    Fuses keyword search (BM25) with vector search using RRF, cutting down on missed documents

  6. 06

    LLM generation (Ollama)

    Feeds retrieved evidence in as context, and a local LLM generates the answer through Ollama

  7. 07

    Cited sources

    Attaches a source marker [n] to each sentence, and a click reveals the original evidence

Behind the accuracy,
proven formulas.

Attention, cosine similarity, BM25, RRF and MMR: the math that governs retrieval and generation quality, and where each one is put to work.

  • BM25
  • RRF
  • MMR

F.01 · Transformer Core

Scaled Dot-Product Attention

Attention(Q, K, V) =
softmax( QK⊤ ⁄ √dk ) · V

The core computation behind every LLM inference. Q·K⊤ scores are normalized by √dk to stabilize training, and FlashAttention with KV-cache cuts inference latency.

F.02 · Vector Search

Cosine Similarity · ANN

sim(q, d) =
E(q) · E(d) ⁄ ( ‖E(q)‖ · ‖E(d)‖ )

Finds documents that are semantically close in embedding space. HNSW indexes search large vector collections approximately, keeping responses to milliseconds.

F.03 · Lexical Score

Okapi BM25

BM25(D, Q) = Σi IDF(qi) · Ti
Ti = tfi(k₁+1) ⁄ ( tfi + k₁(1−b+b·|D|⁄avgdl) )

A keyword-matching method built on TF-IDF. It pairs with vector search to catch signals such as domain abbreviations and identifiers that semantic embeddings tend to miss.

F.04 · Hybrid Fusion

Reciprocal Rank Fusion

RRF(d) = Σi 1 ⁄ ( k + ranki(d) )
k = 60   (standard heuristic)

Fuses results from different scoring scales using rank alone. Without normalization, it reliably combines BM25 and vector search results into a single ranking.

F.05 · Diversification

Maximum Marginal Relevance

MMR = arg maxd [
  λ·sim(d, q) − (1−λ)·maxj sim(d, dj) ]

Balances relevance and diversity when selecting passages. Removing duplicate chunks makes the context window more efficient and raises the answer's information density.

F.06 · RAG Eval

RAGAS Faithfulness

Faithfulness =
| claims grounded in ctx | ⁄ | claims generated |

Measures hallucination numerically. Every claim in an answer is broken down and checked against how much of it is backed by the retrieved context.

Click a tab and
try Bailey RAG yourself.

A simulation that reproduces how the real product handles three screens: Q&A, bulk research and security.

bailey-rag · localhost:8800 100% LOCAL
Query · hybrid RAG
>
Include confidential documents (permission filter on)
1Query embeddingbge-m3 · 1024-d
2Hybrid searchBM25 + Vector(HNSW) · top-200
3RRF fusionreciprocal rank fusion · k=60
4Rerank · build contexttop-8 · permission filter
5LLM generation (streaming)Ollama · qwen2.5 · 100% local
6Citation checkcitation grounding · cite-span
Answer · with cited sources
Waiting…
Dual-engine fusion shareBM25 + Vector
Vector (meaning) BM25 (keywords)
Bulk research · Stanford STORM, a 6-step multi-perspective report
STEP 01

Find perspectives

Automatically finds the stakeholder perspectives on a topic.

STEP 02

Ask from each angle

Writes in-depth questions per perspective to widen the search.

STEP 03

Hybrid search

Gathers evidence from internal documents with BM25 and vector search.

STEP 04

Outline

Designs the report structure from the evidence gathered.

STEP 05

Write

Writes each section, citing its evidence.

STEP 06

Summarize

Closes with a summary of the key points.

Blocking confidential data from leaving
📄Confidential evidence chunk selectedGrade: confidential · user passed permission check
▼
☁️Attempt to call an external cloud LLMClaude API (optional backend)
▼
🛑Governance policy — transfer blockedConfidential evidence may not leave · logged as CRITICAL
▼
🖥️Fallback to local Ollama · answer generatedDocuments never leave the closed network
Audit trail
14:23:09CRITICALConfidential evidence blocked from external transfer · doc=InfoSec_Policy_v3.2
14:23:08QUERYHybrid query run · confidential included · top-8
14:21:55UPLOADDocument uploaded · grade=confidential · indexed
14:20:31GRADEGrade changed · general → confidential · user=admin
14:18:02TOOLMCP tool call · arXiv search · results indexed

※ This demo is a simulation of how the real product, Bailey RAG, works.

We've been building
grounded answers.

LLM and RAG programs for KISTI, an LLMOps platform and Bailey RAG, the company's own air-gapped RAG platform, were all designed and built in-house.

  • KISTI
  • KONI LLMOps
  • Bailey RAG
  • 2026 · KISTI

    AI agent toolkit for research automation

    An air-gapped research platform with document structuring, text, table, image and formula extraction, and a standard API linking LLM, VLM, RAG and agents (ongoing)

  • 2025 · KISTI

    LLMOps for the KONI LLM and RAG system

    Training-data generation and integrated search for a science-specialized LLM, LLMOps platform features, and an AI agent development and deployment platform

  • 2024 · LLMOps

    LLMOps Platform Development

    Built an LLMOps platform to support large language model (LLM) development and operations

  • In-house

    Bailey RAG · Air-gapped Private RAG platform

    An installable RAG that answers from internal documents with citations, with access filters by document class and audit logs of queries and uploads

Service 4 / Multi-agent systems

Multiple agents
split the roles and work.

Research, drafting, review, approval. We design agents with roles split like a human organization, hand them your internal systems as tools, and route important decisions through human approval.

One chatbot doesn't
finish the work.

A chatbot that only answers can't complete work that spans several systems, and it leaves no record of what the AI did or on what basis.

  • Chatbot limits
  • Cross-system work
  • Action records
  • Answering a question and finishing a task are not the same thing
  • Work that crosses several systems doesn't get done with a single prompt
  • There has to be a record of what the AI did and on what basis

Split the roles, connect
the tools, get sign-off.

Each step gets its own agent and permissions, internal systems connect as MCP tools, and sensitive steps such as payments or external mail wait for approval.

  • MCP tools
  • Orchestration
  • Human approval
  1. 01

    Role design

    Breaks work into steps and assigns each step's agent and permissions

  2. 02

    Tool connections

    Connects internal systems and APIs as MCP tools so agents can query and execute directly

  3. 03

    Orchestration

    Splits work across agents, reassigns it on failure, and collects the results

  4. 04

    Human approval

    Routes important steps, such as amounts and external communications, through human review before proceeding

Built to keep running
as agents multiply.

Two 2026 patent filings scale processing modules with load and, when one fails, hand its task queue and state to healthy modules so the work carries on.

  • Dynamic autoscaling
  • Task recovery
  • Patent filings
  • 2026.06 · Patent filed

    Dynamic autoscaling and load balancing for autonomous task-processing modules

    Based on resource profiling in a shared state store (Application No. 10-2026-0110008)

  • 2026.06 · Patent filed

    Task recovery via task-queue redistribution and state handover

    Across multiple autonomous task-processing modules (Application No. 10-2026-0109943)

Service 5 / Fine-tuning

We teach the model
our voice and knowledge.

We build a domain dataset, adapt the model with LoRA and DPO, then score accuracy and faithfulness as numbers, comparing before and after on the same standard.

General-purpose models
don't know your work.

Off-the-shelf models misuse industry terms and document formats, prompts alone can't stabilize quality, and there is no way to tell whether a change actually helped.

  • Domain terms
  • Unstable quality
  • No measurement
  • They routinely get industry terms and document formats wrong
  • Prompting alone can't keep quality stable
  • There's no way to confirm a model swap actually improved things

Teach it,
measure it, compare it.

Datasets come from your work documents, models are tuned with LoRA and DPO, and RAGAS metrics compare results before and after on the same yardstick.

  • LoRA
  • DPO
  • RAGAS
  1. 01

    Dataset construction

    Builds training and evaluation data from work documents and query logs

  2. 02

    LoRA fine-tuning

    Trains only a small set of parameters, adapting the model even on a single GPU

  3. 03

    Preference alignment (DPO)

    Matches answer style using pairs of good and bad responses

  4. 04

    Evaluation & regression testing

    Measures accuracy and faithfulness with RAGAS and compares before and after changes

The formulas behind
model tuning.

LoRA trains only a tiny fraction of the parameters so tuning fits on a single GPU, while DPO aligns answer style directly from preference pairs with stable training.

  • LoRA
  • QLoRA
  • DPO

F.07 · PEFT

LoRA Low-Rank Adapter

W = W₀ + (α ⁄ r) · BA
A ∈ ℝr×k,   B ∈ ℝd×r,   r ≪ d

Adapts a model to a domain by training 104× fewer parameters than full fine-tuning. Combined with QLoRA's NF4 quantization, it can fine-tune a 65B-class model on a single 48 GB GPU.

F.08 · Alignment

Direct Preference Optimization

ℒDPO = − log σ ( β·Δw − β·Δl )
Δy = log π(y|x) ⁄ πref(y|x),  y ∈ { yw, yl }

Aligns a model directly from preference pairs, without a reward model or PPO. It keeps training stable while staying compute-efficient.

We've been tuning
and evaluating models.

An LLMOps platform supporting LLM development and operations, plus training-data generation and LLMOps capabilities for KISTI's KONI LLM.

  • LLMOps
  • KONI LLM
  • Training data
  • 2024 · LLMOps

    LLMOps Platform Development

    Built an LLMOps platform to support large language model (LLM) development and operations

Service 6 / Private AI

AI infrastructure your
data never leaves.

We design on-premise model serving and GPU infrastructure so LLMs run even in network-segmented, air-gapped environments, mixing in public cloud when it's needed.

When security is the
reason you can't use AI.

Public, financial and medical data can't leave the premises, and the burden of running GPUs and keeping up with model changes stalls adoption further.

  • Public, finance, health
  • GPU operations
  • Model changes
  • Public-sector, financial, and healthcare data can't leave the building
  • Even with GPU servers in place, there's no one to operate them
  • You can't rebuild the whole system every time the model changes

Run it inside,
mix in the cloud when needed.

Open-source LLMs run on internal servers with GPUs sized to actual use, and a hybrid setup keeps sensitive data inside while the rest runs on public cloud.

  • Ollama serving
  • GPU design
  • Hybrid cloud
  1. 01

    On-premise LLM

    Serves open-source LLMs on internal servers through Ollama and similar runtimes

  2. 02

    GPU design

    Designs GPU configuration and placement to match actual usage

  3. 03

    Hybrid cloud

    Keeps sensitive data inside, and runs everything else on AWS, Azure, or GCP

  4. 04

    Model swapping

    Lets you swap the model alone, without changing the application

We've been running AI
in air-gapped networks.

As an NVIDIA Inception member, CodeBailey runs its own air-gapped RAG platform, Bailey RAG, and deploys to separated networks with offline bundles and Kubernetes.

  • NVIDIA Inception
  • Bailey RAG
  • Offline bundle
  • 2023.02 · NVIDIA

    NVIDIA Inception Partner

    A global partnership for GPU-accelerated AI development

  • In-house

    Bailey RAG — air-gapped RAG platform

    Designed, built, and operated in-house

  • Docker
  • Kubernetes
  • Offline Bundle
  • PaaS-TA
  • FastAPI
  • PostgreSQL
  • Redis
  • ECharts

Service 7 / Operations and security

Stay safe.
Keep running well.

We log what agents were asked and how they answered, block prompt attacks and personal-data leaks, and watch accuracy and cost every day.

What comes after launch
is the harder part.

Once live, prompt attacks, data leaks, unnoticed drops in answer quality and unpredictable costs become the real challenges.

  • Prompt attacks
  • Quality drift
  • Cost control
  • Prompt attacks and information leaks are a constant worry
  • You can't tell when answer quality started slipping
  • Usage and cost are impossible to predict

Block it, mask it,
log it, watch it.

Input and output guardrails, automatic masking of sensitive data, query and access audit logs, and monitoring of accuracy, latency and cost keep operational risk under control.

  • Guardrails
  • PII masking
  • Audit logs
  1. 01

    Guardrails

    Blocks prompt injection and prohibited topics at both input and output

  2. 02

    PII masking

    Automatically hides sensitive data like resident registration numbers and phone numbers

  3. 03

    Audit logs

    Records who asked what, and which documents they saw

  4. 04

    Monitoring

    Tracks accuracy, latency and cost, and alerts when any of them crosses a threshold

We've kept AI systems
running safely.

The National Tax Integrated System (NTIS) has been kept running without interruption, and a K-Health data safe zone for analyzing de-identified medical data was built with Konyang University Hospital.

  • NTS · NTIS
  • Data safe zone
  • De-identification
  • 2023–2024 · Konyang University Hospital

    Built the K-Health data safe zone

    Built the data safe zone portal for analyzing de-identified medical data securely

  • 2024–2025 · National Tax Service

    Next-generation National Tax Integrated System (NTIS) operations & maintenance

    Ensured stable operations for a core national tax system

  • Ollama
  • bge-m3
  • bge-reranker
  • Claude API
  • PostgreSQL · pgvector
  • Redis · RQ
  • FastAPI
  • Docker Compose
  • Kubernetes
  • Offline Bundle
  • Electron

How we work

Prove it,
then scale it company-wide.

We assess your data and workflows, prove accuracy with numbers in a PoC, connect the result to internal systems, and stay on to run and secure it.

  • Assessment
  • PoC validation
  • Operations & security

01

Diagnose

We look at your data and work to pick the problem agents should solve

02

PoC

We pick a core workflow and verify accuracy with numbers

03

Build

We connect it to your internal systems and put it into real work

04

Operate

We run monitoring, evaluation, and security together with you

Contact

Start agents that work
on your data, today.

Start with a 30-minute consultation on turning your scattered data into agents, and see the impact yourself in a pilot within 2 weeks.

  1. 01Free AI consultingA 30-minute video call to set direction
  2. 02Technical PoCA RAG/LLM pilot within 2 weeks
  3. 03Custom quoteA detailed proposal within 48 hours

help@codebailey.com070-8064-8458