I was wondering if it is possible to use GPT-3 to translate text description of a circuit to any circuit design language program, which in turn can be used to make the circuit. If it is possible, what approach will you suggest?

  • $\begingroup$ I'm sorry, I don't know much about circuits. Could you provide an example of a circuit text description? Or a simple example of the expected result? $\endgroup$ Aug 17, 2021 at 4:13
  • $\begingroup$ Circuit text description: "Please design a buck converter with 12V input and 5V 3A output." Have fun finding an output format that represents circuits. $\endgroup$
    – user253751
    Aug 30, 2021 at 15:47
  • $\begingroup$ This needs to be viewed as a code generation problem where a textfile is output. $\endgroup$ Feb 17, 2022 at 20:28

3 Answers 3


This is rather something for V&L Models, training on associated texts with circuit images. Data which should be hard to come by. I doubt these models are yet capable of catching enough detail in pictures for producing the desired results. I mean results that dont dissolve is smoke when soldering the circuit.

Mapping from natural language to some formal description language of circuits (lets call it fdloc) is definitively possible, but you need a lot of training data on text basis, lets say more than 1k pairs of human written texts and the corresponding fdloc expression. Do you have this data? Then machine translation networks are all you need. Fine-tuning a large system might be enough, depending on how your fdloc is syntactically build, e.g. does it contain many chars that a normal GPT Model would just not recognize as tokens?

Alternatively, if you don't have this data and don't want to get rendered circuit images, you could try to Learn the soldering paths to the respective electric pieces by natural language understanding:

Just a draft:

  1. Use NER (Named Entity Recognition) to spot all electric components in the text.
  2. The text between these components most probably deals with how to connect the different capacitors etc., so you need to map these relations onto "paths" that you register as connections between your components, e.g. now solder the negative connector of the switch S1 to the blabla of the light bulb socket B2" or something comparable.
  3. Watch out! Its natural language, so even if its written in a dry and technical style, you will have to resolve co-reference, something like "now connect THIS to the output jack ...". I think you could extract some sort of a directed graph, which contains the components and the path descriptions of connections to all other components.
  4. From this you then need to build a schematic of the circuit. Alternatively, If you have something like a fdloc some program can read in and produce the circuit for you, then you don't need to do step 4 on your own.

As of today (9 Feb 2023) it is possible to create a HSPICE output from verbal description of an electric circuit using chatGPT.

Simply describe a circuit and its element to chatGPT, and ask it to write the HSPICE code to simulate the circuit. Not only chatGPT is able to solve the circuit for you step by step, it can also create the HSPICE format correctly.

Here is chatGPT's HSPICE output for a simple circuit and the description of the code:

* Electric Circuit with 3 elements
V1 1 0 DC 10V
R1 1 2 20Ohm
R2 2 0 30Ohm

* Simulation command
.DC V1 10 20 0.1

Explanation of the code:

The first two lines define the voltage source V1 with node numbers 1 and 0, and a DC voltage of 10V. The next two lines define the resistors R1 and R2 with node numbers and their resistance values. The .OP command sets the simulation to operate point analysis. The .DC command sets up a DC sweep analysis with the sweep variable V1 ranging from 10V to 20V in steps of 0.1V. The .PRINT command specifies the variables to be printed in the output, in this case, the voltage at node 2. The .END command marks the end of the simulation. This code should give you the voltage across R1 as a function of the voltage source V1.

All I can say is that we are on the verge of a revolution! This is as big as the Internet, and can help experts to make much more rapid progress in many fields of science.


The rate of progress is so impressive that this information will soon be out of date.

Whatever you're doing with it (even code), turn frequency penalty and presence penalty all the way up to 2.

When using something like the OpenAI playground to access GPT-3 your question and its answer will be text. So it might give a step by step description or describe the circuits connectivity with some formal language that makes that practical.

Asking a question followed by a question-mark or alternatively "The following is a …:" seems to work well. Then a single line break.

Hold its hand at first, you may need to correct the first sections of output to help it get onto the right track, however once there the reliability will improve.

Recursively ask for a more detailed breakdown where needed.

It's not very good at negatives when coding, this problem may occur here as well, if so avoid "X but without Y", for example something that is "not expensive" could be "cheap".

It may to prefer excellent over affordable, just because somethings been invented a whole year ago doesn't mean you'll be wanting to buy 20 of them even if that would make for a really good design.

It may try and solve 99% of the problem with a single component, such as welding a Raspberry PI computer onto the circuit board.

There's a good chance it wont agree with you and work from there if it thinks you're wrong about something, it's very intelligent, can keep track of long arguments, and never tires of them, and it can be quite condescending which isn't always helpful. You can get round this with "so hypothetically …" or "I managed to …, how did I do it?"

You can ask it to optimise/adjust its design in some specific way, with varying levels of success.

It tries to repurpose existing understanding, if it already understands mechanical design for example and circuit design is relatively new to if you may see it strongly expressing that influence.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .