---
title: 'LingXi: Diverse Research Applications'
url: https://www.emergentmind.com/topics/lingxi
type: topic
---

# LingXi: Diverse Research Applications

Searching arXiv for the cited Lingxi papers and related entries.
arxiv_search query: "Lingxi"
LingXi, or Lingxi, is not a single model or platform in the arXiv literature. The name has been used for at least four distinct research artifacts: a Chinese psychiatric-diagnosis benchmark centered on LingxiDiagBench and LingxiDiag-16K; a diversity-aware Chinese modern poetry generation system; a repository-level issue resolution framework for software engineering; and a production system for personalized adaptive video streaming. These works are methodologically unrelated, but each uses the name for a technically specific system with its own datasets, objectives, and evaluation regime [2602.09379] [2108.12108] [2510.11838] [2508.16454].

## 1. Disambiguation and scope

The major arXiv usages of the name are summarized below.

| Usage of LingXi | Domain | Core artifact |
|---|---|---|
| LingxiDiagBench / LingxiDiag-16K | Chinese psychiatric consultation and diagnosis | Multi-agent benchmark and synthetic dialogue dataset |
| Lingxi | Chinese modern poetry generation | GPT-2-like system with NS-RH decoding and semantic rejection sampling |
| Lingxi | Repository-level issue resolution | Procedural-knowledge-guided framework for fixing software issues |
| LingXi | Adaptive video streaming | Personalized objective-adjustment system for ABR |

A recurring misconception is to treat LingXi as a single general-purpose model family. The published work does not support that interpretation. In one paper, “LingXi” refers to a psychiatric benchmarking effort centered on LingxiDiagBench and LingxiDiag-16K; in another, it denotes a poetry generation system; in a third, it denotes a software issue resolution framework; and in a fourth, it denotes a deployed personalized streaming system. The shared name therefore identifies different research programs rather than a unified architecture.

## 2. LingxiDiagBench: psychiatric consultation and diagnosis in Chinese

In psychiatric AI, “LingXi” refers to a benchmarking effort built around two artifacts: **LingxiDiagBench**, the evaluation framework, and **LingxiDiag-16K**, a dataset of **16,000 synthetic consultation dialogues with synthetic EMRs** designed for Chinese-language, ICD-10-aligned psychiatric assessment [2602.09379]. The stated target is substantially narrower than generic medical QA: models are evaluated on whether they can ask clinically useful questions, gather missing information over multiple turns, and then make diagnostic judgments under outpatient psychiatric conditions.

The benchmark is grounded in a real source dataset, **LingxiDiag-Clinical**, derived from about **4,500 outpatients** seen at the **Shanghai Mental Health Center (SMHC)** between **2023 and 2024**. After preprocessing, de-identification, automatic transcription, and manual verification, the authors curated **1,709 cases** with well-annotated EMRs and verified transcripts. The synthetic benchmark is then generated from this real distributional anchor. Each synthetic case contains structured psychiatric record fields aligned to outpatient EMRs, including demographics, chief complaint, present illness history, past medical and psychiatric history, family history, and diagnostic conclusions.

The synthetic generation pipeline is explicitly distribution-matching. The authors extract demographic and clinical features from the real cases to build a knowledge graph, then generate synthetic EMRs by sampling from this graph according to the empirical distribution in the real data. Reported demographic matching includes **32.3% male / 67.7% female** in the clinical data versus **32.4% male / 67.6% female** in LingxiDiag-16K, and the appendix uses **Jensen-Shannon divergence** as evidence of high distributional similarity. The major diagnosis proportions are also closely matched, including **F32 depressive episode 35.2% vs 34.8%**, **F41 anxiety disorders 22.1% vs 22.5%**, **F43 stress-related 12.3% vs 12.1%**, **F31 bipolar disorder 8.7% vs 8.9%**, **F42 OCD 5.4% vs 5.6%**, **F20 schizophrenia 4.8% vs 4.5%**, **F45 somatoform 3.9% vs 4.1%**, **F51 sleep disorders 3.2% vs 3.3%**, **F39 unspecified mood 2.1% vs 2.0%**, **F98 childhood-onset 1.5% vs 1.4%**, and **Others 0.8% vs 0.8%**.

