In the previous chapter, Project Overview, we looked at the big picture of the Prompt Engineering Guide repository. We learned that this project is a library of text files that gets turned into a website.
Now, we are going to open the first "door" of this library: The Introduction Section.
This section handles the absolute basics. If you have ever wondered, "Why did the AI say that?" or "How do I make it more creative?", the answers lie in the files within this chapter.
Imagine you are using an AI to write a greeting card for your best friend.
The Problem: You type: "Write a poem for a friend." The AI writes: "Roses are red, violets are blue, you are my friend, and I like you."
It is boring and generic. You try again, and it gives you the exact same result. You feel stuck.
The Solution: You need to understand LLM Settings (specifically "Temperature"). Think of this as a volume knob for "Creativity." The Introduction section of the guide explains how to find and turn this knob.
This section of the repository is broken down into three fundamental concepts.
Let's solve the greeting card problem using the concepts found in this section.
Goal: Generate a wacky, unique poem.
How to use the Guide:
introduction folder.If you were using code (like Python) to talk to OpenAI, the guide teaches you to setup your request like this:
# We want high creativity, so we set temperature to 0.9
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Write a poem for a friend."}],
temperature=0.9 # <--- The magic setting
)
Because we turned the "Temperature" up (as taught in this section), the AI output changes from "Roses are red" to something like:
*"In the galaxy of friendship, you are a neon star,
Shining brighter than a quasar, seen from afar!"*
How does the project organize these lessons? If you look inside the project repository, you will find a folder named pages/introduction.
This folder contains the actual Markdown files that explain these concepts.
pages/
โโโ introduction/ # The folder for Chapter 2 concepts
โโโ basics.mdx # Explains what a prompt is
โโโ elements.mdx # Explains Instruction vs Context
โโโ settings.mdx # Explains Temperature & Top P
โโโ tips.mdx # General advice
When you click "Introduction" on the website sidebar, the system looks into this folder.
Here is what happens when a user wants to learn about "Temperature":
Let's peek inside one of these files. If you open pages/introduction/settings.mdx, you won't see complex code. You will see text explaining technical concepts in simple terms.
However, the file starts with a special header called Frontmatter.
pages/introduction/settings.mdx---
title: LLM Settings
description: Understanding Temperature and Top P
---
# LLM Settings
One of the most important settings is **Temperature**.
Think of Temperature as a "Risk-Taking" slider...
--- lines: This is metadata. The website uses the title to label the link in the sidebar.
Another crucial file in this structure is elements.mdx. It teaches that a prompt isn't just one sentence. It breaks a prompt down into parts.
The guide teaches you to structure prompts like this (in your head or code):
[Instruction]: Classify the text below.
[Context]: The text is a customer review.
[Input Data]: "I loved this product!"
[Output Indicator]: Sentiment:
By separating these, the AI understands you better.
In this chapter, we explored the Introduction section of the Content Structure.
pages/introduction/.Now that we understand the basics of how to construct a prompt and configure the model, we are ready to learn specific strategies to make the AI smarter.
Next Chapter: Content Structure - Techniques
Generated by Code IQ