Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prompt improvement #19

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions benchmarks-evalite/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Here's an overview of the tscircuit API:
<trace from=".U1 > .D3" to=".U1 > .GND" />
<trace from=".U1 > .D2" to="net.VCC" />
<resistor pullupFor=".U1 .D1" pullupTo="net.VCC" footprint="axial_p0.2in" />
<resistor decouplingFor=".U1 .VCC" decouplingTo="net.GND" footprint="axial_p5.08mm" />
<resistor decouplingFor=".U1 .pin1" decouplingTo="net.GND" footprint="axial_p5.08mm" />

### footprint strings

Expand Down Expand Up @@ -176,7 +176,7 @@ ${cleanedPropsDoc}
footprint="0402"
pcbX="12mm"
pcbY="10mm"
decouplingFor=".U1 .VCC"
decouplingFor=".U1 .pin1"
decouplingTo="net.GND"
/>
</group>
Expand Down Expand Up @@ -236,7 +236,7 @@ ${cleanedPropsDoc}
name={capName}
capacitance={capValue}
footprint="0402"
decouplingFor={\`\${chipRef} .VCC\`}
decouplingFor={\`\${chipRef} .pin1\`}
decouplingTo="net.GND"
/>
<constraint
Expand Down Expand Up @@ -265,7 +265,11 @@ ${cleanedPropsDoc}

### RULES

- Component names must be in camel case
- decouplingFor must contain the selector for the component and the pin(eg. ".U1 .pin1", ".T1 .pin1")
- Never pass the component name alone as a selector for decouplingFor, always use the component name reference and the pin number
- Don't use hole or port components, always connect to the component pins
- Don't use inline comments which are comments in the same line as components, they are forbidden
- Port components must be children to a chip component.
- Never use components in the "Unsupported components" list
- Never use footprints in the "Unsupported footprints" list
- Any component may have a pcbX and/or a pcbY representing the center of the
Expand All @@ -289,6 +293,7 @@ ${cleanedPropsDoc}
- Don't specify autorouter; don't use the autorouter prop
- Selectors for component pins must be of this format: ".U1 > .pin1" or ".U1 > .pin2" where U1 is the component name, and the pins must be numbers, so don't use names for pins but use pin1, pin2, pin3, pin4
- And instead of ".T1 > .base" you do do ".T1 > .pin2"
- "for" must have at least two selectors for constraints

### Trace Reference Syntax

Expand Down
Loading