The benchmark’s full **12-way diagnosis task** uses **F20, F31, F32, F39, F41, F42, F43, F45, F51, F98, Z71, and Others**. It is implemented as a multi-agent system with a **Patient Agent**, **Doctor Agent**, **Diagnosis Agent**, and **LLM-as-a-Judge evaluators**. In **static diagnostic inference**, the model receives a complete consultation transcript and predicts diagnoses; this isolates diagnostic reasoning over a fixed information set. In **dynamic multi-turn consultation**, the model itself plays the Doctor Agent and must decide what to ask next, when to stop, and what diagnosis to issue.

A major contribution is the patient simulator, **LingxiDiag-Patient**. It was designed because off-the-shelf LLM patient simulation was judged unrealistic in three ways: responses were too long, symptoms were dumped all at once, and language was too polished. The prompt therefore enforces **brief, colloquial, emotionally restrained, fact-based answers** together with a “Response Length Requirement.” On the doctor side, four interview strategies are supported: **Free-form**, **Symptom-Tree**, **APA-Guided**, and **APA-Guided + MRD-RAG**. The APA-guided scaffold has five phases: **Screening (3–5 questions)**, **Assessment (5–8 questions)**, **Deep-dive (3–6 questions)**, **Risk Assessment (2–4 questions)**, and **Closure (1–2 questions)**.

The reported findings are clinically narrow but methodologically important. In static evaluation on LingxiDiag-16K, the best **2-class** result is **0.854 accuracy** by **Gemini-3-Flash**, but the **4-class** task is led by traditional lexical baselines, including **TF-IDF + RF at 0.479** accuracy and **TF-IDF + LR at 0.458 macro-F1 / 0.480 weighted-F1**. In the **12-class** task, **GPT-5-Mini** reaches **0.409** accuracy, while the best macro-F1 among all methods is **TF-IDF + LR with 0.295**. On the real LingxiDiag-Clinical dataset, **Qwen3-32B** achieves the highest aggregate “Overall” score at **0.548**, but simple lexical methods remain competitive. In dynamic evaluation, the strongest strategy is **APA-Guided + MRD-RAG**. Under that setting, **DeepSeek-V3.2** reaches **92.3% accuracy** on the **2-class** task, while **Grok-4.1-Fast** reaches **43.0% accuracy** on the **4-class** task and **28.5% accuracy** on the **12-class** task. The benchmark’s central conclusion is that dynamic consultation often underperforms static evaluation: models can frequently reason from a complete transcript better than they can obtain that transcript themselves. Consultation quality and diagnostic accuracy are only moderately correlated, with reported correlation **\(r = 0.43\)**. The paper explicitly warns that the benchmark is **“designed exclusively for research purposes”** and **“is not a clinical diagnostic tool.”**

## 3. Lingxi as a Chinese modern poetry generation system

In natural language generation, “Lingxi” denotes a Chinese modern poetry generation system built around a **GPT-2-like language model backbone**, a diversity-aware decoding method called **NS-RH** (“nucleus sampling with randomized head”), and a **semantic-similarity-based rejection sampling** stage for topic preservation [2108.12108]. The system addresses a task formulation in which the input is often only a short poetry title, so the generator must create a full poem from minimal context while avoiding repetition, generic over-fluent text, and topic drift.

The backbone is an **auto-regressive Transformer decoder** with **24 Transformer layers**, **16 attention heads**, **embedding size 1,024**, **maximum context length 128**, and **330 million parameters**, trained on **8 NVIDIA GeForce RTX 2080 Ti GPUs**. Training proceeds in two stages: pre-training on about **3,500 published books of Chinese novels**, then fine-tuning on about **220,000 passages of Chinese modern poetry and lyrics**, yielding the model called **GPT-2 LyricCN**. The preprocessing pipeline uses **THULAC** for Chinese Word Segmentation followed by vocabulary pruning and subword decomposition. The reported vocabulary sizes are **12,643** after the initial merge, **23,296** after subword decomposition, and **17,589** after final pruning.

The system encodes structural information using special tokens such as `[TITLE]`, `[START-OF-PASSAGE]`, `[NEWLINE]`, and `[END-OF-PASSAGE]`. Training uses **Adam**, **weight decay 0.01**, **linear decay**, and **1% of total steps** as warm-up. The best fine-tuning result is reported at **epoch 4** with learning rate \(2\times 10^{-5}\), and the validation perplexity moves from **17.58** after pre-training to **16.75** for the best fine-tuned model.

