← Back to Work

Selected case studies · SYSTEM

Generative AI (K-Bot) Metadata-Based Document Source Tracking

An end-to-end grounding system that traces inline LLM citations back to chunk metadata and the exact source

Role
AI/RAG · Backend
Period
2025.12 ~ 2026.01
Stack
RAG · Metadata design · Svelte

01 / Problem

All retrieved documents appeared as sources, while the cited answer text was difficult to connect to an exact document location.

02 / Constraints

  1. 01

    LLM citation formatting varied between responses.

  2. 02

    PDF pages, Excel rows, and text documents used different location models.

  3. 03

    Text and provenance could not separate during retrieval and reranking.

03 / Decisions & approach

01

Chunk-level provenance model

File, page, sheet, and row locations were normalized into shared metadata.

02

Resilient matching

Citation text is normalized before exact and fallback matching run in sequence.

03

Show only cited evidence

Users see the sources actually referenced by the answer, not every retrieval candidate.

04 / System flow

Citation trace flow

  1. 01

    Retrieve

    Search text + source

  2. 02

    Rerank

    Preserve metadata

  3. 03

    Generate

    Create inline citations

  4. 04

    Match

    Normalize + fallback

  5. 05

    Verify

    Open exact location

05 / Outcome

  • Inline citations connect to exact PDF pages, Excel rows, and text evidence.
  • Users can inspect only the evidence actually used in the answer.

06 / Lessons

RAG trust comes from the accuracy of the answer-to-evidence link, not the number of sources displayed.