LLM/prompt for coding: Difference between revisions

From Fundamental Ramen
< LLM
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Autogen migration from mermaid chart in a markdown file ==
== Spec to Code ==


* Result: Okay
=== Autogen migration from mermaid chart in a markdown file ===
 
* Result: not entirely reliable
* Agent: AnythingLLM
* Agent: AnythingLLM
* Model: Gemma 4 E4B
* Model: Gemma 4 E4B
Line 7: Line 9:
'''Prompt'''
'''Prompt'''
<pre>
<pre>
Please read docs/MAINSYS_DB.md, and generate DDL.
Please read docs/SCHEMA.md, and generate DDL.
This DDL must satisfy the following rules:
This DDL must satisfy the following rules:


- with table comments
- with "COMMENT ON" syntax for each table
- with column comments
- with "COMMENT ON" syntax for each column
- with foreign key definitions
- with "ADD CONSTRAINT" syntax for each foreign key
- with "GENERATED ALWAYS AS IDENTITY" syntax for each id column


When DDL satisfied the 3 rules above.
When DDL satisfied the 3 rules above.
Find the latest *.up.sql in assets\migrations, write this DDL.
 
And find the latest *.down.sql in assets\migrations, write reverse DDL.
- find the latest *.up.sql in assets\migrations
- write this DDL
- find the latest *.down.sql in assets\migrations
- write reverse DDL
</pre>
</pre>
'''Risks'''
* Table name order conflict with SQL syntax.
== Fill TODO ==

Latest revision as of 02:30, 29 July 2026

Spec to Code

Autogen migration from mermaid chart in a markdown file

  • Result: not entirely reliable
  • Agent: AnythingLLM
  • Model: Gemma 4 E4B

Prompt

Please read docs/SCHEMA.md, and generate DDL.
This DDL must satisfy the following rules:

- with "COMMENT ON" syntax for each table
- with "COMMENT ON" syntax for each column
- with "ADD CONSTRAINT" syntax for each foreign key
- with "GENERATED ALWAYS AS IDENTITY" syntax for each id column

When DDL satisfied the 3 rules above.

- find the latest *.up.sql in assets\migrations
- write this DDL
- find the latest *.down.sql in assets\migrations
- write reverse DDL

Risks

  • Table name order conflict with SQL syntax.

Fill TODO