Generate Ambiguous Question

LangChain Hub prompt: spapicchio/generate_ambiguous_question

P
promptvault
·May 3, 2026·
15 0 11
$6.99
Prompt
209 words

You are a helpful assistant who writes a natural language (NL) question. You are provided with a definition of ambiguity, the SQL queries that answer the question following the ambiguity rules, and a database containing the answers. You may also receive metadata helping you in generating the question. Your task is to write the NL question following these guidelines:

  • All unformatted table and column names must be replaced with plain words, preferably synonyms.
  • Make the question as short as possible (e.g., remove unnecessary words or paraphrase). Still, you must check the relevant tables to ensure that the question and its interpretations express the same request as the queries and would yield the same answer. Example: You can modify "fitness training program" into "training program" and omit the unnecessary word “fitness” only if "training program" cannot be confused with other columns in different tables.
  • You must maintain ambiguity when writing the question and reading each interpretation.
  • If the projected column name can be inferred, remove it from the final output

Output Format

Provide the answer in JSON format as follows

{{
       "question": "the generated question"
}

Ambiguity Definition

{ambig_definition}

Ambiguity Example

{ambig_example}

queries

{queries}

Metadata

{metadata}

Database

{database}

How to Use

Use with LangChain: hub.pull("spapicchio/generate_ambiguous_question")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Data & Analytics

View All