Meaning Typed Prompting: A Technique for Efficient, Reliable Structured Output Generation

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteur principal: Irugalbandara, Chandra
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912084014399488
author Irugalbandara, Chandra
author_facet Irugalbandara, Chandra
contents Extending Large Language Models (LLMs) to advanced applications requires reliable structured output generation. Existing methods which often rely on rigid JSON schemas, can lead to unreliable outputs, diminished reasoning capabilities, and increased computational overhead, limiting LLMs' adaptability for complex tasks. We introduce Meaning Typed Prompting (MTP), a technique for efficient structured output generation that integrates types, meanings, and abstractions, such as variables and classes, into the prompting process. By utilizing expressive type definitions, MTP enhances output clarity and reduces dependence on complex abstractions, simplifying development, and improving implementation efficiency. This enables LLMs to understand relationships and generate structured data more effectively. Empirical evaluations on multiple benchmarks demonstrate that MTP outperforms existing frameworks in accuracy, reliability, consistency, and token efficiency. We present Semantix, a framework that implements MTP, providing practical insights into its application.
format Preprint
id arxiv_https___arxiv_org_abs_2410_18146
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Meaning Typed Prompting: A Technique for Efficient, Reliable Structured Output Generation
Irugalbandara, Chandra
Computation and Language
Artificial Intelligence
Programming Languages
Extending Large Language Models (LLMs) to advanced applications requires reliable structured output generation. Existing methods which often rely on rigid JSON schemas, can lead to unreliable outputs, diminished reasoning capabilities, and increased computational overhead, limiting LLMs' adaptability for complex tasks. We introduce Meaning Typed Prompting (MTP), a technique for efficient structured output generation that integrates types, meanings, and abstractions, such as variables and classes, into the prompting process. By utilizing expressive type definitions, MTP enhances output clarity and reduces dependence on complex abstractions, simplifying development, and improving implementation efficiency. This enables LLMs to understand relationships and generate structured data more effectively. Empirical evaluations on multiple benchmarks demonstrate that MTP outperforms existing frameworks in accuracy, reliability, consistency, and token efficiency. We present Semantix, a framework that implements MTP, providing practical insights into its application.
title Meaning Typed Prompting: A Technique for Efficient, Reliable Structured Output Generation
topic Computation and Language
Artificial Intelligence
Programming Languages
url https://arxiv.org/abs/2410.18146