Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
91 tokens/sec
Gemini 2.5 Pro Premium
52 tokens/sec
GPT-5 Medium
24 tokens/sec
GPT-5 High Premium
28 tokens/sec
GPT-4o
85 tokens/sec
DeepSeek R1 via Azure Premium
87 tokens/sec
GPT OSS 120B via Groq Premium
478 tokens/sec
Kimi K2 via Groq Premium
221 tokens/sec
2000 character limit reached

SUQL: Conversational Search over Structured and Unstructured Data with Large Language Models (2311.09818v2)

Published 16 Nov 2023 in cs.CL and cs.PL

Abstract: While most conversational agents are grounded on either free-text or structured knowledge, many knowledge corpora consist of hybrid sources. This paper presents the first conversational agent that supports the full generality of hybrid data access for large knowledge corpora, through a language we developed called SUQL (Structured and Unstructured Query Language). Specifically, SUQL extends SQL with free-text primitives (summary and answer), so information retrieval can be composed with structured data accesses arbitrarily in a formal, succinct, precise, and interpretable notation. With SUQL, we propose the first semantic parser, an LLM with in-context learning, that can handle hybrid data sources. Our in-context learning-based approach, when applied to the HybridQA dataset, comes within 8.9% exact match and 7.1% F1 of the SOTA, which was trained on 62K data samples. More significantly, unlike previous approaches, our technique is applicable to large databases and free-text corpora. We introduce a dataset consisting of crowdsourced questions and conversations on Yelp, a large, real restaurant knowledge base with structured and unstructured data. We show that our few-shot conversational agent based on SUQL finds an entity satisfying all user requirements 90.3% of the time, compared to 63.4% for a baseline based on linearization.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (54)
  1. Skill-based few-shot selection for in-context learning.
  2. Task-oriented dialogue as dataflow synthesis. Transactions of the Association for Computational Linguistics, 8:556–571.
  3. Adapt and decompose: Efficient generalization of text-to-sql via domain adapted least-to-most prompting.
  4. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc.
  5. A few-shot semantic parser for Wizard-of-Oz dialogues with the precise ThingTalk representation. In Findings of the Association for Computational Linguistics: ACL 2022, pages 4021–4034, Dublin, Ireland. Association for Computational Linguistics.
  6. Program transfer for answering complex questions over knowledge bases. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8128–8140, Dublin, Ireland. Association for Computational Linguistics.
  7. HybridQA: A dataset of multi-hop question answering over tabular and textual data. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1026–1036, Online. Association for Computational Linguistics.
  8. Conversational semantic parsing for dialog state tracking. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8107–8117, Online. Association for Computational Linguistics.
  9. Neural generation meets real people: Building a social, informative open-domain dialogue agent. In Proceedings of the 23rd Annual Meeting of the Special Interest Group on Discourse and Dialogue, pages 376–395, Edinburgh, UK. Association for Computational Linguistics.
  10. E. F. Codd. 1972. Relational completeness of data base sublanguages. Research Report / RJ / IBM / San Jose, California, RJ987.
  11. Turl: Table understanding through representation learning. ACM SIGMOD Record, 51(1):33–40.
  12. MATE: Multi-view attention for table transformer efficiency. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7606–7619, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
  13. Multi-hop open-domain question answering over structured and unstructured knowledge. In Findings of the Association for Computational Linguistics: NAACL 2022, pages 151–156, Seattle, United States. Association for Computational Linguistics.
  14. Enabling large language models to generate text with citations.
  15. Yu Gu and Yu Su. 2022. ArcaneQA: Dynamic program induction and contextualized encoding for knowledge base question answering. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1718–1731, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
  16. Prompting gpt-3.5 for text-to-sql with de-semanticization and skeleton retrieval. In Pacific Rim International Conference on Artificial Intelligence, pages 262–274. Springer.
  17. Tong Guo and Huilin Gao. 2020. Content enhanced bert-based text-to-sql generation.
  18. TaPas: Weakly supervised table parsing via pre-training. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4320–4333, Online. Association for Computational Linguistics.
  19. In-context learning for few-shot dialogue state tracking.
  20. Paul Hudak. 1989. Conception, evolution, and application of functional programming languages. ACM Comput. Surv., 21(3):359–411.
  21. TABBIE: Pretrained representations of tabular data. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3446–3456, Online. Association for Computational Linguistics.
  22. Active retrieval augmented generation.
  23. Can I be of further assistance? using unstructured knowledge access to improve task-oriented conversational modeling. In Proceedings of the 1st Workshop on Document-grounded Dialogue and Conversational Question Answering (DialDoc 2021), pages 119–127, Online. Association for Computational Linguistics.
  24. Evaluating open-domain question answering in the era of large language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5591–5606, Toronto, Canada. Association for Computational Linguistics.
  25. Demonstrate-search-predict: Composing retrieval and language models for knowledge-intensive nlp.
  26. Multi-row, multi-span distant supervision for Table+Text question answering. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8080–8094, Toronto, Canada. Association for Computational Linguistics.
  27. MAFiD: Moving average equipped fusion-in-decoder for question answering over tabular and textual data. In Findings of the Association for Computational Linguistics: EACL 2023, pages 2337–2344, Dubrovnik, Croatia. Association for Computational Linguistics.
  28. s3superscript𝑠3s^{3}italic_s start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT hqa: A three-stage approach for multi-hop text-table hybrid question answering. arXiv preprint arXiv:2305.11725.
  29. S3HQA: A three-stage approach for multi-hop text-table hybrid question answering. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 1731–1740, Toronto, Canada. Association for Computational Linguistics.
  30. Augmenting multi-turn text-to-SQL datasets with self-play. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 5608–5620, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
  31. Enhancing few-shot text-to-sql capabilities of large language models: A study on prompt design strategies.
  32. UniK-QA: Unified representations of structured and unstructured knowledge for open-domain question answering. In Findings of the Association for Computational Linguistics: NAACL 2022, pages 1535–1546, Seattle, United States. Association for Computational Linguistics.
  33. Synchromesh: Reliable code generation from pre-trained language models.
  34. Prolific. 2023. https://www.prolific.com. Acessed: June 2023.
  35. DuoRAT: Towards simpler text-to-SQL models. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1313–1321, Online. Association for Computational Linguistics.
  36. WikiChat: Stopping the hallucination of large language model chatbots by few-shot grounding on Wikipedia. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 2387–2413, Singapore. Association for Computational Linguistics.
  37. Exploring hybrid question answering via program-based prompting.
  38. Gpt4table: Can large language models understand structured table data? a benchmark and empirical study. Proceedings of WSDM 2024.
  39. Iterative hierarchical attention for answering complex questions over long documents.
  40. Sqlprompt: In-context text-to-sql with minimal labeled data.
  41. RAT-SQL: Relation-aware schema encoding and linking for text-to-SQL parsers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7567–7578, Online. Association for Computational Linguistics.
  42. Tracking interaction states for multi-turn text-to-sql semantic parsing. ArXiv, abs/2012.04995.
  43. MuGER2: Multi-granularity evidence retrieval and reasoning for hybrid question answering. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 6687–6697, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
  44. Tacr: A table-alignment-based cell-selection and reasoning model for hybrid question-answering. arXiv preprint arXiv:2305.14682.
  45. Fine-tuned LLMs know more, hallucinate less with few-shot sequence-to-sequence semantic parsing over Wikidata. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 5778–5791, Singapore. Association for Computational Linguistics.
  46. AutoQA: From databases to QA semantic parsers with only synthetic training data. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 422–434, Online. Association for Computational Linguistics.
  47. TaBERT: Pretraining for joint understanding of textual and tabular data. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8413–8426, Online. Association for Computational Linguistics.
  48. CoSQL: A conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1962–1979, Hong Kong, China. Association for Computational Linguistics.
  49. SParC: Cross-domain semantic parsing in context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4511–4523, Florence, Italy. Association for Computational Linguistics.
  50. COCO-DR: Combating distribution shift in zero-shot dense retrieval with contrastive and distributionally robust learning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 1462–1479, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
  51. Tablellama: Towards open large generalist models for tables.
  52. Reactable: Enhancing react for table question answering.
  53. "what do others think?": Task-oriented conversational modeling with subjective knowledge.
  54. Seq2sql: Generating structured queries from natural language using reinforcement learning.
