M2_UGL_2 - Are the examples in UGL 1 and UGL 2 equivalent?

I’d like to understand if in some respects the examples in UGL 1 and UGL 2 equivalent?

UGL 1 - LLM 1: Generate Python Code v1 + Execute and generate graph → LLM 2: (Code V1 + Generated Graph) → Revised Code V2

UGL 2a - LLM 1: SQL Query for user question → LLM 2 Review Query → Generate Revised

UGL 2b - LLM 1: SQL Query v1 for user question → LLM 2 (Review Query v1 + Output v1) → Generate Revised Query v2

Are UGL 1 and UGL 2b equivalent?

In what respect could they be considered different?

Thoughts/notes would be greatly appreciated.

Thanks

@Joe-Dev

Joe they are similar in agentic design pattern, the only difference i remember when I had run down both labs was one lab had much simpler and 1 step method where as the second hand two agents or LLMs doing similar work, that’s all the difference i remember when I checked the output.

Regards
DP

Thanks @Deepti_Prasad , my notes below:

  • Joe they are similar in agentic design patter
    • Agree (reflection design pattern)
  • , the only difference i remember when I had run down both labs was one lab had much simpler and 1 step method where as the second hand two agents or LLMs doing similar work, that’s all the difference i remember when I checked the output.
    • In my observation both labs used 2 models, though the UGL1 did have a single step process to generate the final code while UGL 2 broke it into 2 different steps (a & b) as follows

    • UGL 1 - LLM 1: Generate Python Code v1 + Execute and generate graph → LLM 2: (Code V1 + Generated Graph) → Revised Code V2

      UGL 2a - LLM 1: SQL Query for user question → LLM 2 Review Query → Generate Revised

      UGL 2b - LLM 1: SQL Query v1 for user question → LLM 2 (Review Query v1 + Output v1) → Generate Revised Query v2

    • What I am trying to understand/validate is, for UGL 1 and UGL 2 to be equivalent, UGL 1 would have to be structured as:

    • UGL 1 a - LLM 1: Generate Python Code v1 + Execute and generate graph → LLM 2: (Code V1 <not including actual output/graph>) → Revised Code V2 i.e. review based on code alone from LLM 1

    • UGL 1 - LLM 1 b: Generate Python Code v1 + Execute and generate graph → LLM 2: (Code V1 + Generated Graph) → Revised Code V2