Basic prompt Engineering#

In this notebook we learn how prompts can be designed to carefully modify the output format. The more precisely we formulate the desired output, the closer this output will be to our expectation. The act of making the prompt more precise can be coined “prompt engineering”.

from prompting_utilities import prompt_chatgpt

First let’s ask for a simple task.

%%prompt_chatgpt
You are a professional academic consultant who gives advice to students for writing their thesis.



Give these hints:
* Submit the thesis registration form only if you're sure you can finish writing in 5 months.
* Start writing your thesis early, e.g. the fundamentals chapter can be written from day one.
* Plan to finish writing a month before the deadline to give time to read it and provide feedback.

Additional hints for writing your thesis:

  • Break down your research question into smaller, manageable components to guide your writing process.

  • Create a realistic timeline with specific deadlines for each chapter or section.

  • Utilize any writing resources offered by your academic institution, such as writing workshops or tutoring services.

  • Seek feedback from peers, professors, or academic advisors throughout the writing process to improve the quality of your thesis.

  • Remember to cite your sources accurately and consistently throughout your thesis to avoid plagiarism.

  • Revise and edit your thesis multiple times to ensure clarity, coherence, and accuracy in your arguments.

  • Prioritize self-care and time management to avoid burnout during the thesis writing process.

The output is very long and thus, an obvious modification of the output could be to “keep it short”.

%%prompt_chatgpt
You are a professional academic consultant who gives advice to students for writing their thesis.
Keep it short.


Give these hints:
* Submit the thesis registration form only if you're sure you can finish writing in 5 months.
* Start writing your thesis early, e.g. the fundamentals chapter can be written from day one.
* Plan to finish writing a month before the deadline to give time to read it and provide feedback.

Submit the thesis registration form only if you can finish in 5 months. Start early - write the fundamentals chapter from day one. Plan to finish writing a month before the deadline for feedback.

It is also straightforward to ask for output in different languages.

%%prompt_chatgpt
You are a professional academic consultant who gives advice to students for writing their thesis.
Keep it short.
Povide advice in German.

Give these hints:
* Submit the thesis registration form only if you're sure you can finish writing in 5 months.
* Start writing your thesis early, e.g. the fundamentals chapter can be written from day one.
* Plan to finish writing a month before the deadline to give time to read it and provide feedback.

Als akademischer Berater empfehle ich Ihnen, das Registrierungsformular für Ihre Abschlussarbeit nur einzureichen, wenn Sie sicher sind, dass Sie sie in 5 Monaten abschließen können. Beginnen Sie früh mit dem Schreiben, z.B. das Kapitel zur Grundlagenforschung kann ab dem ersten Tag verfasst werden. Planen Sie, den Schreibprozess einen Monat vor dem Abgabetermin abzuschließen, um genügend Zeit zum Lesen und für Feedback zu haben.

“Also output style specification possible is.”, Yoda said.

%%prompt_chatgpt
You are a professional academic consultant who gives advice to students for writing their thesis.
Keep it short.
Write like Yoda would.

Give these hints:
* Submit the thesis registration form only if you're sure you can finish writing in 5 months.
* Start writing your thesis early, e.g. the fundamentals chapter can be written from day one.
* Plan to finish writing a month before the deadline to give time to read it and provide feedback.

Hints for your thesis, I have. Submit the form, only if sure you can finish in 5 months. Start early, you must. Fundamentals chapter, write from day one, you can. Plan to finish a month before, give time for feedback and reading, you should. Good luck, you will have.

If technialities are explained by chatGPT, a common prompt is to explain the context as “I’m a 5 year old.”

%%prompt_chatgpt
You are a professional academic consultant who gives advice to students for writing their thesis.
Keep it short.
Povide advice in German.
Explain it like I'm 5 year old.
Give these hints:
* Submit the thesis registration form only if you're sure you can finish writing in 5 months.
* Start writing your thesis early, e.g. the fundamentals chapter can be written from day one.
* Plan to finish writing a month before the deadline to give time to read it and provide feedback.

Wenn du deine Thesis schreiben willst, musst du sicher sein, dass du in 5 Monaten fertig wirst. Fang früh an zu schreiben, z.B. das Grundlagenkapitel kannst du von Anfang an schreiben. Plane, einen Monat vor der Abgabefrist fertig zu sein, um genug Zeit zum Lesen und Feedback geben zu haben.

Exercise#

Receive the advice in different languages. Also consider languages such as Klingon.