Wang Zi

CASE 04 / ENGINEERING IN DETAIL

AI Customer Support & Knowledge Retrieval

I contributed to support-message processing and routing based on business context.

Qifu Technology (奇富科技) · Contributor to message processing and routing · 2026

Context and constraints

Support inquiries need ticket context to choose among clarification, status queries, knowledge retrieval, and human handoff. The platform retains model calls and citations for answer investigation and operational feedback. My contributions were in message processing and routing; the following also describes the wider workflow those modules participate in.

Core workflow

This diagram is a simplified view of the technical approach.

  1. 01 / Message intakeReceive inquiries and persist records
  2. 02 / Scenario routingRules, classification, and context
  3. 03 / Knowledge retrievalRelevance scores and thresholds
  4. 04 / Reply & feedbackCitations, calls, and operational records

Design decisions and implementation

01

Persist processing records before calling the model

ChallengeMessage intake and model calls run at different speeds. After a failure, the system also needs to know which state the task reached.

ApproachThe system receives messages through RabbitMQ, persists processing records, and invokes the model asynchronously. Duplicate-message checks, state-conditioned retries, and timeout cleanup manage the task lifecycle.

ReasoningAfter a model-call failure, task records help determine whether to retry or clear a timed-out state, beyond the response from a single request.

02

Organize context and routing by support ticket

ChallengeClassifying only the latest sentence can miss the support ticket’s background and differences between business scenarios.

ApproachThe routing pipeline combines rules, model classification, and knowledge retrieval in stages, with bounded context organized by support ticket. Routes support clarification, status queries, and human handoff.

ReasoningRouting can use ticket history while retaining stage-by-stage decisions, helping locate classification or retrieval errors.

03

Retain citations, prompts, and model-call details

ChallengeThe final reply alone cannot explain its source or why a particular model call produced an unsuitable result.

ApproachThe system integrates the Bailian knowledge base and uses retrieval scores and thresholds to inform replies. It retains routes, cited passages, prompt versions, model and token information, and operational feedback.

ReasoningAn answer can be checked against its cited passages, prompt, and model call to investigate whether an issue arose in retrieval or generation.

What the design addresses

Contributed to support-message processing and scenario routing. The system uses ticket context and task state to handle duplicate messages, failure retries, and timeout cleanup.

Validation focus

  • Do duplicate messages, timed-out tasks, and failed retries follow the correct state-dependent paths?
  • Do missing knowledge, retrieval failures, and insufficient context lead to appropriate routing or feedback?
  • Can an answer be traced to its knowledge citations, prompt version, and model call?

My contribution

Contributed to support-message processing and routing, using business context to distinguish support scenarios.

Technologies and topics

  • Java 17
  • Spring Boot 3
  • LangChain4j
  • RabbitMQ
  • PostgreSQL
  • RAG / Bailian

Let’s talk about what you’re building.

Share your goals, current systems, and delivery scope. We can work through the key technical questions and a practical path forward.

Send an email ↗