mlsanityData to 7 Oct 2026

Learning Metadata-Agnostic Representations for Text-to-SQL In-Context Example Selection

arXiv 2410.14049 ↗First posted 17 Oct 2024cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

In-context learning (ICL) is a powerful paradigm where large language models (LLMs) benefit from task demonstrations added to the prompt. Yet, selecting optimal demonstrations is not trivial, especially for complex or multi-modal tasks where input and output distributions differ. We hypothesize that forming task-specific representations of the input is key. In this paper, we propose a method to align representations of natural language questions and those of SQL queries in a shared embedding space. Our technique, dubbed MARLO - Metadata-Agnostic Representation Learning for Text-tO-SQL - uses query structure to model querying intent without over-indexing on underlying database metadata (i.e. tables, columns, or domain-specific entities of a database referenced in the question or query). This allows MARLO to select examples that are structurally and semantically relevant for the task rather than examples that are spuriously related to a certain domain or question phrasing. When used to retrieve examples based on question similarity, MARLO shows superior performance compared to generic embedding models (on average +2.9%pt. in execution accuracy) on the Spider benchmark. It also outperforms the next best method that masks metadata information by +0.8%pt. in execution accuracy on average, while imposing a significantly lower inference latency.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 40 of its 49 references that are in the map. First posted on arXiv 17 Oct 2024.

Builds on

40 of 49 references.

References · 40

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Training language models to follow instructions with human feedbackcited by 15,712
  4. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  5. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  6. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  7. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
  8. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
  9. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  10. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  11. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
  12. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
28 more
  1. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  2. 2023Teaching Large Language Models to Self-Debugcited by 963
  3. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  4. 2022A Survey on In-context Learningcited by 717
  5. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  6. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  7. 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
  8. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  9. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  10. 2021Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Modelscited by 462
  11. 2021Large Dual Encoders Are Generalizable Retrieverscited by 454
  12. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
  13. 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 358
  14. 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 235
  15. 2017Efficient Natural Language Response Suggestion for Smart Replycited by 228
  16. 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 215
  17. 2019Multilingual Universal Sentence Encoder for Semantic Retrievalcited by 192
  18. 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
  19. 2020Learning Dense Representations of Phrases at Scalecited by 91
  20. 2022On the Effect of Pretraining Corpora on In-context Learning by a Large-scale Language Modelcited by 78
  21. 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
  22. 2018A Retrieve-and-Edit Framework for Predicting Structured Outputscited by 73
  23. 2018End-to-End Retrieval in Continuous Spacecited by 46
  24. 2023Skill-Based Few-Shot Selection for In-Context Learningcited by 46
  25. 2023Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategiescited by 44
  26. 2022StructCoder: Structure-Aware Transformer for Code Generationcited by 33
  27. 2022Exploring Dual Encoder Architectures for Question Answeringcited by 19
  28. 2023Exploring the Relationship between In-Context Learning and Instruction Tuningcited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.