The core technical proposal is **NS-RH**. The paper defines the randomized head as
\[
V^{head} = NS(q)\cap top1ctrl(n),
\]
with
\[
top1ctrl(n)=\big\{x\mid p(x)\ge\max{p(x)}/n\big\}.
\]
Here \(NS(q)\) is the nucleus set under threshold \(q\), and \(top1ctrl(n)\) keeps tokens whose probability is at least \(\max p(x)/n\). Lingxi then evenly redistributes the probability mass over \(V^{head}\), while still performing ordinary nucleus filtering with parameter \(p\), where \(p \ge q\). The stated intuition is that in poetry the source of low diversity is not only the low-probability tail but also the over-dominant high-probability head. In the appendix, the reported setting for NS-RH is \(p=0.90\), \(n=100\), with tunable \(q\).

The second major component is **semantic-similarity-based rejection sampling**. The system generates \(N\) short hypotheses of length \(M\), scores them by semantic similarity to the title, accepts the most similar one, and then continues poem generation from that accepted prefix. In the appendix, the reported parameters are **\(N = 16\)** and **\(M = 20\)**. Sentence embeddings are formed by averaging hidden states from the **last 12 out of 24 layers** and applying standard normalization calibration, and similarity is measured by cosine distance.

Evaluation uses both automatic and human judgments. Automatic metrics include **Perplexity (PPL)**, **Self-BLEU**, **Zipf coefficient**, **repetition entropy**
\[
\mathbb{E}\{-\log{p(x)}\},
\]
**rhyming entropy**
\[
\mathbb{E}\{-\log{p_{rhyme}(x)}\},
\]
and line length. The system generates **5,000 samples per method** for metric computation. Human-system comparison uses **50 poems from each system** under the title “spring water,” with **103 annotations from 9 annotators** per system.

The main result is that NS-RH substantially increases novelty while preserving acceptable fluency. Representative settings include **NS-RH, \(p=0.80, q=0.60\)** with **PPL 8.82** and **Self-BLEU-4 0.50**, **NS-RH, \(p=0.80, q=0.80\)** with **PPL 28.71** and **Self-BLEU-4 0.35**, and **NS-RH, \(p=0.90, q=0.80\)** with **PPL 41.54**, **Self-BLEU-4 0.30**, and **Self-BLEU-5 0.17**. In human evaluation, **Lingxi (\(q=0.60\))** scores **4.43** for fluency, **4.31** for novelty, **4.23** for coherence, and **4.32** overall, compared with **Youling** at **4.24** overall and **XiaoIce** at **4.23** overall. The paper’s main claim is therefore not about likelihood optimization but about reshaping the probability distribution so that comparatively lower-frequency but still plausible words can compete during decoding.

## 4. Lingxi as a repository-level issue resolution framework

In software engineering, “Lingxi” refers to a framework for repository-level issue resolution that extracts **transferable procedural knowledge from historical issue-fixing data** and uses it to guide LLM agents on new issues [2510.11838]. The motivating claim is that existing LLM software agents can navigate code and generate patches, but they still struggle when success depends on architecture, execution flow, design conventions, and implementation constraints across an entire repository.

The framework separates **offline knowledge construction** from **online issue resolution**. In the offline stage, Lingxi reconstructs issue-specific procedural knowledge by reverse reasoning over historical issue reports, patches, and repository snapshots, then abstracts that knowledge into transferable form. In the online stage, it summarizes the target issue, retrieves similar historical issues, runs multiple knowledge-guided analysis agents in parallel, synthesizes the resulting analyses, and then passes the synthesis to planning and fixing agents.

The reconstructed knowledge schema contains **14 information types**. The **issue understanding knowledge** category contains **relevant architecture**, **dependency analysis**, **call trace**, **bug categorization**, **example usage context**, **concrete root cause analysis**, **current vs. expected behavior**, and **feature or functionality**. The **issue fixing knowledge** category contains **fix pattern**, **concrete fix steps**, **fix checklist**, **test case**, **resolution conclusion**, and **design patterns / code practices**. The paper later identifies **design patterns / code practices** as the most critical knowledge aspect overall.

Retrieval is context-aware. Each issue is summarized into four elements: the core problem, key technical details and error messages, expected vs. actual behavior, and relevant code components. Historical summaries are embedded with **Qwen3-Embedding-8B**, the top **20** nearest issues are retrieved by cosine similarity, they are reranked with **Qwen3-Reranker-4B**, and the top **3** are retained. Only issues created before the target issue are eligible, which avoids temporal leakage. Online scaling is applied to the **analysis phase** rather than to blind patch generation: each retrieved knowledge item drives one parallel analysis trajectory, and the analyses are later synthesized under four criteria, **Supportive**, **Complementarity**, **Accuracy**, and **Completeness**.