Citations (1)

Summary

  • The paper presents SUQL as an innovative query language that augments SQL with summary and answer primitives to query hybrid data effectively.
  • It demonstrates an LLM-based semantic parser using few-shot learning to convert conversational queries into precise SUQL commands.
  • Experimental results on HybridQA and Yelp datasets reveal competitive performance, achieving up to 90.3% accuracy in real-world scenarios.

SUQL: Conversational Search over Hybrid Data with LLMs

The paper introduces SUQL, a novel query language bridging conversational agents and hybrid data sources. SUQL extends traditional SQL capabilities by integrating free-text primitives like summary and answer, facilitating seamless access to both structured and unstructured data. This innovative approach enhances LLMs' (LLMs) ability to interpret and execute complex queries involving a combination of structured and unstructured data, such as those found in extensive knowledge corpora.

Key Contributions

  1. SUQL Design: SUQL is a syntactically precise and semantically expressive language that augments SQL with the ability to operate on free text. The new primitives, summary and answer, allow users to pose queries that naturally span structured and unstructured data attributes. This offers a clear advantage over traditional methods like linearization, where data complexity and performance issues may arise.
  2. Semantic Parsing with LLMs: The paper demonstrates the capability of an in-context learning-based semantic parser to effectively translate conversational queries into SUQL, capitalizing on LLMs' familiarity with SQL syntax. The parser utilizes few-shot learning, reducing the need for extensive training datasets.
  3. Performance Validation: Experiments conducted on the HybridQA dataset show that the proposed approach achieves competitive results, with a performance margin close to the state-of-the-art without extensive training data. Specifically, SUQL-based systems achieve 59.0% exact match and 68.4% F1 on the test set.
  4. Real-world Applicability: The introduction of a dataset involving crowdsourced conversations about real restaurants (from Yelp) further supports SUQL's practicality and robustness. The results show that the SUQL-based conversational agent can accurately return results for user queries 90.3% of the time.

