POS-Signature Demonstration Retrieval for In-Context Dependency Parsing
Organizations: Università Cattolica del Sacro Cuore, Milan, Italy · University of Zaragoza, Zaragoza, Spain · Universidade NOVA de Lisboa, Lisbon, Portugal · Université libre de Bruxelles, Brussels, Belgium
Abstract
Demonstrations for in-context learning are often retrieved by semantic similarity, which may be a poor proxy for relevance in structured prediction. We study demonstration selection for Universal Dependencies parsing with a POS-signature policy that represents sentences with weighted part-of-speech statistics and retrieves three length-compatible, gold-parsed examples from the labeled training split. We evaluate two open-weight language models without fine-tuning on all 2,077 sentences of the UD English Web Treebank test set, comparing the policy with shot- and format-matched fixed and semantic three-shot baselines, as well as zero-shot, chain-of-thought, and critique-refinement systems. POS-signature retrieval yields the highest labeled attachment score among the tested prompting systems for both models (72.4 and 73.2), outperforming semantic retrieval by 1.9 and 2.7 points; paired-bootstrap 95% confidence intervals exclude zero for both contrasts. Chain-of-thought and refinement comparisons vary across models. These exploratory results favor the tested POS-signature retrieval approach on English-EWT. We release the prompts, archived outputs, and evaluation code.
Figures & tables
| Condition | Demonstrations | Selection | Free-text reasoning | Passes |
|---|---|---|---|---|
| Zero-Shot | 0 | — | No | 1 |
| Fixed Few-Shot | 3 | fixed, manually selected | No | 1 |
| POS-Signature Few-Shot | 3 | POS signature + length window | No | 1 |
| Semantic Few-Shot | 3 | full-pool sentence embeddings | No | 1 |
| Chain-of-Thought | 1 | fixed worked example | Yes | 1 |
| Critique-Refine | — | revises CoT output | Internal review | 2 |
| Condition | gpt-oss | Qwen | ||
|---|---|---|---|---|
| UAS (%) | LAS (%) | UAS (%) | LAS (%) | |
| Zero-Shot | 75.1 | 64.7 | 75.7 | 62.9 |
| Fixed Few-Shot | 76.5 | 67.3 | 76.3 | 65.3 |
| POS-Signature Few-Shot | 80.4 | 72.4 | 82.1 | 73.2 |
| Semantic Few-Shot | 79.6 | 70.5 | 80.8 | 70.5 |
| Chain-of-Thought | 78.6 | 70.0 | 72.4 | 61.7 |
| Comparison (first second) | Status | gpt-oss | Qwen | ||
|---|---|---|---|---|---|
| LAS pp [95% CI] | LAS pp [95% CI] | ||||
| POS-Signature Semantic | Primary | [1.06, 2.69] | [1.97, 3.41] | ||
| POS-Signature Fixed | Primary | [4.21, 5.98] | [7.05, 8.71] | ||
| CoT Zero-Shot | Exploratory | [4.41, 6.19] | .0002 | [ , ] | .0158 |
| Critique-Refine CoT | Exploratory | [ , 0.91] | .0634 | [1.53, 2.28] | .0002 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Relation | Gold support | gpt-oss LAS (%) | Qwen LAS (%) | ||
|---|---|---|---|---|---|
| POS-Signature | Semantic | POS-Signature | Semantic | ||
| nsubj | 1,950 | 78.4 | 76.4 | 79.8 | 77.4 |
| nmod:poss | 387 | 73.1 | 59.2 | 84.2 | 61.2 |
| cc | 750 | 73.7 | 68.1 | 84.5 | 82.4 |
| cop | 584 | 44.3 | 38.4 | 52.9 | 48.6 |
| nmod:unmarked | 111 | 34.2 | 28.8 | 43.2 | 36.9 |
| Critique outcome | gpt-oss | Qwen |
|---|---|---|
| Analyzed non-punctuation tokens | 21,998 | 21,801 |
| Token prediction changed | 2,260 (10.3%) | 2,084 (9.6%) |
| Wrong correct | 703 | 756 |
| Correct wrong | 606 | 338 |
| Wrong different wrong | 951 | 990 |
| Net LAS-correct tokens |
| Model | Condition | Schema-valid | Root warnings | Tree-conforming |
|---|---|---|---|---|
| gpt-oss | Zero-Shot | 2,077 | 5 | 2,017 |
| gpt-oss | Fixed Few-Shot | 2,077 | 1 | 2,035 |
| gpt-oss | POS-Signature Few-Shot | 2,077 | 1 | 2,005 |
| gpt-oss | Semantic Few-Shot | 2,077 | 3 | 2,009 |
| gpt-oss | Chain-of-Thought | 2,077 | 2 | 2,044 |
| gpt-oss | Critique-Refine | 2,077 | 2 | 2,031 |
In-Context Example Selection
In-context example selection chooses demonstrations that help language and multimodal models perform a query-specific task without changing model weights.
See all 29 papers