All agents use a **ReAct-style architecture**. Available tools are `view_directory`, `view_file_content`, `search_files_by_keywords` via ripgrep, and `str_replace_editor`. Context management compresses inter-agent communication by retaining observations and reasoning while discarding verbose tool outputs.

The main benchmark is **SWE-bench Verified**, a curated subset of **500 GitHub issues** drawn from the original SWE-bench dataset of **2,294 issues**, spanning **12 open-source projects**. The main metric is **Pass@1**. On this benchmark, **Lingxi + Claude 4 Sonnet** achieves **74.6% Pass@1**, compared with **70.40%** for **OpenHands + Claude 4 Sonnet**, **70.40%** for **Augment Agent v1 + Claude 4 Sonnet**, **70.08%** for **SWE-search + Claude 4 Sonnet**, and **66.60%** for **SWE-agent + Claude 4 Sonnet**. With weaker backbones, the framework still improves results: **GPT-4.1 mini** rises from **23.94%** under **mini-SWE-agent** to **45.20%** under Lingxi, and **Kimi-K2** rises from **65.40%** under **OpenHands** to **70.33%** under Lingxi.

The ablation study, run on **218 instances** at a **95% confidence level with a 5% margin of error**, is central to the paper’s interpretation. The full system achieves **74.80%**, compared with **72.48%** for **\(Lingxi_{woS}\)**, **68.30%** for **\(Lingxi_{woT}\)**, **67.74%** for **\(Lingxi_{woK}\)**, and **67.43%** for **\(Lingxi_{woSK}\)**. The framework therefore attributes most of its gains to transferable procedural knowledge rather than to scaling alone. The paper also reports that, among **20** manually inspected success cases, the qualitative coding agreement reaches **Cohen’s kappa = 0.66**. Limitations remain substantial: even with Lingxi, **25.4%** of SWE-bench Verified instances remain unresolved, and the failure analysis identifies **Incomplete fixes (6/20)**, **Incorrect fault localization (5/20)**, **Semantic errors (5/20)**, **Overfitting patches (2/20)**, and **Side-effect errors (2/20)**.

## 5. LingXi as a personalized adaptive video streaming system

In multimedia systems, **LingXi** denotes a production system for **user-level personalized adaptive video streaming** deployed at **Kuaishou** [2508.16454]. Its premise is that traditional optimization around system-wide QoS metrics such as bitrate, stall time, and smoothness has approached practical saturation in mature large-scale streaming systems, and that further gains require aligning optimization with actual user engagement.

The paper formalizes the conventional objective as
\[
QoE_{lin} = \sum_{k}q(Q_k) - \mu \sum_{k}T_k - \sum_{k}|q(Q_{k+1}) - q(Q_{k})|,
\]
but reports that in a production **5-day A/B test** the differences among three QoS-optimized production variants were small: video quality improvement space around **0.5%**, stall reduction around **2%**, and no statistically significant difference in total watch time. In Kuaishou’s production environment, only about **10% of users** have average bandwidth below the maximum video bitrate requirement, over **90%** have **stall-free** playback in a day, and over **99%** experience **no more than two stall events per day**. This motivates a personalized rather than system-wide approach.

LingXi uses **segment-level exit rate** as its operational proxy for user-level QoE. The paper’s empirical analysis reports markedly different effect scales for standard QoS components: **video quality** affects exit rate at around \(10^{-3}\), **video smoothness** at around \(10^{-2}\), and **stall time** at around \(10^{-1}\). The deployed system therefore uses a **hybrid exit-rate predictor** in which stall-related effects are personalized and quality/smoothness effects are handled statistically:
\[
R_{exit} = \begin{cases} 
NN(Stall) + OS(Quality,Smoothness), & \text{if stall} \\
OS(Quality,Smoothness), & \text{else}
\end{cases}
\]
The predictor is trained with cross-entropy,
\[
Loss = - \sum_{i=1}^{N} R_{label,i} \log(R_{pred,i}),
\]
and uses five input dimensions: **Bitrate**, **Throughput**, **Past stall time**, **Last stall interval**, and **Last stall-exit interval**. These are stored in a matrix of length **8**. The personalized stall predictor is a CNN with **five 1D-CNN layers**, each with **64 channels**, followed by a **64-dimensional fully connected layer**, a **2-dimensional fully connected layer**, and a final **softmax**.