Numerical and Experimental Insights

  • The LLM-semantic parser achieves high accuracy with significant savings in data samples compared to state-of-the-art. The exact match and F1 scores are competitive, illustrating the efficiency and effectiveness of SUQL in real-time scenarios.
  • In the Yelp dataset experiment, the SUQL-based system demonstrated a marked improvement over traditional linearization-based methods, particularly in complex queries involving hybrid data sources.

Implications and Future Directions

The introduction of SUQL offers several practical and theoretical implications. By enabling precise, interpretable access to hybrid data, SUQL could transform how conversational agents interact with diverse databases, finding applications in industries like healthcare, finance, and customer service. The framework promises powerful data interrogation capabilities which were previously unattainable with limitations inherent in extant methods.

Future research directions could explore the refinement of SUQL's semantic parsing capabilities and its adaptation to more domain-specific tasks (e.g., legal or biomedical databases). Additionally, the potential integration of SUQL into industry-standard databases could foster more intuitive user-database interaction paradigms, facilitating seamless, natural language-based data management.

In conclusion, SUQL positions itself as a crucial development in conversational agent technologies, promising enhanced expressiveness and accuracy in querying hybrid data environments. Its design and implementation underscore a significant step forward in harnessing the full potential of LLMs in real-world applications.

Dice Question Streamline Icon: https://streamlinehq.com

Follow-up Questions

We haven't generated follow-up questions for this paper yet.

Github Logo Streamline Icon: https://streamlinehq.com
Youtube Logo Streamline Icon: https://streamlinehq.com