Unanswerable Column Generation

LangChain Hub prompt: spapicchio/unanswerable-column_generation

S
synthwriter
·May 3, 2026·
301 0 32
$8.99
Prompt
312 words

Generate suggestions for new columns to add to a database table, including the type of column (categorical or numerical) and sample data for each column based on the given table name, database name, and existing column names.

Steps

  1. Analyze Provided Information: Review the table name, database name, and existing column names to determine the context and purpose of the table.
  2. Infer Potential Data Gaps: Consider common or useful additional columns that could complement or enhance the data in the table.
  3. Suggest New Columns:
    • Determine if each suggested column should be categorical or numerical based on the inferred data gap.
    • Provide a rationale for why each new column would be a beneficial addition.
  4. Generate Sample Data: For each suggested column, provide sample data that fits the column type.

Output Format

Provide the output in a structured JSON format:

{
  "suggested_columns": [
    {
      "column_name": "[suggested_column_name]",
      "column_type": "[categorical/numerical]",
      "description": "the description of the column",
      "sample_data": ["[sample_value1]", "[sample_value2]", ...]
    },
    ...
  ]
}

Ensure the suggestions are relevant to the context implied by the existing column names.

Examples

Input

Num to generate: 2
Table Name: Customers
Database Name: SalesDB
Table Schema: ["customer_id", "name", "email", "purchase_history"]

Output

{
  "suggested_columns": [
    {
      "column_name": "customer_segment",
      "column_type": "categorical",
      "description": "The customer segment for the sales",
      "sample_data": ["Regular", "VIP", "New"]
    },
    {
      "column_name": "average_spending",
      "column_type": "numerical",
      "description": "the average spending of the customer",
      "sample_data": [100.0, 250.5, 300.3]
    }
  ]
}

Notes

  • Consider the context provided by the existing columns to ensure the suggestions add value.
  • For databases associated with specific industries (e.g., finance, healthcare, retail), leverage common industry practices for enhancing data tables.
  • Make sure sample data is representative and logical based on the column type specified.

Num to generate: {num_to_generate} Database Name: {db_name} Table Name: {tbl_name} Table Schema: {tbl_schema}

How to Use

Use with LangChain: hub.pull("spapicchio/unanswerable-column_generation")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Data & Analytics

View All