Prompt engineering: Difference between revisions

No edit summary
Line 5: Line 5:
==Prompt Engineering for Coding==
==Prompt Engineering for Coding==
Genearte [[code]] using [[models]] like the [[OpenAI Codex]].
Genearte [[code]] using [[models]] like the [[OpenAI Codex]].
===Task===
Give the model a high level task description. To improve the quality of the generated code, it's recommended to start the prompt with a broad description of the task at hand. For example, if you want to generate Python code to plot data from a standard dataset, you can provide a prompt like this: "# Load iris data from scikit-learn datasets and plot the training data." However, sometimes the generated code may not be optimal, in which case you can provide more specific instructions such as importing libraries before using them. By combining a high-level task description with detailed user instructions, you can create a more effective prompt for Codex to generate code.
===Examples===
Gives the model examples.
===Context===


==How to Create Descriptive, Poetic Text==
==How to Create Descriptive, Poetic Text==
370

edits