Back to Cuicui

SYSTEM CARD · CUICUI RAG

Cuicui Architecture & Guardrails

Engineered with restraint: strictly grounded corpus, server-side file validation, prompt-injection defense, and zero conversation logging.

Request Pipeline (/api/chat)

01

Validation, Rate Limit & File Verification

Zod schema checks, per-IP sliding-window rate limiting, trilingual prompt-injection & private-topic guards, plus server-side format, size, and binary magic-byte inspection for uploaded files.

02

Multilingual Hybrid Retrieval (FR / EN / ZH)

Searches Xiaohua's structured corpus (CV, 9 case studies, services, skills, education, contact) using accent-folded IDF scoring and CJK bigram indexing.

03

Two-Stage Vetting & Relevance Routing

Stage 1 inspects query scope and uploaded file relevance/safety first: out-of-scope prompts or irrelevant/unsafe files are rejected immediately before Stage 2 synthesis runs.

04

Grounded Streaming Synthesis & Allowlisted Links

Streams grounded answers in real time with verifiable source cards and links strictly limited to internal portfolio routes, LinkedIn, and GitHub.

Safety & Privacy Guarantees

  • Ephemeral sessions: conversations are never persisted to a database or sent to the developer; starting a new chat wipes the thread permanently.
  • Strict structural delimiters isolating untrusted user input and uploaded files from system instructions.
  • Strict URL allowlist (internal routes, LinkedIn, and GitHub only) — arbitrary external links and images are never rendered.
  • No external tools, no open web browsing, and no binding commitments.