Prompt Engineering
Large Language Models (LLM) have enormous data to generate custom content, convert code from one language to another and so on. To achive this, instructions or prompts need to be input to LLM such as ChatGPT, Google Gemini, Microsoft copilot etc. in a specific order to get the best output. This is referred as GenAI. When prompts are not properly input, the end result is hallucination. Hallucination also occurs when input can in result in infinite looping output. In the world of robotics, it is known as singularity, when autonomous computation result is endless. Humanoid robots stop working or lose balance and fall.
 
  • Single action or one line prompts (zero shot) - for basic GenAI
    Example: Zero shot prompt example: what are the roots of the equation a x2 + b x + c = 0)

  • Roots of ax2 + bx + c = 0

    Detail explanation by ChatGPT
    Roots of Equation


  • Multiple action (multi shot) prompts - for converting language to language, summary analysis generation and similar GenAI
    Example: Multi shot prompt:
    Convert SQL to pyspark.
    Convert tables to equivalent dataframes
    Use pyspark equivalent functions for sql functions
    Convert Oracle joins with (+) to ansi eqivalent outer joins
    ................and so on.

  • Two Data Sources
    Two Data Sources

    First Prompt:
    Using the above data, compute Date based Profit = SALE PRICE - COST - TAX - FREIGHT


    Python code using panda created by ChatGPT to compute profit using formula provided:
    Two Data Sources


    Create SQL query for the data provided as two relational tables
    SQL Query

    SQL Query Output summary, full output has complete solution details (excluded for simplicity).

    SQL Query Output

    Same prompt to Google using AI Mode - Solution had table design and SQL query

    Transaction Table
    Transaction Description Table
    Google SQL Query Output

  • Chain of Thoughts (CoT) prompts - for converting content and embedding of decision flow logic into output that is generated.

  • Prompts designed as API to perform several actions using MCP


Large Language Model
 
Table of Content
Top



Revised Date: October 11th, 2025