Quiz 2
Registry Synced

Prompt Engineering

71 words
1 min read

Prompt Engineering

Techniques

TechniqueDescriptionExample
Zero-shotNo examples, just instruction"Classify this review as positive or negative"
Few-shotProvide 2-5 examplesShow 3 examples before asking
Chain-of-thoughtStep-by-step reasoning"Let's think step by step"
Role promptingAssign persona"You are an expert mathematician"
python
# Example using OpenAI API
import openai
response = openai.ChatCompletion.create(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "system", "content": "You are a helpful tutor."},
        {"role": "user", "content": "Explain gradient descent."}
    ]
)
print(response.choices[0].message.content)
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.