Training uses around **100,000 stall-event entries** with an **80/20** train/test split. Because the continued-watch to exit ratio is about **4:1**, the paper uses balanced sampling with random undersampling of the majority class. The ablation results justify the stall-centric design: using all playback states produces accuracy and recall just over **60%** with precision and F1 around **20%**; using only switch-plus-stall “relevant events” raises accuracy to around **90%** but leaves precision around **40%**; using **stall-only** data yields all metrics above **95%**.

Optimization combines **Monte Carlo simulation** with **online Bayesian optimization (OBO)**. The paper states the objective as finding
\[
x^* \in \arg\min_{x \in X} f_{R_{exit}(x, N, S, E_{player})},
\]
where \(x\) is the vector of QoE or ABR parameters, \(N\) the bandwidth model, \(S\) the user state, and \(E_{player}\) the player environment. Future bandwidth is sampled from
\[
C_k \sim \mathcal{N}(\mu_{C_{past}, \sigma^2_{C_{past})},
\]
and the simulated playback dynamics update buffer state, waiting time, and segment choice under the candidate ABR parameters. In deployment with **HYB**, the optimized parameter is the control knob \(\beta\). The optimization is triggered only after **two stall events**, and the system uses two pruning strategies: early termination during virtual playback if a candidate’s predicted exit rate already exceeds the best observed, and pre-playback pruning when
\[
\mu_{C_{past} - 3\sigma_{C_{past} > Q_{max}
\]
so that stalls are highly unlikely. With these controls, the paper states that a daily active user needs at most **1–2 LingXi invocations per day**.

The deployment evidence comes from a **10-day difference-in-differences A/B test** using **8% of total traffic**, corresponding to about **30 million DAU**. The main watch-time result is
\[
0.146\% \pm 0.043\%
\]
with \(t = 3.395\) and \(p < 0.01\), reported in the abstract as a **0.15% increase in total viewing time**. QoS also improves, with bitrate
\[
0.103\% \pm 0.015\%
\]
and stall time
\[
-1.287\% \pm 0.103\%
\]
corresponding to a **0.1%** bitrate improvement and **1.3%** stall-time reduction overall. The strongest subgroup effect is for users below **2000 kbps**, for whom LingXi reduces stall time by up to **15%** while keeping video quality comparable.

## 6. Comparative themes and distinctions

Across these four usages, the name LingXi marks very different technical objects. In psychiatry, it denotes a **benchmark ecosystem** with a synthetic dataset, patient simulator, doctor strategies, and diagnostic evaluation. In poetry generation, it denotes a **decoding-oriented generation system** built on GPT-2-style modeling. In software engineering, it denotes a **knowledge-guided agent framework** for repository-level issue resolution. In streaming, it denotes a **production optimization layer** for adaptive bitrate control.

The methodological commonality is limited. Each system performs a different kind of guided decision-making: LingxiDiagBench separates consultation behavior from diagnostic reasoning; the poetry system reshapes token probabilities through head randomization and topic-preserving rejection sampling; the software framework guides analysis using retrieved procedural knowledge; and the streaming system adjusts ABR objectives using predicted exit behavior. This suggests a shared naming preference rather than a shared algorithmic lineage.

The most important disambiguation concerns real-world status and intended use. The psychiatric LingXi is explicitly a **research benchmark** and **not a clinical diagnostic tool**. The streaming LingXi is explicitly a **deployed production system** at Kuaishou. The software Lingxi is evaluated on **SWE-bench Verified** rather than in a live development workflow. The poetry Lingxi is a generation system evaluated through automatic metrics and human annotation rather than deployment at scale.

Taken together, the arXiv record uses “LingXi” to name four distinct systems: a clinically grounded Chinese psychiatric benchmark exposing the gap between information gathering and diagnosis [2602.09379]; a Chinese modern poetry generator centered on NS-RH and semantic rejection sampling [2108.12108]; a procedural-knowledge-guided framework for repository-level issue resolution [2510.11838]; and a large-scale personalized adaptive streaming system optimized around exit rate and watch time [2508.16454].

Source: https://www.emergentmind.com/topics/lingxi