Generate Ambiguous Question
LangChain Hub prompt: spapicchio/generate_ambiguous_question
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")
Related Prompts
More prompts in Data & Analytics
Sql Agent System Prompt
LangChain Hub prompt: langchain-ai/sql-agent-system-prompt
Buyer Persona Legend
Generate detailed User Personas for your Business with data neatly organized into a table.
Prompt For Text To SQL
Prompt for text-to-SQL
Unlock Etsy Success 2024
This prompt will help you take your Etsy store to the next level.
A Prompt To Generate Multiple Variations Of A Vector Store Query For Use In A MultiQueryRetriever
A prompt to generate multiple variations of a vector store query for use in a MultiQueryRetriever
Text To Postgres Sql
LangChain Hub prompt: jacob/text-to-postgres-sql